@openui5/sap.ui.core 1.93.3 → 1.96.2
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 +13 -2
- package/.reuse/dep5 +6 -11
- package/THIRDPARTY.txt +10 -16
- package/package.json +1 -1
- package/src/jquery.sap.global.js +5 -2
- 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/jquery.sap.stubs.js +2 -1
- package/src/jquery.sap.trace.js +2 -1
- package/src/sap/base/i18n/ResourceBundle.js +6 -2
- package/src/sap/base/strings/whitespaceReplacer.js +52 -0
- 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 +37 -42
- package/src/sap/ui/Global.js +8 -7
- package/src/sap/ui/base/DataType.js +14 -8
- 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 +9 -6
- package/src/sap/ui/base/Interface.js +3 -49
- package/src/sap/ui/base/ManagedObject.js +12 -7
- 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 +49 -4
- package/src/sap/ui/base/ObjectPool.js +1 -1
- package/src/sap/ui/base/syncXHRFix.js +2 -1
- package/src/sap/ui/core/.library +5 -5
- package/src/sap/ui/core/AppCacheBuster.js +4 -4
- package/src/sap/ui/core/BusyIndicator.js +1 -11
- package/src/sap/ui/core/Component.js +300 -140
- package/src/sap/ui/core/ComponentContainer.js +24 -8
- package/src/sap/ui/core/ComponentMetadata.js +14 -3
- package/src/sap/ui/core/ComponentSupport.js +1 -1
- package/src/sap/ui/core/Configuration.js +67 -31
- package/src/sap/ui/core/Control.js +1 -1
- package/src/sap/ui/core/Core.js +103 -25
- package/src/sap/ui/core/CustomData.js +1 -1
- package/src/sap/ui/core/CustomizingConfiguration.js +35 -260
- package/src/sap/ui/core/DeclarativeSupport.js +3 -2
- package/src/sap/ui/core/Element.js +1 -1
- package/src/sap/ui/core/ElementMetadata.js +4 -2
- package/src/sap/ui/core/EnabledPropagator.js +91 -73
- package/src/sap/ui/core/EventBus.js +1 -1
- package/src/sap/ui/core/ExtensionPoint.js +7 -14
- package/src/sap/ui/core/Fragment.js +30 -32
- 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 +7 -8
- package/src/sap/ui/core/IconPool.js +26 -1097
- package/src/sap/ui/core/IconRenderer.js +6 -6
- 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 +26 -4
- package/src/sap/ui/core/LocaleData.js +1 -1
- package/src/sap/ui/core/Manifest.js +4 -61
- package/src/sap/ui/core/Message.js +1 -1
- package/src/sap/ui/core/Patcher.js +27 -3
- package/src/sap/ui/core/Placeholder.js +28 -15
- package/src/sap/ui/core/RenderManager.js +36 -6
- package/src/sap/ui/core/Renderer.js +13 -3
- package/src/sap/ui/core/ResizeHandler.js +1 -1
- package/src/sap/ui/core/ScrollBar.js +2 -2
- package/src/sap/ui/core/SeparatorItem.js +1 -1
- package/src/sap/ui/core/ShortcutHintsMixin.js +14 -7
- 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 +42 -16
- 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 +2 -2
- package/src/sap/ui/core/XMLCompositeMetadata.js +2 -2
- package/src/sap/ui/core/XMLTemplateProcessor.js +116 -41
- package/src/sap/ui/core/_IconRegistry.js +1148 -0
- package/src/sap/ui/core/delegate/ItemNavigation.js +1 -1
- package/src/sap/ui/core/delegate/ScrollEnablement.js +6 -3
- 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 +2 -2
- package/src/sap/ui/core/dnd/DropInfo.js +1 -1
- package/src/sap/ui/core/format/NumberFormat.js +16 -1
- package/src/sap/ui/core/hyphenation/Hyphenation.js +73 -221
- package/src/sap/ui/core/hyphenation/HyphenationTestingWords.js +11 -10
- 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 +13 -15
- 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_de.properties +1 -1
- package/src/sap/ui/core/messagebundle_fr.properties +1 -1
- package/src/sap/ui/core/messagebundle_it.properties +1 -1
- package/src/sap/ui/core/messagebundle_pl.properties +1 -1
- package/src/sap/ui/core/messagebundle_th.properties +2 -2
- package/src/sap/ui/core/mvc/Controller.js +38 -19
- package/src/sap/ui/core/mvc/ControllerExtensionProvider.js +30 -32
- package/src/sap/ui/core/mvc/ControllerMetadata.js +18 -18
- package/src/sap/ui/core/mvc/HTMLView.js +2 -2
- package/src/sap/ui/core/mvc/JSONView.js +2 -2
- package/src/sap/ui/core/mvc/JSView.js +2 -2
- package/src/sap/ui/core/mvc/TemplateView.js +2 -2
- package/src/sap/ui/core/mvc/View.js +58 -85
- package/src/sap/ui/core/mvc/XMLView.js +2 -2
- package/src/sap/ui/core/mvc/XMLViewRenderer.js +17 -20
- 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/History.js +10 -2
- package/src/sap/ui/core/routing/Router.js +8 -1
- package/src/sap/ui/core/routing/Target.js +13 -0
- package/src/sap/ui/core/routing/Targets.js +13 -2
- package/src/sap/ui/core/routing/async/Route.js +1 -1
- package/src/sap/ui/core/routing/async/Target.js +353 -259
- 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/BootSupportTool.js +11 -0
- package/src/sap/ui/core/support/InteractionTree.css +4 -0
- 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/ViewInfo.css +599 -0
- package/src/sap/ui/core/support/controls/InteractionTree.js +352 -222
- package/src/sap/ui/core/support/controls/ObjectViewer.js +3 -41
- package/src/sap/ui/core/support/controls/TimelineOverview.js +49 -24
- package/src/sap/ui/core/support/controls/TreeViewer.js +12 -58
- package/src/sap/ui/core/support/plugins/ControlTree.js +59 -68
- package/src/sap/ui/core/support/plugins/Debugging.js +9 -11
- package/src/sap/ui/core/support/plugins/Interaction.js +2 -2
- package/src/sap/ui/core/support/plugins/LocalStorage.js +1 -1
- package/src/sap/ui/core/support/plugins/Performance.js +147 -75
- package/src/sap/ui/core/support/plugins/Selector.js +19 -24
- package/src/sap/ui/core/support/plugins/TechInfo.js +5 -5
- package/src/sap/ui/core/support/plugins/Trace.js +95 -32
- package/src/sap/ui/core/support/plugins/ViewInfo.js +9 -73
- package/src/sap/ui/core/support/support.css +109 -14
- package/src/sap/ui/core/support/support.html +6 -2
- package/src/sap/ui/core/support/techinfo/TechnicalInfo.fragment.xml +1 -0
- package/src/sap/ui/core/support/techinfo/TechnicalInfo.js +149 -72
- package/src/sap/ui/core/themes/base/Icon.less +9 -0
- package/src/sap/ui/core/themes/base/fonts/SAP-icons.woff2 +0 -0
- package/src/sap/ui/core/theming/Parameters.js +6 -4
- 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 +10 -28
- package/src/sap/ui/core/tmpl/TemplateControl.js +4 -4
- package/src/sap/ui/core/tmpl/_parsePath.js +35 -0
- package/src/sap/ui/core/util/AsyncHintsHelper.js +1 -1
- package/src/sap/ui/core/util/DraftEnabledMockServer.js +9 -4
- 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 +5 -5
- package/src/sap/ui/core/util/MockServerAnnotationsHandler.js +3 -2
- package/src/sap/ui/core/util/PasteHelper.js +1 -1
- package/src/sap/ui/core/util/XMLPreprocessor.js +11 -12
- package/src/sap/ui/core/util/reflection/BaseTreeModifier.js +136 -63
- package/src/sap/ui/core/util/reflection/JsControlTreeModifier.js +170 -153
- package/src/sap/ui/core/util/reflection/XmlTreeModifier.js +424 -293
- 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 +10 -4
- package/src/sap/ui/debug/DebugEnv.js +3 -4
- package/src/sap/ui/debug/Highlighter.js +8 -2
- package/src/sap/ui/debug/PropertyList.css +55 -0
- package/src/sap/ui/debug/PropertyList.js +111 -182
- package/src/sap/ui/model/Binding.js +174 -118
- package/src/sap/ui/model/ClientContextBinding.js +1 -1
- package/src/sap/ui/model/ClientListBinding.js +1 -3
- package/src/sap/ui/model/ClientModel.js +4 -4
- package/src/sap/ui/model/ClientPropertyBinding.js +4 -2
- package/src/sap/ui/model/ClientTreeBinding.js +15 -9
- package/src/sap/ui/model/ClientTreeBindingAdapter.js +28 -23
- package/src/sap/ui/model/CompositeBinding.js +98 -77
- package/src/sap/ui/model/CompositeDataState.js +2 -2
- package/src/sap/ui/model/CompositeType.js +2 -2
- package/src/sap/ui/model/Context.js +4 -2
- package/src/sap/ui/model/ContextBinding.js +6 -14
- package/src/sap/ui/model/DataState.js +2 -2
- package/src/sap/ui/model/Filter.js +255 -53
- package/src/sap/ui/model/FilterOperator.js +1 -1
- package/src/sap/ui/model/FilterProcessor.js +27 -17
- package/src/sap/ui/model/FilterType.js +1 -1
- package/src/sap/ui/model/ListBinding.js +180 -117
- package/src/sap/ui/model/MetaModel.js +4 -9
- package/src/sap/ui/model/Model.js +345 -294
- package/src/sap/ui/model/PropertyBinding.js +92 -58
- package/src/sap/ui/model/SelectionModel.js +2 -2
- package/src/sap/ui/model/SimpleType.js +2 -2
- package/src/sap/ui/model/Sorter.js +1 -1
- package/src/sap/ui/model/SorterProcessor.js +1 -1
- package/src/sap/ui/model/StaticBinding.js +1 -1
- package/src/sap/ui/model/TreeAutoExpandMode.js +2 -2
- package/src/sap/ui/model/TreeBinding.js +1 -1
- package/src/sap/ui/model/TreeBindingAdapter.js +251 -100
- package/src/sap/ui/model/TreeBindingCompatibilityAdapter.js +16 -9
- package/src/sap/ui/model/TreeBindingUtils.js +1 -0
- package/src/sap/ui/model/Type.js +1 -1
- package/src/sap/ui/model/analytics/AnalyticalBinding.js +8 -4
- package/src/sap/ui/model/analytics/AnalyticalTreeBindingAdapter.js +1 -1
- package/src/sap/ui/model/analytics/AnalyticalVersionInfo.js +1 -1
- package/src/sap/ui/model/analytics/BatchResponseCollector.js +1 -1
- package/src/sap/ui/model/analytics/ODataModelAdapter.js +1 -1
- package/src/sap/ui/model/analytics/odata4analytics.js +34 -25
- package/src/sap/ui/model/base/ManagedObjectModel.js +4 -0
- package/src/sap/ui/model/json/JSONListBinding.js +8 -5
- package/src/sap/ui/model/json/JSONModel.js +24 -15
- package/src/sap/ui/model/json/JSONPropertyBinding.js +4 -3
- package/src/sap/ui/model/json/JSONTreeBinding.js +1 -1
- package/src/sap/ui/model/message/MessageListBinding.js +6 -3
- package/src/sap/ui/model/message/MessageModel.js +23 -15
- package/src/sap/ui/model/message/MessagePropertyBinding.js +2 -2
- package/src/sap/ui/model/odata/AnnotationHelper.js +1 -1
- package/src/sap/ui/model/odata/AnnotationParser.js +1 -1
- package/src/sap/ui/model/odata/CountMode.js +1 -1
- package/src/sap/ui/model/odata/Filter.js +1 -1
- package/src/sap/ui/model/odata/ODataAnnotations.js +2 -2
- package/src/sap/ui/model/odata/ODataContextBinding.js +1 -1
- package/src/sap/ui/model/odata/ODataListBinding.js +1 -1
- package/src/sap/ui/model/odata/ODataMessageParser.js +2 -2
- package/src/sap/ui/model/odata/ODataMetaModel.js +5 -3
- package/src/sap/ui/model/odata/ODataMetadata.js +2 -2
- package/src/sap/ui/model/odata/ODataModel.js +8 -7
- package/src/sap/ui/model/odata/ODataPropertyBinding.js +1 -1
- package/src/sap/ui/model/odata/ODataTreeBinding.js +65 -33
- package/src/sap/ui/model/odata/ODataTreeBindingAdapter.js +1 -1
- package/src/sap/ui/model/odata/ODataTreeBindingFlat.js +2 -2
- package/src/sap/ui/model/odata/ODataUtils.js +13 -11
- package/src/sap/ui/model/odata/OperationMode.js +1 -1
- package/src/sap/ui/model/odata/_AnnotationHelperExpression.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/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 +81 -9
- package/src/sap/ui/model/odata/v2/ODataAnnotations.js +3 -3
- package/src/sap/ui/model/odata/v2/ODataContextBinding.js +39 -49
- package/src/sap/ui/model/odata/v2/ODataListBinding.js +236 -73
- package/src/sap/ui/model/odata/v2/ODataModel.js +314 -164
- package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +110 -97
- package/src/sap/ui/model/odata/v2/_CreatedContextsCache.js +129 -0
- package/src/sap/ui/model/odata/v4/Context.js +6 -3
- package/src/sap/ui/model/odata/v4/ODataBinding.js +5 -6
- package/src/sap/ui/model/odata/v4/ODataContextBinding.js +117 -40
- package/src/sap/ui/model/odata/v4/ODataListBinding.js +95 -15
- package/src/sap/ui/model/odata/v4/ODataMetaModel.js +44 -31
- package/src/sap/ui/model/odata/v4/ODataModel.js +86 -78
- package/src/sap/ui/model/odata/v4/ODataParentBinding.js +47 -28
- package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +11 -7
- package/src/sap/ui/model/odata/v4/_AnnotationHelperExpression.js +10 -3
- package/src/sap/ui/model/odata/v4/lib/_AggregationCache.js +8 -1
- package/src/sap/ui/model/odata/v4/lib/_Cache.js +24 -16
- package/src/sap/ui/model/odata/v4/lib/_Helper.js +32 -30
- package/src/sap/ui/model/odata/v4/lib/_Requestor.js +52 -17
- package/src/sap/ui/model/odata/v4/lib/_V2Requestor.js +2 -2
- package/src/sap/ui/model/resource/ResourceModel.js +6 -2
- package/src/sap/ui/model/resource/ResourcePropertyBinding.js +1 -1
- package/src/sap/ui/model/type/Boolean.js +2 -2
- package/src/sap/ui/model/type/Currency.js +2 -2
- package/src/sap/ui/model/type/Date.js +9 -3
- package/src/sap/ui/model/type/DateInterval.js +4 -2
- package/src/sap/ui/model/type/DateTime.js +2 -2
- package/src/sap/ui/model/type/DateTimeInterval.js +2 -2
- package/src/sap/ui/model/type/FileSize.js +4 -2
- package/src/sap/ui/model/type/Float.js +4 -2
- package/src/sap/ui/model/type/Integer.js +4 -2
- package/src/sap/ui/model/type/String.js +2 -2
- package/src/sap/ui/model/type/Time.js +2 -2
- package/src/sap/ui/model/type/TimeInterval.js +2 -2
- package/src/sap/ui/model/type/Unit.js +14 -7
- package/src/sap/ui/model/xml/XMLListBinding.js +15 -9
- package/src/sap/ui/model/xml/XMLModel.js +70 -41
- package/src/sap/ui/model/xml/XMLPropertyBinding.js +4 -4
- package/src/sap/ui/model/xml/XMLTreeBinding.js +5 -4
- package/src/sap/ui/performance/trace/Interaction.js +30 -15
- package/src/sap/ui/performance/trace/initTraces.js +1 -1
- package/src/sap/ui/qunit/QUnitUtils.js +3 -2
- package/src/sap/ui/qunit/utils/ControlIterator.js +1 -1
- package/src/sap/ui/qunit/utils/MemoryLeakCheck.js +9 -11
- package/src/sap/ui/test/TestUtils.js +11 -4
- package/src/sap/ui/test/actions/Drag.js +6 -2
- package/src/sap/ui/test/actions/Drop.js +6 -2
- package/src/sap/ui/test/actions/EnterText.js +6 -0
- package/src/sap/ui/test/actions/Press.js +6 -0
- package/src/sap/ui/test/actions/Scroll.js +6 -0
- package/src/sap/ui/test/autowaiter/_resourceWaiter.js +4 -4
- package/src/sap/ui/test/launchers/componentLauncher.js +0 -4
- package/src/sap/ui/test/matchers/I18NText.js +29 -11
- package/src/sap/ui/test/opaQunit.js +5 -0
- package/src/sap/ui/thirdparty/crossroads.js +6 -4
- package/src/sap/ui/thirdparty/hyphenopoly/Hyphenopoly.js +1196 -0
- package/src/sap/ui/thirdparty/hyphenopoly/Hyphenopoly_Loader.js +797 -0
- package/src/sap/ui/thirdparty/hyphenopoly/hyphenEngine.asm.js +108 -127
- package/src/sap/ui/thirdparty/hyphenopoly/hyphenEngine.wasm +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/bg.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/ca.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/da.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/de.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/el-monoton.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/en-us.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/es.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/et.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/fi.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/fr.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/hi.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/hr.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/hu.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/it.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/lt.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/nb-no.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/nl.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/pt.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/ru.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/sl.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/sv.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/th.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/tr.hpb +0 -0
- package/src/sap/ui/thirdparty/hyphenopoly/patterns/uk.hpb +0 -0
- package/src/sap/ui/thirdparty/jquery.js +9 -1
- package/src/sap/ui/thirdparty/qunit-2.js +1 -1
- package/src/sap/ui/thirdparty/qunit.js +1 -1
- package/src/sap/ui/util/Mobile.js +2 -20
- package/src/sap/ui/util/Storage.js +1 -1
- package/src/sap/ui/util/isCrossOriginURL.js +16 -6
- package/src/sap-ui-core-nojQuery.js +1 -1
- package/src/sap-ui-core.js +1 -1
- package/src/sap-ui-debug.js +3 -17
- package/ui5.yaml +5 -2
- package/src/sap/ui/core/support/plugins/MessageTest.js +0 -96
- package/src/sap/ui/thirdparty/hyphenopoly/hyphenopoly.bundle.js +0 -860
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
|
-
|
|
6
|
+
/*eslint-disable max-len */
|
|
7
7
|
sap.ui.define([
|
|
8
8
|
"sap/base/util/deepEqual",
|
|
9
9
|
"sap/base/util/each",
|
|
@@ -65,7 +65,7 @@ sap.ui.define([
|
|
|
65
65
|
* @extends sap.ui.base.Object
|
|
66
66
|
*
|
|
67
67
|
* @author SAP SE
|
|
68
|
-
* @version 1.
|
|
68
|
+
* @version 1.96.2
|
|
69
69
|
*
|
|
70
70
|
* @public
|
|
71
71
|
* @alias sap.ui.model.DataState
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
|
-
|
|
6
|
+
/*eslint-disable max-len */
|
|
7
7
|
// Provides a filter for list bindings
|
|
8
8
|
sap.ui.define([
|
|
9
9
|
'sap/ui/base/Object',
|
|
@@ -16,22 +16,30 @@ sap.ui.define([
|
|
|
16
16
|
/**
|
|
17
17
|
* Constructor for Filter.
|
|
18
18
|
*
|
|
19
|
-
* You either pass a single object literal with the filter parameters or use the individual
|
|
20
|
-
* No matter which variant is used, only certain combinations of
|
|
21
|
-
* (the following list uses the names from the object literal):
|
|
19
|
+
* You either pass a single object literal with the filter parameters or use the individual
|
|
20
|
+
* constructor arguments. No matter which variant is used, only certain combinations of
|
|
21
|
+
* parameters are supported (the following list uses the names from the object literal):
|
|
22
22
|
* <ul>
|
|
23
|
-
* <li>A <code>path</code>, <code>operator</code> and one or two values (<code>value1</code>,
|
|
24
|
-
*
|
|
25
|
-
* <li>
|
|
26
|
-
*
|
|
23
|
+
* <li>A <code>path</code>, <code>operator</code> and one or two values (<code>value1</code>,
|
|
24
|
+
* <code>value2</code>), depending on the operator
|
|
25
|
+
* <li>A <code>path</code> and a custom filter function <code>test</code>
|
|
26
|
+
* <li>An array of other filters named <code>filters</code> and a Boolean flag <code>and</code>
|
|
27
|
+
* that specifies whether to combine the filters with an AND (<code>true</code>) or an OR
|
|
28
|
+
* (<code>false</code>) operator.
|
|
27
29
|
* </ul>
|
|
28
30
|
* An error will be logged to the console if an invalid combination of parameters is provided.
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
31
|
+
*
|
|
32
|
+
* Please note that a model implementation may not support a custom filter function, e.g. if the
|
|
33
|
+
* model does not perform client-side filtering. It also depends on the model implementation if
|
|
34
|
+
* the filtering is case sensitive or not. Client models filter case insensitive compared to the
|
|
35
|
+
* OData models which filter case sensitive by default. See particular model documentation for
|
|
36
|
+
* details.
|
|
37
|
+
*
|
|
38
|
+
* The filter operators {@link sap.ui.model.FilterOperator.Any "Any"} and
|
|
39
|
+
* {@link sap.ui.model.FilterOperator.All "All"} are only supported in V4 OData models. When
|
|
40
|
+
* creating a filter instance with these filter operators, the argument <code>variable</code>
|
|
41
|
+
* only accepts a string identifier and <code>condition</code> needs to be another filter
|
|
42
|
+
* instance.
|
|
35
43
|
*
|
|
36
44
|
* @example <caption>Using an object with a path, an operator and one or two values</caption>
|
|
37
45
|
*
|
|
@@ -73,8 +81,10 @@ sap.ui.define([
|
|
|
73
81
|
* and: true|false
|
|
74
82
|
* })
|
|
75
83
|
*
|
|
76
|
-
* @example <caption>The filter operators <code>Any</code> and <code>All</code> map to the OData
|
|
77
|
-
*
|
|
84
|
+
* @example <caption>The filter operators <code>Any</code> and <code>All</code> map to the OData
|
|
85
|
+
* V4 lambda operators <code>any</code> and <code>all</code>. They take a variable and another
|
|
86
|
+
* filter as parameter and evaluate it on either a collection property or a collection of
|
|
87
|
+
* entities.</caption>
|
|
78
88
|
*
|
|
79
89
|
* // find Orders where all of the 'Items' in the order have a 'Quantity' > 100
|
|
80
90
|
* // (assumes that Filter and FilterOperator have been declared as dependencies, see previous examples)
|
|
@@ -89,13 +99,16 @@ sap.ui.define([
|
|
|
89
99
|
* })
|
|
90
100
|
* });
|
|
91
101
|
*
|
|
92
|
-
* @example <caption>For the filter operator <code>Any</code> either both a lambda
|
|
102
|
+
* @example <caption>For the filter operator <code>Any</code> either both a lambda
|
|
103
|
+
* <code>variable</code> and a <code>condition</code> have to be given or neither.</caption>
|
|
93
104
|
* new Filter({
|
|
94
105
|
* path: 'Items',
|
|
95
106
|
* operator: FilterOperator.Any
|
|
96
107
|
* });
|
|
97
108
|
*
|
|
98
|
-
* @example <caption>Legacy signature: Same as above, but using individual constructor
|
|
109
|
+
* @example <caption>Legacy signature: Same as above, but using individual constructor
|
|
110
|
+
* arguments. Not supported for filter operators <code>Any</code> and <code>All</code>.
|
|
111
|
+
* </caption>
|
|
99
112
|
*
|
|
100
113
|
* new sap.ui.model.Filter(sPath, sOperator, vValue1, vValue2);
|
|
101
114
|
* OR
|
|
@@ -106,21 +119,69 @@ sap.ui.define([
|
|
|
106
119
|
* @class
|
|
107
120
|
* Filter for the list binding.
|
|
108
121
|
*
|
|
109
|
-
* @param {object|string|sap.ui.model.Filter[]} vFilterInfo
|
|
110
|
-
*
|
|
111
|
-
* @param {
|
|
112
|
-
*
|
|
113
|
-
* @param {
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
* @param {
|
|
118
|
-
*
|
|
119
|
-
*
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
*
|
|
123
|
-
*
|
|
122
|
+
* @param {object|string|sap.ui.model.Filter[]} vFilterInfo
|
|
123
|
+
* Filter info object or a path or an array of filters
|
|
124
|
+
* @param {string} [vFilterInfo.path]
|
|
125
|
+
* Binding path for this filter
|
|
126
|
+
* @param {function(any):boolean} [vFilterInfo.test]
|
|
127
|
+
* Function used for the client-side filtering of items. It should return a Boolean indicating
|
|
128
|
+
* whether the current item passes the filter. If no test function is given, a default test
|
|
129
|
+
* function is used, based on the given filter operator and the comparator function.
|
|
130
|
+
* @param {function(any,any):number} [vFilterInfo.comparator]
|
|
131
|
+
* Function used to compare two values for equality and order during client-side filtering.
|
|
132
|
+
* Two values are given as parameters. The function is expected to return:
|
|
133
|
+
* <ul>
|
|
134
|
+
* <li>a negative number if the first value is smaller than the second value,
|
|
135
|
+
* <li><code>0</code> if the two values are equal,
|
|
136
|
+
* <li>a positive number if the first value is larger than the second value,
|
|
137
|
+
* <li><code>NaN</code> for non-comparable values.
|
|
138
|
+
* </ul>
|
|
139
|
+
* If no function is given, {@link sap.ui.model.Filter.defaultComparator} is used.
|
|
140
|
+
* @param {sap.ui.model.FilterOperator} [vFilterInfo.operator]
|
|
141
|
+
* Operator used for the filter
|
|
142
|
+
* @param {any} [vFilterInfo.value1]
|
|
143
|
+
* First value to use with the given filter operator
|
|
144
|
+
* @param {any} [vFilterInfo.value2]
|
|
145
|
+
* Second value to use with the given filter operator, used only for the
|
|
146
|
+
* {@link sap.ui.model.FilterOperator.BT "BT" between} and
|
|
147
|
+
* {@link sap.ui.model.FilterOperator.NB "NB" not between} filter operators
|
|
148
|
+
* @param {string} [vFilterInfo.variable]
|
|
149
|
+
* The variable name used in lambda operators ({@link sap.ui.model.FilterOperator.Any "Any"}
|
|
150
|
+
* and {@link sap.ui.model.FilterOperator.All "All"})
|
|
151
|
+
* @param {sap.ui.model.Filter} [vFilterInfo.condition]
|
|
152
|
+
* A filter instance which will be used as the condition for lambda
|
|
153
|
+
* operators ({@link sap.ui.model.FilterOperator.Any "Any"} and
|
|
154
|
+
* {@link sap.ui.model.FilterOperator.All "All"})
|
|
155
|
+
* @param {sap.ui.model.Filter[]} [vFilterInfo.filters]
|
|
156
|
+
* An array of filters on which the logical conjunction is applied
|
|
157
|
+
* @param {boolean} [vFilterInfo.and=false]
|
|
158
|
+
* Indicates whether an "AND" logical conjunction is applied on the filters. If it's not set
|
|
159
|
+
* or set to <code>false</code>, an "OR" conjunction is applied.
|
|
160
|
+
* @param {boolean} [vFilterInfo.caseSensitive]
|
|
161
|
+
* Indicates whether a string value should be compared case sensitive or not. The handling of
|
|
162
|
+
* <code>undefined</code> depends on the model implementation.
|
|
163
|
+
* @param {sap.ui.model.FilterOperator|function(any):boolean|boolean} [vOperator]
|
|
164
|
+
* Either a filter operator or a custom filter function or
|
|
165
|
+
* a <code>boolean</code> flag that defines how to combine multiple filters
|
|
166
|
+
* @param {any} [vValue1]
|
|
167
|
+
* First value to use with the given filter operator
|
|
168
|
+
* @param {any} [vValue2]
|
|
169
|
+
* Second value to use with the given filter operator, used only for the
|
|
170
|
+
* {@link sap.ui.model.FilterOperator.BT "BT" between} and
|
|
171
|
+
* {@link sap.ui.model.FilterOperator.NB "NB" not between} filter operators
|
|
172
|
+
* @throws {Error}
|
|
173
|
+
* for the following incorrect combinations of filter operators and conditions:
|
|
174
|
+
* <ul>
|
|
175
|
+
* <li>"Any", if only a lambda variable or only a condition is given
|
|
176
|
+
* <li>"Any" or "All": If
|
|
177
|
+
* <ul>
|
|
178
|
+
* <li>the <code>vFilterInfo</code> parameter is not in object notation,
|
|
179
|
+
* <li><code>vFilterInfo.variable</code> is not a string,
|
|
180
|
+
* <li><code>vFilterInfo.condition</code> is not an instance of
|
|
181
|
+
* {@link sap.ui.model.Filter}.
|
|
182
|
+
* </ul>
|
|
183
|
+
* </ul>
|
|
184
|
+
*
|
|
124
185
|
* @public
|
|
125
186
|
* @alias sap.ui.model.Filter
|
|
126
187
|
* @extends sap.ui.base.Object
|
|
@@ -175,18 +236,18 @@ sap.ui.define([
|
|
|
175
236
|
}
|
|
176
237
|
} else if (this.sOperator === FilterOperator.All) {
|
|
177
238
|
this._checkLambdaArgumentTypes();
|
|
178
|
-
} else
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
}
|
|
185
|
-
} else if (!this.aFilters && this.sPath !== undefined && ((this.sOperator && this.oValue1 !== undefined) || this.fnTest)) {
|
|
186
|
-
this._bMultiFilter = false;
|
|
187
|
-
} else {
|
|
188
|
-
Log.error("Wrong parameters defined for filter.");
|
|
239
|
+
} else if (Array.isArray(this.aFilters) && !this.sPath && !this.sOperator
|
|
240
|
+
&& !this.oValue1 && !this.oValue2) {
|
|
241
|
+
this._bMultiFilter = true;
|
|
242
|
+
if ( !this.aFilters.every(isFilter) ) {
|
|
243
|
+
Log.error("Filter in aggregation of multi filter has to be instance of"
|
|
244
|
+
+ " sap.ui.model.Filter");
|
|
189
245
|
}
|
|
246
|
+
} else if (!this.aFilters && this.sPath !== undefined
|
|
247
|
+
&& ((this.sOperator && this.oValue1 !== undefined) || this.fnTest)) {
|
|
248
|
+
this._bMultiFilter = false;
|
|
249
|
+
} else {
|
|
250
|
+
Log.error("Wrong parameters defined for filter.");
|
|
190
251
|
}
|
|
191
252
|
}
|
|
192
253
|
});
|
|
@@ -239,7 +300,11 @@ sap.ui.define([
|
|
|
239
300
|
};
|
|
240
301
|
|
|
241
302
|
/**
|
|
242
|
-
* Returns an AST for the filter
|
|
303
|
+
* Returns an AST for the filter.
|
|
304
|
+
*
|
|
305
|
+
* @param {boolean} bIncludeOrigin Whether the origin should be included in the AST
|
|
306
|
+
*
|
|
307
|
+
* @returns {object} An AST for the filter
|
|
243
308
|
* @private
|
|
244
309
|
*/
|
|
245
310
|
Filter.prototype.getAST = function (bIncludeOrigin) {
|
|
@@ -305,7 +370,7 @@ sap.ui.define([
|
|
|
305
370
|
sOp = this.bAnd ? Op.And : Op.Or;
|
|
306
371
|
sOrigOp = this.bAnd ? "AND" : "OR";
|
|
307
372
|
oResult = this.aFilters[this.aFilters.length - 1].getAST(bIncludeOrigin);
|
|
308
|
-
for (var i = this.aFilters.length - 2; i >= 0
|
|
373
|
+
for (var i = this.aFilters.length - 2; i >= 0; i--) {
|
|
309
374
|
oResult = logical(sOp, this.aFilters[i].getAST(bIncludeOrigin), oResult);
|
|
310
375
|
}
|
|
311
376
|
} else { // other filter
|
|
@@ -382,18 +447,157 @@ sap.ui.define([
|
|
|
382
447
|
return oResult;
|
|
383
448
|
};
|
|
384
449
|
|
|
450
|
+
/**
|
|
451
|
+
* Returns the comparator function as provided on construction of this filter, see
|
|
452
|
+
* {@link sap.ui.model.Filter#constructor}, parameter <code>vFilterInfo.comparator</code>.
|
|
453
|
+
*
|
|
454
|
+
* @returns {function(any):boolean|undefined} The comparator function
|
|
455
|
+
* @public
|
|
456
|
+
* @since 1.96.0
|
|
457
|
+
*/
|
|
458
|
+
Filter.prototype.getComparator = function () {
|
|
459
|
+
return this.fnCompare;
|
|
460
|
+
};
|
|
461
|
+
|
|
462
|
+
/**
|
|
463
|
+
* Returns the filter instance which is used as the condition for lambda operators, see
|
|
464
|
+
* {@link sap.ui.model.Filter#constructor}, parameter <code>vFilterInfo.condition</code>.
|
|
465
|
+
*
|
|
466
|
+
* @returns {sap.ui.model.Filter|undefined} The filter instance
|
|
467
|
+
* @public
|
|
468
|
+
* @since 1.96.0
|
|
469
|
+
*/
|
|
470
|
+
Filter.prototype.getCondition = function () {
|
|
471
|
+
return this.oCondition;
|
|
472
|
+
};
|
|
473
|
+
|
|
474
|
+
/**
|
|
475
|
+
* Returns the filter operator used for this filter, see
|
|
476
|
+
* {@link sap.ui.model.Filter#constructor}, parameter <code>vFilterInfo.operator</code> or
|
|
477
|
+
* <code>vOperator</code>.
|
|
478
|
+
*
|
|
479
|
+
*
|
|
480
|
+
* @returns {sap.ui.model.FilterOperator|undefined} The operator
|
|
481
|
+
* @public
|
|
482
|
+
* @since 1.96.0
|
|
483
|
+
*/
|
|
484
|
+
Filter.prototype.getOperator = function () {
|
|
485
|
+
return this.sOperator;
|
|
486
|
+
};
|
|
487
|
+
|
|
488
|
+
/**
|
|
489
|
+
* Returns the binding path for this filter, see
|
|
490
|
+
* {@link sap.ui.model.Filter#constructor}, parameter <code>vFilterInfo</code> or
|
|
491
|
+
* <code>vFilterInfo.path</code>.
|
|
492
|
+
*
|
|
493
|
+
* @returns {string|undefined} The binding path
|
|
494
|
+
* @public
|
|
495
|
+
* @since 1.96.0
|
|
496
|
+
*/
|
|
497
|
+
Filter.prototype.getPath = function () {
|
|
498
|
+
return this.sPath;
|
|
499
|
+
};
|
|
500
|
+
|
|
501
|
+
/**
|
|
502
|
+
* Returns the array of filters as specified on construction of this filter, see
|
|
503
|
+
* {@link sap.ui.model.Filter#constructor}, parameter <code>vFilterInfo.filters</code>
|
|
504
|
+
*
|
|
505
|
+
* @returns {sap.ui.model.Filter[]|undefined} The array of filters
|
|
506
|
+
* @public
|
|
507
|
+
* @since 1.96.0
|
|
508
|
+
*/
|
|
509
|
+
Filter.prototype.getFilters = function () {
|
|
510
|
+
return this.aFilters && this.aFilters.slice();
|
|
511
|
+
};
|
|
512
|
+
|
|
513
|
+
/**
|
|
514
|
+
* Returns the test function which is used to filter the items, see
|
|
515
|
+
* {@link sap.ui.model.Filter#constructor}, parameter <code>vFilterInfo.test</code>.
|
|
516
|
+
*
|
|
517
|
+
* @returns {function(any,any):boolean|undefined} The test function
|
|
518
|
+
* @public
|
|
519
|
+
* @since 1.96.0
|
|
520
|
+
*/
|
|
521
|
+
Filter.prototype.getTest = function () {
|
|
522
|
+
return this.fnTest;
|
|
523
|
+
};
|
|
524
|
+
|
|
525
|
+
/**
|
|
526
|
+
* Returns the first value that is used with the given filter operator, see
|
|
527
|
+
* {@link sap.ui.model.Filter#constructor}, parameter <code>vFilterInfo.value1</code> or
|
|
528
|
+
* <code>vValue1</code>.
|
|
529
|
+
*
|
|
530
|
+
* @returns {any} The first value
|
|
531
|
+
* @public
|
|
532
|
+
* @since 1.96.0
|
|
533
|
+
*/
|
|
534
|
+
Filter.prototype.getValue1 = function () {
|
|
535
|
+
return this.oValue1;
|
|
536
|
+
};
|
|
537
|
+
|
|
538
|
+
/**
|
|
539
|
+
* Returns the second value that is used with the given filter operator, see
|
|
540
|
+
* {@link sap.ui.model.Filter#constructor}, parameter <code>vFilterInfo.value2</code> or
|
|
541
|
+
* <code>vValue2</code>.
|
|
542
|
+
*
|
|
543
|
+
* @returns {any} The second value
|
|
544
|
+
* @public
|
|
545
|
+
* @since 1.96.0
|
|
546
|
+
*/
|
|
547
|
+
Filter.prototype.getValue2 = function () {
|
|
548
|
+
return this.oValue2;
|
|
549
|
+
};
|
|
550
|
+
|
|
551
|
+
/**
|
|
552
|
+
* Returns the variable name used in lambda operators, see
|
|
553
|
+
* {@link sap.ui.model.Filter#constructor}, parameter <code>vFilterInfo.variable</code>.
|
|
554
|
+
*
|
|
555
|
+
* @returns {string|undefined} The variable name
|
|
556
|
+
* @public
|
|
557
|
+
* @since 1.96.0
|
|
558
|
+
*/
|
|
559
|
+
Filter.prototype.getVariable = function () {
|
|
560
|
+
return this.sVariable;
|
|
561
|
+
};
|
|
562
|
+
|
|
563
|
+
/**
|
|
564
|
+
* Indicates whether an "AND" logical conjunction is applied on the filters, see
|
|
565
|
+
* {@link sap.ui.model.Filter#constructor}, parameter <code>vFilterInfo.and</code>.
|
|
566
|
+
*
|
|
567
|
+
* @returns {boolean} Whether "AND" is being applied
|
|
568
|
+
* @public
|
|
569
|
+
* @since 1.96.0
|
|
570
|
+
*/
|
|
571
|
+
Filter.prototype.isAnd = function () {
|
|
572
|
+
return !!this.bAnd;
|
|
573
|
+
};
|
|
574
|
+
|
|
575
|
+
/**
|
|
576
|
+
* Indicates whether a string value should be compared case sensitive, see
|
|
577
|
+
* {@link sap.ui.model.Filter#constructor}, parameter <code>vFilterInfo.caseSensitive</code>.
|
|
578
|
+
*
|
|
579
|
+
* @returns {boolean} Whether the string values should be compared case sensitive
|
|
580
|
+
* @public
|
|
581
|
+
* @since 1.96.0
|
|
582
|
+
*/
|
|
583
|
+
Filter.prototype.isCaseSensitive = function () {
|
|
584
|
+
return this.bCaseSensitive;
|
|
585
|
+
};
|
|
586
|
+
|
|
385
587
|
/**
|
|
386
588
|
* Compares two values
|
|
387
589
|
*
|
|
388
|
-
* This is the default comparator function used for
|
|
389
|
-
* constructor. It does compare just by using equal/less than/greater
|
|
390
|
-
* for null values, which are neither less or greater,
|
|
590
|
+
* This is the default comparator function used for client-side filtering, if no custom
|
|
591
|
+
* comparator is given in the constructor. It does compare just by using equal/less than/greater
|
|
592
|
+
* than with automatic type casting, except for null values, which are neither less or greater,
|
|
593
|
+
* and string values where localeCompare is used.
|
|
391
594
|
*
|
|
392
|
-
* The comparator method returns -1, 0, 1 for comparable values and NaN for non-comparable
|
|
595
|
+
* The comparator method returns -1, 0, 1 for comparable values and NaN for non-comparable
|
|
596
|
+
* values.
|
|
393
597
|
*
|
|
394
598
|
* @param {any} a the first value to compare
|
|
395
599
|
* @param {any} b the second value to compare
|
|
396
|
-
* @returns {
|
|
600
|
+
* @returns {number} -1, 0, 1 or NaN depending on the compare result
|
|
397
601
|
* @public
|
|
398
602
|
*/
|
|
399
603
|
Filter.defaultComparator = function(a, b) {
|
|
@@ -415,7 +619,5 @@ sap.ui.define([
|
|
|
415
619
|
return NaN;
|
|
416
620
|
};
|
|
417
621
|
|
|
418
|
-
|
|
419
622
|
return Filter;
|
|
420
|
-
|
|
421
623
|
});
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
|
-
|
|
6
|
+
/*eslint-disable max-len */
|
|
7
7
|
// Provides enumeration sap.ui.model.FilterOperator
|
|
8
8
|
sap.ui.define(function() {
|
|
9
9
|
"use strict";
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
|
-
|
|
6
|
+
/*eslint-disable max-len */
|
|
7
7
|
sap.ui.define(['./Filter', 'sap/base/Log'],
|
|
8
8
|
function(Filter, Log) {
|
|
9
9
|
"use strict";
|
|
@@ -198,34 +198,40 @@ sap.ui.define(['./Filter', 'sap/base/Log'],
|
|
|
198
198
|
bResult = false;
|
|
199
199
|
break;
|
|
200
200
|
}
|
|
201
|
-
} else {
|
|
201
|
+
} else if (bMatch) {
|
|
202
202
|
// if operator is OR, first matching filter breaks
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
break;
|
|
206
|
-
}
|
|
203
|
+
bResult = true;
|
|
204
|
+
break;
|
|
207
205
|
}
|
|
208
206
|
}
|
|
209
207
|
return bResult;
|
|
210
208
|
};
|
|
211
209
|
|
|
212
210
|
/**
|
|
213
|
-
* Normalize filter value
|
|
211
|
+
* Normalize filter value.
|
|
212
|
+
*
|
|
213
|
+
* @param {any} vValue
|
|
214
|
+
* The value to normalize
|
|
215
|
+
* @param {boolean} [bCaseSensitive=false]
|
|
216
|
+
* Whether the case should be considered when normalizing; only relevant when
|
|
217
|
+
* <code>oValue</code> is a string
|
|
218
|
+
*
|
|
219
|
+
* @returns {any} The normalized value
|
|
214
220
|
*
|
|
215
221
|
* @private
|
|
216
222
|
* @static
|
|
217
223
|
*/
|
|
218
|
-
FilterProcessor.normalizeFilterValue = function(
|
|
224
|
+
FilterProcessor.normalizeFilterValue = function(vValue, bCaseSensitive){
|
|
219
225
|
var sResult;
|
|
220
226
|
|
|
221
|
-
if (typeof
|
|
227
|
+
if (typeof vValue == "string") {
|
|
222
228
|
if (bCaseSensitive === undefined) {
|
|
223
229
|
bCaseSensitive = false;
|
|
224
230
|
}
|
|
225
|
-
if (this._normalizeCache[bCaseSensitive].hasOwnProperty(
|
|
226
|
-
return this._normalizeCache[bCaseSensitive][
|
|
231
|
+
if (this._normalizeCache[bCaseSensitive].hasOwnProperty(vValue)) {
|
|
232
|
+
return this._normalizeCache[bCaseSensitive][vValue];
|
|
227
233
|
}
|
|
228
|
-
sResult =
|
|
234
|
+
sResult = vValue;
|
|
229
235
|
if (!bCaseSensitive) {
|
|
230
236
|
sResult = sResult.toUpperCase();
|
|
231
237
|
}
|
|
@@ -234,17 +240,21 @@ sap.ui.define(['./Filter', 'sap/base/Log'],
|
|
|
234
240
|
// http://www.w3.org/TR/2012/WD-charmod-norm-20120501/#sec-ChoiceNFC
|
|
235
241
|
sResult = sResult.normalize("NFC");
|
|
236
242
|
|
|
237
|
-
this._normalizeCache[bCaseSensitive][
|
|
243
|
+
this._normalizeCache[bCaseSensitive][vValue] = sResult;
|
|
238
244
|
return sResult;
|
|
239
245
|
}
|
|
240
|
-
if (
|
|
241
|
-
return
|
|
246
|
+
if (vValue instanceof Date) {
|
|
247
|
+
return vValue.getTime();
|
|
242
248
|
}
|
|
243
|
-
return
|
|
249
|
+
return vValue;
|
|
244
250
|
};
|
|
245
251
|
|
|
246
252
|
/**
|
|
247
|
-
* Provides a JS filter function for the given filter
|
|
253
|
+
* Provides a JS filter function for the given filter.
|
|
254
|
+
*
|
|
255
|
+
* @param {sap.ui.model.Filter} oFilter The filter to provide the function for
|
|
256
|
+
*
|
|
257
|
+
* @returns {function} The filter function
|
|
248
258
|
* @private
|
|
249
259
|
* @static
|
|
250
260
|
*/
|