@openui5/sap.ui.core 1.121.2 → 1.121.4
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/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/Event.js +1 -1
- package/src/sap/base/Eventing.js +1 -1
- package/src/sap/base/config.js +1 -1
- package/src/sap/base/i18n/LanguageTag.js +1 -1
- package/src/sap/base/i18n/date/TimezoneUtils.js +1 -1
- package/src/sap/base/util/restricted/_CancelablePromise.js +1 -1
- package/src/sap/base/util/restricted/_castArray.js +1 -1
- package/src/sap/base/util/restricted/_compact.js +1 -1
- package/src/sap/base/util/restricted/_curry.js +1 -1
- package/src/sap/base/util/restricted/_debounce.js +1 -1
- package/src/sap/base/util/restricted/_difference.js +1 -1
- package/src/sap/base/util/restricted/_differenceBy.js +1 -1
- package/src/sap/base/util/restricted/_differenceWith.js +1 -1
- package/src/sap/base/util/restricted/_flatMap.js +1 -1
- package/src/sap/base/util/restricted/_flatMapDeep.js +1 -1
- package/src/sap/base/util/restricted/_flatMapDepth.js +1 -1
- package/src/sap/base/util/restricted/_flatten.js +1 -1
- package/src/sap/base/util/restricted/_flattenDeep.js +1 -1
- package/src/sap/base/util/restricted/_flattenDepth.js +1 -1
- package/src/sap/base/util/restricted/_intersection.js +1 -1
- package/src/sap/base/util/restricted/_intersectionBy.js +1 -1
- package/src/sap/base/util/restricted/_intersectionWith.js +1 -1
- package/src/sap/base/util/restricted/_isEqual.js +1 -1
- package/src/sap/base/util/restricted/_isEqualWith.js +1 -1
- package/src/sap/base/util/restricted/_isNil.js +1 -1
- package/src/sap/base/util/restricted/_max.js +1 -1
- package/src/sap/base/util/restricted/_merge.js +1 -1
- package/src/sap/base/util/restricted/_mergeWith.js +1 -1
- package/src/sap/base/util/restricted/_min.js +1 -1
- package/src/sap/base/util/restricted/_omit.js +1 -1
- package/src/sap/base/util/restricted/_pick.js +1 -1
- package/src/sap/base/util/restricted/_pickBy.js +1 -1
- package/src/sap/base/util/restricted/_throttle.js +1 -1
- package/src/sap/base/util/restricted/_toArray.js +1 -1
- package/src/sap/base/util/restricted/_union.js +1 -1
- package/src/sap/base/util/restricted/_unionBy.js +1 -1
- package/src/sap/base/util/restricted/_unionWith.js +1 -1
- package/src/sap/base/util/restricted/_uniq.js +1 -1
- package/src/sap/base/util/restricted/_uniqBy.js +1 -1
- package/src/sap/base/util/restricted/_uniqWith.js +1 -1
- package/src/sap/base/util/restricted/_without.js +1 -1
- package/src/sap/base/util/restricted/_xor.js +1 -1
- package/src/sap/base/util/restricted/_xorBy.js +1 -1
- package/src/sap/base/util/restricted/_xorWith.js +1 -1
- package/src/sap/base/util/restricted/_zipObject.js +1 -1
- package/src/sap/base/util/restricted/_zipObjectDeep.js +1 -1
- package/src/sap/ui/Device.js +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/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/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 +1 -1
- package/src/sap/ui/core/BusyIndicator.js +1 -1
- package/src/sap/ui/core/Component.js +1 -1
- 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 +1 -1
- package/src/sap/ui/core/Control.js +1 -1
- package/src/sap/ui/core/Core.js +1 -1
- 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/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 +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 +1 -1
- package/src/sap/ui/core/Manifest.js +1 -1
- package/src/sap/ui/core/Message.js +1 -1
- 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 +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 +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/date/UI5Date.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/FormatUtils.js +1 -1
- package/src/sap/ui/core/format/NumberFormat.js +28 -0
- package/src/sap/ui/core/format/TimezoneUtil.js +1 -1
- package/src/sap/ui/core/getCompatibilityVersion.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/mvc/HTMLView.js +1 -1
- package/src/sap/ui/core/mvc/JSONView.js +1 -1
- package/src/sap/ui/core/mvc/JSView.js +1 -1
- package/src/sap/ui/core/mvc/TemplateView.js +1 -1
- package/src/sap/ui/core/mvc/View.js +1 -1
- package/src/sap/ui/core/mvc/XMLView.js +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/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/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/webc/WebComponent.js +1 -1
- package/src/sap/ui/core/webc/WebComponentMetadata.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 +11 -4
- package/src/sap/ui/model/CompositeDataState.js +1 -1
- package/src/sap/ui/model/CompositeType.js +17 -3
- 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/PropertyBinding.js +21 -4
- 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/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/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 +1 -1
- package/src/sap/ui/model/odata/type/Decimal.js +1 -1
- package/src/sap/ui/model/odata/type/Double.js +1 -1
- package/src/sap/ui/model/odata/type/Guid.js +1 -1
- package/src/sap/ui/model/odata/type/Int.js +1 -1
- package/src/sap/ui/model/odata/type/Int16.js +1 -1
- package/src/sap/ui/model/odata/type/Int32.js +1 -1
- package/src/sap/ui/model/odata/type/Int64.js +1 -1
- package/src/sap/ui/model/odata/type/ODataType.js +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/v2/Context.js +1 -1
- package/src/sap/ui/model/odata/v2/ODataAnnotations.js +1 -1
- package/src/sap/ui/model/odata/v2/ODataModel.js +1 -1
- package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +1 -1
- package/src/sap/ui/model/odata/v4/Context.js +1 -1
- package/src/sap/ui/model/odata/v4/ODataBinding.js +2 -0
- package/src/sap/ui/model/odata/v4/ODataContextBinding.js +1 -1
- package/src/sap/ui/model/odata/v4/ODataListBinding.js +48 -17
- package/src/sap/ui/model/odata/v4/ODataMetaModel.js +1 -1
- package/src/sap/ui/model/odata/v4/ODataModel.js +5 -1
- package/src/sap/ui/model/odata/v4/ODataParentBinding.js +2 -1
- package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +5 -4
- 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 +48 -4
- 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 +39 -1
- package/src/sap/ui/model/xml/XMLModel.js +1 -1
- package/src/sap/ui/qunit/utils/ControlIterator.js +1 -1
- package/src/sap/ui/qunit/utils/MemoryLeakCheck.js +1 -1
- package/src/sap/ui/test/generic/TestBase.js +1 -1
- package/src/sap/ui/util/Storage.js +1 -1
- package/test/sap/ui/core/demokit/sample/MessageManager/ODataBackendMessagesComp/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/sample/matcher/BindingPath/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/sample/matcher/Descendant/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/sample/matcher/I18NText/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/sample/matcher/LabelFor/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/sample/odata/v4/Products/data/UnitsOfMeasure.json +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/01/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/02/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/03/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/04/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/05/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/06/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/07/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/08/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/09/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/10/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/11/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/12/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/13/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/14/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/databinding/15/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/mockserver/01/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/mockserver/02/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/mockserver/03/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/mockserver/04/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/01/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/02/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/03/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/04/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/05/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/06/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/07/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/08/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/09/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/10/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/11/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/12/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/13/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/14/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/15/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/16/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/navigation/17/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/01/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/02/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/03/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/04/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/05/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/06/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/07/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/08/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/09/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/10/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/odatav4/11/ui5.yaml +1 -1
- package/test/sap/ui/core/demokit/tutorial/troubleshooting/01/ui5.yaml +1 -1
- package/test/sap/ui/core/internal/samples/odata/v2/Products/Main.view.xml +1 -1
- package/test/sap/ui/core/qunit/CompositeBinding.qunit.js +67 -0
- package/test/sap/ui/core/qunit/model/PropertyBinding.qunit.js +50 -1
- package/test/sap/ui/core/qunit/odata/v2/ODataModel.integration.qunit.js +256 -2
- package/test/sap/ui/core/qunit/odata/v4/ODataBinding.qunit.js +5 -1
- package/test/sap/ui/core/qunit/odata/v4/ODataListBinding.qunit.js +96 -9
- package/test/sap/ui/core/qunit/odata/v4/ODataModel.integration.qunit.js +180 -25
- package/test/sap/ui/core/qunit/odata/v4/ODataPropertyBinding.qunit.js +46 -16
- package/test/sap/ui/core/qunit/types/CompositeType.qunit.js +6 -0
- package/test/sap/ui/core/qunit/types/NumberFormat.qunit.js +43 -0
- package/test/sap/ui/core/qunit/types/NumberFormatCurrencies.qunit.js +21 -0
- package/test/sap/ui/core/qunit/types/Types.qunit.js +176 -0
- package/test/sap/ui/core/relnotes/changes-1.121.json +20 -0
|
@@ -102,7 +102,7 @@ sap.ui.define([
|
|
|
102
102
|
* @extends sap.ui.model.TreeBinding
|
|
103
103
|
* @hideconstructor
|
|
104
104
|
* @public
|
|
105
|
-
* @version 1.121.
|
|
105
|
+
* @version 1.121.4
|
|
106
106
|
*/
|
|
107
107
|
var ODataTreeBinding = TreeBinding.extend("sap.ui.model.odata.v2.ODataTreeBinding", /** @lends sap.ui.model.odata.v2.ODataTreeBinding.prototype */ {
|
|
108
108
|
|
|
@@ -152,6 +152,7 @@ sap.ui.define([
|
|
|
152
152
|
* {@link sap.ui.model.odata.v4.ODataListBinding#updateAnalyticalInfo} (but without
|
|
153
153
|
* validation here)
|
|
154
154
|
* <li> '$$canonicalPath' with value <code>true</code>
|
|
155
|
+
* <li> '$$clearSelectionOnFilter' with value <code>true</code>
|
|
155
156
|
* <li> '$$groupId' with allowed values as specified in {@link #checkGroupId}
|
|
156
157
|
* <li> '$$updateGroupId' with allowed values as specified in {@link #checkGroupId}
|
|
157
158
|
* <li> '$$inheritExpandSelect' with allowed values <code>false</code> and <code>true</code>
|
|
@@ -233,6 +234,7 @@ sap.ui.define([
|
|
|
233
234
|
});
|
|
234
235
|
// falls through
|
|
235
236
|
case "$$canonicalPath":
|
|
237
|
+
case "$$clearSelectionOnFilter":
|
|
236
238
|
case "$$noPatch":
|
|
237
239
|
case "$$ownRequest":
|
|
238
240
|
case "$$patchWithoutSideEffects":
|
|
@@ -74,7 +74,7 @@ sap.ui.define([
|
|
|
74
74
|
* @mixes sap.ui.model.odata.v4.ODataParentBinding
|
|
75
75
|
* @public
|
|
76
76
|
* @since 1.37.0
|
|
77
|
-
* @version 1.121.
|
|
77
|
+
* @version 1.121.4
|
|
78
78
|
*
|
|
79
79
|
* @borrows sap.ui.model.odata.v4.ODataBinding#getGroupId as #getGroupId
|
|
80
80
|
* @borrows sap.ui.model.odata.v4.ODataBinding#getRootBinding as #getRootBinding
|
|
@@ -57,7 +57,7 @@ sap.ui.define([
|
|
|
57
57
|
* @mixes sap.ui.model.odata.v4.ODataParentBinding
|
|
58
58
|
* @public
|
|
59
59
|
* @since 1.37.0
|
|
60
|
-
* @version 1.121.
|
|
60
|
+
* @version 1.121.4
|
|
61
61
|
* @borrows sap.ui.model.odata.v4.ODataBinding#getGroupId as #getGroupId
|
|
62
62
|
* @borrows sap.ui.model.odata.v4.ODataBinding#getRootBinding as #getRootBinding
|
|
63
63
|
* @borrows sap.ui.model.odata.v4.ODataBinding#getUpdateGroupId as #getUpdateGroupId
|
|
@@ -115,8 +115,8 @@ sap.ui.define([
|
|
|
115
115
|
|
|
116
116
|
mParameters = _Helper.clone(mParameters) || {};
|
|
117
117
|
this.checkBindingParameters(mParameters, ["$$aggregation", "$$canonicalPath",
|
|
118
|
-
"$$
|
|
119
|
-
"$$patchWithoutSideEffects", "$$sharedRequest", "$$updateGroupId"]);
|
|
118
|
+
"$$clearSelectionOnFilter", "$$getKeepAliveContext", "$$groupId", "$$operationMode",
|
|
119
|
+
"$$ownRequest", "$$patchWithoutSideEffects", "$$sharedRequest", "$$updateGroupId"]);
|
|
120
120
|
const aFilters = _Helper.toArray(vFilters);
|
|
121
121
|
if (mParameters.$$aggregation && aFilters[0] === Filter.NONE) {
|
|
122
122
|
throw new Error("Cannot combine Filter.NONE with $$aggregation");
|
|
@@ -310,8 +310,9 @@ sap.ui.define([
|
|
|
310
310
|
|
|
311
311
|
/**
|
|
312
312
|
* Applies the given map of parameters to this binding's parameters and triggers the
|
|
313
|
-
* creation of a new cache if called with a change reason. Since 1.111.0,
|
|
314
|
-
* deselected
|
|
313
|
+
* creation of a new cache if called with a change reason. Since 1.111.0, all contexts (incl.
|
|
314
|
+
* the header context) are deselected if the binding parameter '$$clearSelectionOnFilter' is set
|
|
315
|
+
* and '$filter', '$search', or <code>$$aggregation.search</code> parameters have changed
|
|
315
316
|
*
|
|
316
317
|
* @param {object} mParameters
|
|
317
318
|
* Map of binding parameters, {@link sap.ui.model.odata.v4.ODataModel#constructor}
|
|
@@ -341,6 +342,11 @@ sap.ui.define([
|
|
|
341
342
|
}
|
|
342
343
|
sApply = _AggregationHelper.buildApply(mParameters.$$aggregation).$apply;
|
|
343
344
|
}
|
|
345
|
+
|
|
346
|
+
const bResetSelection = this.mParameters?.$$clearSelectionOnFilter
|
|
347
|
+
&& (mParameters.$filter !== this.mParameters.$filter
|
|
348
|
+
|| mParameters.$search !== this.mParameters.$search
|
|
349
|
+
|| mParameters.$$aggregation?.search !== this.mParameters.$$aggregation?.search);
|
|
344
350
|
this.mQueryOptions = this.oModel.buildQueryOptions(mParameters, true);
|
|
345
351
|
this.oQueryOptionsPromise = undefined; // @see #doFetchOrGetQueryOptions
|
|
346
352
|
this.mParameters = mParameters; // store mParameters at binding after validation
|
|
@@ -363,14 +369,14 @@ sap.ui.define([
|
|
|
363
369
|
return;
|
|
364
370
|
}
|
|
365
371
|
|
|
372
|
+
if (bResetSelection) {
|
|
373
|
+
this.resetSelection();
|
|
374
|
+
}
|
|
366
375
|
this.removeCachesAndMessages("");
|
|
367
376
|
this.fetchCache(this.oContext);
|
|
368
377
|
this.reset(sChangeReason);
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
// Update after the refresh event, otherwise $count is fetched before the request
|
|
372
|
-
this.oHeaderContext.checkUpdate();
|
|
373
|
-
}
|
|
378
|
+
// Update after the refresh event, otherwise $count is fetched before the request
|
|
379
|
+
this.oHeaderContext?.checkUpdate();
|
|
374
380
|
};
|
|
375
381
|
|
|
376
382
|
/**
|
|
@@ -1991,7 +1997,9 @@ sap.ui.define([
|
|
|
1991
1997
|
|
|
1992
1998
|
/**
|
|
1993
1999
|
* Filters the list with the given filters. Since 1.97.0, if filters are unchanged, no request
|
|
1994
|
-
* is sent, regardless of pending changes. Since 1.111.0,
|
|
2000
|
+
* is sent, regardless of pending changes. Since 1.111.0, all contexts (incl. the header
|
|
2001
|
+
* context) are deselected, but (since 1.120.13) only if the binding parameter
|
|
2002
|
+
* '$$clearSelectionOnFilter' is set.
|
|
1995
2003
|
*
|
|
1996
2004
|
* If there are pending changes that cannot be ignored, an error is thrown. Use
|
|
1997
2005
|
* {@link #hasPendingChanges} to check if there are such pending changes. If there are, call
|
|
@@ -2096,15 +2104,15 @@ sap.ui.define([
|
|
|
2096
2104
|
return this;
|
|
2097
2105
|
}
|
|
2098
2106
|
|
|
2107
|
+
if (this.mParameters.$$clearSelectionOnFilter) {
|
|
2108
|
+
this.resetSelection();
|
|
2109
|
+
}
|
|
2099
2110
|
this.createReadGroupLock(this.getGroupId(), true);
|
|
2100
2111
|
this.removeCachesAndMessages("");
|
|
2101
2112
|
this.fetchCache(this.oContext);
|
|
2102
2113
|
this.reset(ChangeReason.Filter);
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
// Update after the refresh event, otherwise $count is fetched before the request
|
|
2106
|
-
this.oHeaderContext.checkUpdate();
|
|
2107
|
-
}
|
|
2114
|
+
// Update after the refresh event, otherwise $count is fetched before the request
|
|
2115
|
+
this.oHeaderContext?.checkUpdate();
|
|
2108
2116
|
|
|
2109
2117
|
return this;
|
|
2110
2118
|
};
|
|
@@ -4091,6 +4099,23 @@ sap.ui.define([
|
|
|
4091
4099
|
});
|
|
4092
4100
|
};
|
|
4093
4101
|
|
|
4102
|
+
/**
|
|
4103
|
+
* Sets the selection state of all contexts (including the header context) to not selected.
|
|
4104
|
+
*
|
|
4105
|
+
* @private
|
|
4106
|
+
*/
|
|
4107
|
+
ODataListBinding.prototype.resetSelection = function () {
|
|
4108
|
+
this.oHeaderContext?.setSelected(false);
|
|
4109
|
+
|
|
4110
|
+
return this.aContexts.filter(function (oContext) {
|
|
4111
|
+
return oContext;
|
|
4112
|
+
}).concat(Object.values(this.mPreviousContextsByPath).filter(function (oContext) {
|
|
4113
|
+
return oContext.isEffectivelyKeptAlive();
|
|
4114
|
+
})).forEach(function (oContext) {
|
|
4115
|
+
oContext.setSelected(false);
|
|
4116
|
+
});
|
|
4117
|
+
};
|
|
4118
|
+
|
|
4094
4119
|
/**
|
|
4095
4120
|
* Restores all created elements, the bFirstCreateAtEnd flag and the iCreatedContexts,
|
|
4096
4121
|
* iActiveContexts counters from cache to this list binding.
|
|
@@ -4130,6 +4155,10 @@ sap.ui.define([
|
|
|
4130
4155
|
this.sResumeChangeReason = undefined;
|
|
4131
4156
|
|
|
4132
4157
|
if (bRefresh) {
|
|
4158
|
+
if (this.mParameters.$$clearSelectionOnFilter
|
|
4159
|
+
&& sResumeChangeReason === ChangeReason.Filter) {
|
|
4160
|
+
this.resetSelection();
|
|
4161
|
+
}
|
|
4133
4162
|
this.removeCachesAndMessages("");
|
|
4134
4163
|
if (sResumeAction === "onChange") {
|
|
4135
4164
|
this.onChange();
|
|
@@ -4272,7 +4301,9 @@ sap.ui.define([
|
|
|
4272
4301
|
* proposal <a href="https://issues.oasis-open.org/browse/ODATA-1452">ODATA-1452</a>, then
|
|
4273
4302
|
* <code>ODataUtils.formatLiteral(sSearch, "Edm.String");</code> should be used to encapsulate
|
|
4274
4303
|
* the whole search string beforehand (see {@link
|
|
4275
|
-
* sap.ui.model.odata.v4.ODataUtils.formatLiteral}).
|
|
4304
|
+
* sap.ui.model.odata.v4.ODataUtils.formatLiteral}). Since 1.120.13, all contexts, including
|
|
4305
|
+
* the header context are deselected if the '$$clearSelectionOnFilter' binding parameter is
|
|
4306
|
+
* set and the search parameter is changed.
|
|
4276
4307
|
* @param {boolean} [oAggregation.subtotalsAtBottomOnly]
|
|
4277
4308
|
* Tells whether subtotals for aggregatable properties are displayed at the bottom only, as a
|
|
4278
4309
|
* separate row after all children, when a group level node is expanded (since 1.86.0);
|
|
@@ -235,7 +235,7 @@ sap.ui.define([
|
|
|
235
235
|
* @extends sap.ui.model.Model
|
|
236
236
|
* @public
|
|
237
237
|
* @since 1.37.0
|
|
238
|
-
* @version 1.121.
|
|
238
|
+
* @version 1.121.4
|
|
239
239
|
*/
|
|
240
240
|
ODataModel = Model.extend("sap.ui.model.odata.v4.ODataModel",
|
|
241
241
|
/** @lends sap.ui.model.odata.v4.ODataModel.prototype */{
|
|
@@ -895,6 +895,10 @@ sap.ui.define([
|
|
|
895
895
|
* Whether a binding relative to an {@link sap.ui.model.odata.v4.Context} uses the canonical
|
|
896
896
|
* path computed from its context's path for data service requests; only the value
|
|
897
897
|
* <code>true</code> is allowed.
|
|
898
|
+
* @param {boolean} [mParameters.$$clearSelectionOnFilter]
|
|
899
|
+
* Whether the selection state of the list binding is cleared when a filter is changed; this
|
|
900
|
+
* includes dynamic filters, '$filter', '$search', and <code>$$aggregation.search</code>.
|
|
901
|
+
* Supported since 1.120.13.
|
|
898
902
|
* @param {boolean} [mParameters.$$getKeepAliveContext]
|
|
899
903
|
* Whether this binding is considered for a match when {@link #getKeepAliveContext} is called;
|
|
900
904
|
* only the value <code>true</code> is allowed. Must not be combined with <code>$apply</code>,
|
|
@@ -327,7 +327,8 @@ sap.ui.define([
|
|
|
327
327
|
|
|
328
328
|
/**
|
|
329
329
|
* Changes this binding's parameters and refreshes the binding. Since 1.111.0, a list binding's
|
|
330
|
-
* header context is deselected.
|
|
330
|
+
* header context is deselected, but (since 1.120.13) only if the binding parameter
|
|
331
|
+
* '$$clearSelectionOnFilter' is set and the '$filter' or '$search' parameter is changed.
|
|
331
332
|
*
|
|
332
333
|
* If there are pending changes that cannot be ignored, an error is thrown. Use
|
|
333
334
|
* {@link #hasPendingChanges} to check if there are such pending changes. If there are, call
|
|
@@ -42,7 +42,7 @@ sap.ui.define([
|
|
|
42
42
|
* @mixes sap.ui.model.odata.v4.ODataBinding
|
|
43
43
|
* @public
|
|
44
44
|
* @since 1.37.0
|
|
45
|
-
* @version 1.121.
|
|
45
|
+
* @version 1.121.4
|
|
46
46
|
* @borrows sap.ui.model.odata.v4.ODataBinding#getGroupId as #getGroupId
|
|
47
47
|
* @borrows sap.ui.model.odata.v4.ODataBinding#getRootBinding as #getRootBinding
|
|
48
48
|
* @borrows sap.ui.model.odata.v4.ODataBinding#getUpdateGroupId as #getUpdateGroupId
|
|
@@ -338,7 +338,8 @@ sap.ui.define([
|
|
|
338
338
|
});
|
|
339
339
|
if (bForceUpdate && vValue.isFulfilled()) {
|
|
340
340
|
if (vType && vType.isFulfilled && vType.isFulfilled()) {
|
|
341
|
-
|
|
341
|
+
PropertyBinding.prototype.setType
|
|
342
|
+
.call(this, vType.getResult(), this.sInternalType);
|
|
342
343
|
}
|
|
343
344
|
this.vValue = vValue.getResult();
|
|
344
345
|
}
|
|
@@ -352,7 +353,7 @@ sap.ui.define([
|
|
|
352
353
|
|
|
353
354
|
if (oCallToken === that.oCheckUpdateCallToken) { // latest call to checkUpdateInternal
|
|
354
355
|
that.oCheckUpdateCallToken = undefined;
|
|
355
|
-
that
|
|
356
|
+
PropertyBinding.prototype.setType.call(that, oType, that.sInternalType);
|
|
356
357
|
if (oCallToken.forceUpdate || that.vValue !== vValue) {
|
|
357
358
|
that.bInitial = false;
|
|
358
359
|
that.vValue = vValue;
|
|
@@ -687,7 +688,7 @@ sap.ui.define([
|
|
|
687
688
|
// Note: this.oType => this.sReducedPath
|
|
688
689
|
&& _Helper.getMetaPath(this.oModel.resolve(this.sPath, oContext))
|
|
689
690
|
!== _Helper.getMetaPath(this.sReducedPath)) {
|
|
690
|
-
this
|
|
691
|
+
PropertyBinding.prototype.setType.call(this, undefined, this.sInternalType);
|
|
691
692
|
}
|
|
692
693
|
this.sReducedPath = undefined;
|
|
693
694
|
}
|
|
@@ -227,7 +227,7 @@ sap.ui.define([
|
|
|
227
227
|
*
|
|
228
228
|
* @extends sap.ui.model.Model
|
|
229
229
|
* @public
|
|
230
|
-
* @version 1.121.
|
|
230
|
+
* @version 1.121.4
|
|
231
231
|
*/
|
|
232
232
|
var ResourceModel = Model.extend("sap.ui.model.resource.ResourceModel", /** @lends sap.ui.model.resource.ResourceModel.prototype */ {
|
|
233
233
|
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
sap.ui.define([
|
|
9
9
|
"sap/base/Log",
|
|
10
10
|
"sap/base/util/each",
|
|
11
|
+
"sap/base/util/extend",
|
|
11
12
|
"sap/base/util/isEmptyObject",
|
|
12
13
|
"sap/ui/core/Lib",
|
|
13
14
|
"sap/ui/core/format/NumberFormat",
|
|
@@ -15,7 +16,8 @@ sap.ui.define([
|
|
|
15
16
|
"sap/ui/model/FormatException",
|
|
16
17
|
"sap/ui/model/ParseException",
|
|
17
18
|
"sap/ui/model/ValidateException"
|
|
18
|
-
], function(Log, each, isEmptyObject, Library, NumberFormat, CompositeType, FormatException, ParseException,
|
|
19
|
+
], function(Log, each, extend, isEmptyObject, Library, NumberFormat, CompositeType, FormatException, ParseException,
|
|
20
|
+
ValidateException) {
|
|
19
21
|
"use strict";
|
|
20
22
|
|
|
21
23
|
/**
|
|
@@ -32,7 +34,7 @@ sap.ui.define([
|
|
|
32
34
|
* @extends sap.ui.model.CompositeType
|
|
33
35
|
*
|
|
34
36
|
* @author SAP SE
|
|
35
|
-
* @version 1.121.
|
|
37
|
+
* @version 1.121.4
|
|
36
38
|
*
|
|
37
39
|
* @public
|
|
38
40
|
* @param {object} [oFormatOptions]
|
|
@@ -209,11 +211,15 @@ sap.ui.define([
|
|
|
209
211
|
|
|
210
212
|
/**
|
|
211
213
|
* Create formatters used by this type
|
|
214
|
+
*
|
|
212
215
|
* @private
|
|
213
216
|
*/
|
|
214
|
-
Currency.prototype._createFormats = function() {
|
|
217
|
+
Currency.prototype._createFormats = function () {
|
|
215
218
|
var oSourceOptions = this.oFormatOptions.source;
|
|
216
|
-
this.oOutputFormat = NumberFormat.getCurrencyInstance(this.
|
|
219
|
+
this.oOutputFormat = NumberFormat.getCurrencyInstance(this.iScale >= 0
|
|
220
|
+
// ensures that amount scale wins over the decimals for the unit
|
|
221
|
+
? extend({}, {maxFractionDigits : this.iScale}, this.oFormatOptions)
|
|
222
|
+
: this.oFormatOptions);
|
|
217
223
|
if (oSourceOptions) {
|
|
218
224
|
if (isEmptyObject(oSourceOptions)) {
|
|
219
225
|
oSourceOptions = {
|
|
@@ -276,6 +282,44 @@ sap.ui.define([
|
|
|
276
282
|
return [];
|
|
277
283
|
};
|
|
278
284
|
|
|
285
|
+
/**
|
|
286
|
+
* Gets the indices of the binding parts of this composite type in order to determine those parts
|
|
287
|
+
* whose types are required for formatting.
|
|
288
|
+
* If for example the type of the amount part is a {@link sap.ui.model.odata.type.Decimal} with a
|
|
289
|
+
* <code>scale</code> constraint less than the currency part's decimal places, then the amount's
|
|
290
|
+
* scale is used.
|
|
291
|
+
*
|
|
292
|
+
* @returns {int[]}
|
|
293
|
+
* The indices of the parts with a relevant type for this composite type, or an empty array if
|
|
294
|
+
* the format option <code>showNumber</code> is <code>false</code>
|
|
295
|
+
*
|
|
296
|
+
* @override sap.ui.model.CompositeType#getPartsListeningToTypeChanges
|
|
297
|
+
* @see #processPartTypes
|
|
298
|
+
*/
|
|
299
|
+
Currency.prototype.getPartsListeningToTypeChanges = function () {
|
|
300
|
+
// Only the first part is of interest because it may have a type with another scale than the
|
|
301
|
+
// decimal places for the currency part
|
|
302
|
+
return this.bShowNumber ? [0] : [];
|
|
303
|
+
};
|
|
304
|
+
|
|
305
|
+
/**
|
|
306
|
+
* Processes the types of this composite type's parts. Remembers the <code>scale</code>
|
|
307
|
+
* constraint of the amount part's type to consider it while formatting.
|
|
308
|
+
*
|
|
309
|
+
* @param {sap.ui.model.SimpleType[]} aPartTypes The types of the composite binding parts
|
|
310
|
+
*
|
|
311
|
+
* @override sap.ui.model.CompositeType#processPartTypes
|
|
312
|
+
* @protected
|
|
313
|
+
* @since 1.123.0
|
|
314
|
+
*/
|
|
315
|
+
Currency.prototype.processPartTypes = function (aPartTypes) {
|
|
316
|
+
const iOldScale = this.iScale;
|
|
317
|
+
this.iScale = aPartTypes[0]?.oConstraints?.scale;
|
|
318
|
+
if (iOldScale !== this.iScale) {
|
|
319
|
+
this._createFormats();
|
|
320
|
+
}
|
|
321
|
+
};
|
|
322
|
+
|
|
279
323
|
return Currency;
|
|
280
324
|
|
|
281
325
|
});
|
|
@@ -27,7 +27,7 @@ sap.ui.define([
|
|
|
27
27
|
* @extends sap.ui.model.SimpleType
|
|
28
28
|
*
|
|
29
29
|
* @author SAP SE
|
|
30
|
-
* @version 1.121.
|
|
30
|
+
* @version 1.121.4
|
|
31
31
|
*
|
|
32
32
|
* @public
|
|
33
33
|
* @param {object} [oFormatOptions] Formatting options. For a list of all available options, see {@link sap.ui.core.format.DateFormat.getDateInstance DateFormat}.
|
|
@@ -19,7 +19,7 @@ sap.ui.define(['./Date', 'sap/ui/core/format/DateFormat'],
|
|
|
19
19
|
* @extends sap.ui.model.type.Date
|
|
20
20
|
*
|
|
21
21
|
* @author SAP SE
|
|
22
|
-
* @version 1.121.
|
|
22
|
+
* @version 1.121.4
|
|
23
23
|
*
|
|
24
24
|
* @public
|
|
25
25
|
* @param {object} [oFormatOptions] Formatting options. For a list of all available options, see {@link sap.ui.core.format.DateFormat.getDateTimeInstance DateFormat}.
|
|
@@ -19,7 +19,7 @@ sap.ui.define(['./DateInterval', 'sap/ui/core/format/DateFormat'],
|
|
|
19
19
|
* @extends sap.ui.model.type.DateInterval
|
|
20
20
|
*
|
|
21
21
|
* @author SAP SE
|
|
22
|
-
* @version 1.121.
|
|
22
|
+
* @version 1.121.4
|
|
23
23
|
*
|
|
24
24
|
* @public
|
|
25
25
|
* @param {object} [oFormatOptions] Formatting options. For a list of all available options, see {@link sap.ui.core.format.DateFormat.getDateTimeInstance DateFormat}.
|
|
@@ -19,7 +19,7 @@ sap.ui.define(['./Date', 'sap/ui/core/format/DateFormat'],
|
|
|
19
19
|
* @extends sap.ui.model.type.Date
|
|
20
20
|
*
|
|
21
21
|
* @author SAP SE
|
|
22
|
-
* @version 1.121.
|
|
22
|
+
* @version 1.121.4
|
|
23
23
|
*
|
|
24
24
|
* @public
|
|
25
25
|
* @param {object} [oFormatOptions] Formatting options. For a list of all available options, see {@link sap.ui.core.format.DateFormat.getTimeInstance DateFormat}.
|
|
@@ -19,7 +19,7 @@ sap.ui.define(['./DateInterval', 'sap/ui/core/format/DateFormat'],
|
|
|
19
19
|
* @extends sap.ui.model.type.DateInterval
|
|
20
20
|
*
|
|
21
21
|
* @author SAP SE
|
|
22
|
-
* @version 1.121.
|
|
22
|
+
* @version 1.121.4
|
|
23
23
|
*
|
|
24
24
|
* @public
|
|
25
25
|
* @param {object} [oFormatOptions] Formatting options. For a list of all available options, see {@link sap.ui.core.format.DateFormat.getTimeInstance DateFormat}.
|
|
@@ -49,7 +49,7 @@ sap.ui.define([
|
|
|
49
49
|
*
|
|
50
50
|
*
|
|
51
51
|
* @author SAP SE
|
|
52
|
-
* @version 1.121.
|
|
52
|
+
* @version 1.121.4
|
|
53
53
|
*
|
|
54
54
|
* @public
|
|
55
55
|
* @param {object} [oFormatOptions]
|
|
@@ -137,6 +137,10 @@ sap.ui.define([
|
|
|
137
137
|
oFormatOptionsMerged = extend({}, this.oFormatOptions, oFormatArgs);
|
|
138
138
|
}
|
|
139
139
|
|
|
140
|
+
if (this.iScale >= 0) {
|
|
141
|
+
// ensures that amount scale wins over the decimals for the unit
|
|
142
|
+
oFormatOptionsMerged = extend({}, {maxFractionDigits: this.iScale}, oFormatOptionsMerged);
|
|
143
|
+
}
|
|
140
144
|
// Only subclasses of the Unit type use a NumberFormat instance cache.
|
|
141
145
|
// By default a new NumberFormat instance is created everytime.
|
|
142
146
|
if (this.getMetadata().getClass() !== Unit) {
|
|
@@ -242,6 +246,26 @@ sap.ui.define([
|
|
|
242
246
|
}
|
|
243
247
|
};
|
|
244
248
|
|
|
249
|
+
/**
|
|
250
|
+
* Gets the indices of the binding parts of this composite type in order to determine those parts
|
|
251
|
+
* whose types are required for formatting.
|
|
252
|
+
* If for example the type of the amount part is a {@link sap.ui.model.odata.type.Decimal} with a
|
|
253
|
+
* <code>scale</scale> constraint less than the unit part's decimal places, then the amount's scale is
|
|
254
|
+
* used.
|
|
255
|
+
*
|
|
256
|
+
* @returns {int[]}
|
|
257
|
+
* The indices of the parts with a relevant type for this composite type, or an empty array if
|
|
258
|
+
* the format option <code>showNumber</code> is <code>false</code>
|
|
259
|
+
*
|
|
260
|
+
* @override sap.ui.model.CompositeType#getPartsListeningToTypeChanges
|
|
261
|
+
* @see #processPartTypes
|
|
262
|
+
*/
|
|
263
|
+
Unit.prototype.getPartsListeningToTypeChanges = function () {
|
|
264
|
+
// Only the first part is of interest because it may have a type with another scale than the
|
|
265
|
+
// decimal places for the unit part
|
|
266
|
+
return this.bShowNumber ? [0] : [];
|
|
267
|
+
};
|
|
268
|
+
|
|
245
269
|
/**
|
|
246
270
|
* Parse a string value to an array containing measure and unit. Parsing of other
|
|
247
271
|
* internal types than 'string' is not supported by the Unit type.
|
|
@@ -284,6 +308,20 @@ sap.ui.define([
|
|
|
284
308
|
return vResult;
|
|
285
309
|
};
|
|
286
310
|
|
|
311
|
+
/**
|
|
312
|
+
* Processes the types of this composite type's parts. Remembers the <code>scale</code>
|
|
313
|
+
* constraint of the amount part's type to consider it while formatting.
|
|
314
|
+
*
|
|
315
|
+
* @param {sap.ui.model.SimpleType[]} aPartTypes The types of the composite binding parts
|
|
316
|
+
*
|
|
317
|
+
* @override sap.ui.model.CompositeType#processPartTypes
|
|
318
|
+
* @protected
|
|
319
|
+
* @since 1.122.0
|
|
320
|
+
*/
|
|
321
|
+
Unit.prototype.processPartTypes = function (aPartTypes) {
|
|
322
|
+
this.iScale = aPartTypes[0]?.oConstraints?.scale;
|
|
323
|
+
};
|
|
324
|
+
|
|
287
325
|
Unit.prototype.validateValue = function(vValue) {
|
|
288
326
|
if (this.oConstraints) {
|
|
289
327
|
var oBundle = Library.getResourceBundleFor("sap.ui.core"),
|