@openui5/sap.ui.core 1.94.0 → 1.97.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.json +15 -4
- package/.reuse/dep5 +12 -12
- package/THIRDPARTY.txt +21 -17
- 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 +2 -2
- package/src/jquery.sap.script.js +1 -1
- package/src/jquery.sap.storage.js +3 -3
- package/src/sap/base/i18n/ResourceBundle.js +6 -2
- 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 +15 -11
- package/src/sap/ui/Global.js +13 -17
- 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/Interface.js +1 -1
- package/src/sap/ui/base/ManagedObject.js +13 -8
- package/src/sap/ui/base/ManagedObjectMetadata.js +2 -2
- package/src/sap/ui/base/Metadata.js +1 -3
- package/src/sap/ui/base/Object.js +1 -1
- package/src/sap/ui/base/ObjectPool.js +1 -1
- package/src/sap/ui/core/.library +6 -32
- package/src/sap/ui/core/AppCacheBuster.js +8 -8
- package/src/sap/ui/core/BusyIndicator.js +1 -1
- package/src/sap/ui/core/Component.js +303 -135
- package/src/sap/ui/core/ComponentContainer.js +11 -7
- 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 +67 -31
- package/src/sap/ui/core/Control.js +2 -2
- package/src/sap/ui/core/Core.js +79 -15
- 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 +2 -6
- package/src/sap/ui/core/ElementMetadata.js +1 -1
- package/src/sap/ui/core/EnabledPropagator.js +1 -1
- package/src/sap/ui/core/EventBus.js +1 -1
- package/src/sap/ui/core/ExtensionPoint.js +6 -13
- package/src/sap/ui/core/Fragment.js +30 -32
- package/src/sap/ui/core/HTML.js +3 -3
- 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 +3 -3
- package/src/sap/ui/core/Manifest.js +2 -60
- 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 +4 -4
- package/src/sap/ui/core/RenderManager.js +38 -8
- 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 +4 -3
- package/src/sap/ui/core/SeparatorItem.js +1 -1
- package/src/sap/ui/core/ShortcutHintsMixin.js +14 -7
- package/src/sap/ui/core/ThemeCheck.js +2 -2
- package/src/sap/ui/core/Title.js +1 -1
- package/src/sap/ui/core/TooltipBase.js +1 -1
- package/src/sap/ui/core/UIArea.js +3 -3
- package/src/sap/ui/core/UIComponent.js +19 -11
- 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 +132 -43
- package/src/sap/ui/core/_IconRegistry.js +1148 -0
- package/src/sap/ui/core/cache/LRUPersistentCache.js +4 -2
- package/src/sap/ui/core/date/UniversalDateUtils.js +33 -0
- 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/NumberFormat.js +16 -1
- package/src/sap/ui/core/hyphenation/Hyphenation.js +61 -80
- package/src/sap/ui/core/library.js +5 -5
- package/src/sap/ui/core/message/ControlMessageProcessor.js +5 -5
- package/src/sap/ui/core/message/Message.js +1 -1
- package/src/sap/ui/core/message/MessageManager.js +13 -15
- package/src/sap/ui/core/message/MessageParser.js +1 -1
- package/src/sap/ui/core/message/MessageProcessor.js +22 -12
- package/src/sap/ui/core/messagebundle_de.properties +1 -1
- package/src/sap/ui/core/messagebundle_fr.properties +8 -8
- 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_ru.properties +21 -21
- package/src/sap/ui/core/messagebundle_th.properties +2 -2
- package/src/sap/ui/core/mvc/Controller.js +5 -5
- 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/Route.js +10 -1
- package/src/sap/ui/core/routing/Router.js +16 -6
- package/src/sap/ui/core/routing/Targets.js +26 -0
- package/src/sap/ui/core/routing/async/Route.js +6 -3
- package/src/sap/ui/core/routing/async/Target.js +28 -4
- package/src/sap/ui/core/routing/sync/Target.js +15 -0
- package/src/sap/ui/core/rules/Misc.support.js +51 -1
- package/src/sap/ui/core/rules/Rendering.support.js +1 -4
- package/src/sap/ui/core/rules/View.support.js +14 -46
- package/src/sap/ui/core/search/OpenSearchProvider.js +1 -1
- package/src/sap/ui/core/search/SearchProvider.js +1 -1
- package/src/sap/ui/core/service/Service.js +1 -1
- package/src/sap/ui/core/service/ServiceFactory.js +1 -1
- package/src/sap/ui/core/service/ServiceFactoryRegistry.js +1 -1
- package/src/sap/ui/core/support/Plugin.js +2 -2
- package/src/sap/ui/core/support/RuleEngineOpaExtension.js +0 -1
- package/src/sap/ui/core/support/Support.js +1 -1
- package/src/sap/ui/core/support/controls/TreeViewer.js +1 -1
- package/src/sap/ui/core/support/plugins/ControlTree.js +37 -43
- package/src/sap/ui/core/support/plugins/Interaction.js +1 -1
- package/src/sap/ui/core/support/plugins/LocalStorage.js +1 -1
- package/src/sap/ui/core/support/plugins/Performance.js +1 -2
- package/src/sap/ui/core/support/plugins/Selector.js +1 -1
- package/src/sap/ui/core/support/plugins/TechInfo.js +1 -1
- package/src/sap/ui/core/support/plugins/Trace.js +1 -1
- package/src/sap/ui/core/support/plugins/ViewInfo.js +2 -2
- package/src/sap/ui/core/support/support.css +2 -8
- package/src/sap/ui/core/support/techinfo/TechnicalInfo.fragment.xml +1 -0
- package/src/sap/ui/core/support/techinfo/TechnicalInfo.js +150 -73
- package/src/sap/ui/core/support/trace/E2eTraceLib.js +3 -3
- package/src/sap/ui/core/themes/base/Icon.less +9 -0
- package/src/sap/ui/core/themes/base/SAP-icons.css +2 -0
- package/src/sap/ui/core/themes/base/SAP-icons.less +10 -0
- package/src/sap/ui/core/themes/base/base.less +543 -390
- package/src/sap/ui/core/themes/base/fonts/SAP-icons.woff2 +0 -0
- package/src/sap/ui/core/themes/base/global.less +38 -0
- package/src/sap/ui/core/themes/base/library.source.less +1 -2
- package/src/sap/ui/core/themes/sap_hcb/global.less +34 -0
- package/src/sap/ui/core/theming/Parameters.js +21 -0
- package/src/sap/ui/core/tmpl/DOMAttribute.js +1 -1
- package/src/sap/ui/core/tmpl/DOMElement.js +1 -1
- package/src/sap/ui/core/tmpl/HandlebarsTemplate.js +1 -1
- package/src/sap/ui/core/tmpl/Template.js +1 -1
- package/src/sap/ui/core/tmpl/TemplateControl.js +1 -1
- package/src/sap/ui/core/util/AsyncHintsHelper.js +1 -1
- package/src/sap/ui/core/util/Export.js +1 -1
- package/src/sap/ui/core/util/ExportCell.js +1 -1
- package/src/sap/ui/core/util/ExportColumn.js +1 -1
- package/src/sap/ui/core/util/ExportRow.js +1 -1
- package/src/sap/ui/core/util/ExportType.js +1 -1
- package/src/sap/ui/core/util/ExportTypeCSV.js +1 -1
- package/src/sap/ui/core/util/File.js +1 -1
- package/src/sap/ui/core/util/LibraryInfo.js +1 -1
- package/src/sap/ui/core/util/MockServer.js +2 -2
- package/src/sap/ui/core/util/PasteHelper.js +1 -1
- package/src/sap/ui/core/util/XMLPreprocessor.js +11 -12
- package/src/sap/ui/core/util/reflection/JsControlTreeModifier.js +10 -12
- package/src/sap/ui/core/util/reflection/XmlTreeModifier.js +6 -3
- 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/Highlighter.js +8 -2
- package/src/sap/ui/debug/PropertyList.js +1 -1
- package/src/sap/ui/model/Binding.js +174 -118
- package/src/sap/ui/model/ChangeReason.js +1 -1
- package/src/sap/ui/model/ClientContextBinding.js +1 -1
- package/src/sap/ui/model/ClientListBinding.js +8 -3
- package/src/sap/ui/model/ClientModel.js +9 -8
- 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 +200 -118
- package/src/sap/ui/model/MetaModel.js +4 -9
- package/src/sap/ui/model/Model.js +349 -303
- 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 +249 -100
- package/src/sap/ui/model/TreeBindingCompatibilityAdapter.js +16 -9
- package/src/sap/ui/model/TreeBindingUtils.js +3 -0
- package/src/sap/ui/model/Type.js +1 -1
- package/src/sap/ui/model/analytics/AnalyticalBinding.js +20 -10
- package/src/sap/ui/model/analytics/AnalyticalTreeBindingAdapter.js +17 -19
- 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 +3 -2
- 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 +29 -20
- package/src/sap/ui/model/json/JSONPropertyBinding.js +5 -4
- 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 +25 -17
- package/src/sap/ui/model/message/MessagePropertyBinding.js +3 -3
- package/src/sap/ui/model/odata/AnnotationHelper.js +3 -3
- package/src/sap/ui/model/odata/AnnotationParser.js +5 -3
- 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 +62 -39
- package/src/sap/ui/model/odata/ODataMessageParser.js +3 -3
- package/src/sap/ui/model/odata/ODataMetaModel.js +6 -4
- package/src/sap/ui/model/odata/ODataMetadata.js +137 -86
- package/src/sap/ui/model/odata/ODataModel.js +443 -216
- package/src/sap/ui/model/odata/ODataPropertyBinding.js +8 -6
- package/src/sap/ui/model/odata/ODataTreeBinding.js +65 -33
- package/src/sap/ui/model/odata/ODataTreeBindingAdapter.js +28 -18
- package/src/sap/ui/model/odata/ODataTreeBindingFlat.js +442 -262
- package/src/sap/ui/model/odata/ODataUtils.js +36 -19
- package/src/sap/ui/model/odata/OperationMode.js +1 -1
- package/src/sap/ui/model/odata/_AnnotationHelperBasics.js +2 -1
- package/src/sap/ui/model/odata/_AnnotationHelperExpression.js +11 -9
- package/src/sap/ui/model/odata/_ODataMetaModelUtils.js +6 -4
- 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 +5 -1
- package/src/sap/ui/model/odata/type/Double.js +1 -1
- package/src/sap/ui/model/odata/type/Guid.js +1 -1
- package/src/sap/ui/model/odata/type/Int.js +1 -1
- package/src/sap/ui/model/odata/type/Int16.js +1 -1
- package/src/sap/ui/model/odata/type/Int32.js +1 -1
- package/src/sap/ui/model/odata/type/Int64.js +1 -1
- package/src/sap/ui/model/odata/type/ODataType.js +1 -1
- package/src/sap/ui/model/odata/type/Raw.js +1 -1
- package/src/sap/ui/model/odata/type/SByte.js +1 -1
- package/src/sap/ui/model/odata/type/Single.js +1 -1
- package/src/sap/ui/model/odata/type/Stream.js +1 -1
- package/src/sap/ui/model/odata/type/String.js +1 -1
- package/src/sap/ui/model/odata/type/Time.js +1 -1
- package/src/sap/ui/model/odata/type/TimeOfDay.js +1 -1
- package/src/sap/ui/model/odata/type/Unit.js +1 -1
- package/src/sap/ui/model/odata/type/UnitMixin.js +0 -1
- package/src/sap/ui/model/odata/v2/Context.js +98 -17
- package/src/sap/ui/model/odata/v2/ODataAnnotations.js +2 -2
- package/src/sap/ui/model/odata/v2/ODataContextBinding.js +1 -1
- package/src/sap/ui/model/odata/v2/ODataListBinding.js +416 -132
- package/src/sap/ui/model/odata/v2/ODataModel.js +465 -250
- package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +191 -109
- package/src/sap/ui/model/odata/v2/_CreatedContextsCache.js +179 -0
- package/src/sap/ui/model/odata/v4/Context.js +48 -7
- package/src/sap/ui/model/odata/v4/ODataBinding.js +60 -30
- package/src/sap/ui/model/odata/v4/ODataContextBinding.js +177 -53
- package/src/sap/ui/model/odata/v4/ODataListBinding.js +304 -91
- package/src/sap/ui/model/odata/v4/ODataMetaModel.js +32 -20
- package/src/sap/ui/model/odata/v4/ODataModel.js +29 -15
- package/src/sap/ui/model/odata/v4/ODataParentBinding.js +83 -51
- package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +13 -9
- package/src/sap/ui/model/odata/v4/lib/_Cache.js +115 -19
- package/src/sap/ui/model/odata/v4/lib/_Helper.js +35 -5
- package/src/sap/ui/model/odata/v4/lib/_Requestor.js +50 -5
- 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 +74 -45
- package/src/sap/ui/model/xml/XMLPropertyBinding.js +5 -5
- package/src/sap/ui/model/xml/XMLTreeBinding.js +5 -4
- package/src/sap/ui/performance/trace/Interaction.js +30 -15
- 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/Action.js +9 -2
- package/src/sap/ui/test/actions/Press.js +28 -1
- package/src/sap/ui/test/generic/_EnforceSemanticRendering.js +111 -0
- package/src/sap/ui/test/matchers/I18NText.js +29 -11
- package/src/sap/ui/test/opaQunit.js +5 -0
- package/src/sap/ui/thirdparty/IPv6.js +2 -2
- package/src/sap/ui/thirdparty/SecondLevelDomains.js +2 -2
- package/src/sap/ui/thirdparty/URI.js +14 -5
- package/src/sap/ui/thirdparty/URITemplate.js +2 -2
- 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 +30 -59
- package/src/sap/ui/util/Storage.js +1 -1
- package/src/sap/ui/util/isCrossOriginURL.js +16 -6
- package/src/ui5loader.js +6 -6
- package/ui5.yaml +248 -2
- package/src/sap/ui/core/CustomizingConfiguration.js +0 -272
- package/src/sap/ui/core/support/plugins/MessageTest.js +0 -96
- package/src/sap/ui/thirdparty/baseuri.js +0 -1
- package/src/sap/ui/thirdparty/es6-object-assign.js +0 -1
- package/src/sap/ui/thirdparty/es6-promise.js +0 -1
- package/src/sap/ui/thirdparty/es6-shim-nopromise.js +0 -1
- package/src/sap/ui/thirdparty/es6-string-methods.js +0 -1
- package/src/sap/ui/thirdparty/flexie.js +0 -1
- package/src/sap/ui/thirdparty/hyphenopoly/hyphenopoly.bundle.js +0 -860
- package/src/sap/ui/thirdparty/unorm.js +0 -1
- package/src/sap/ui/thirdparty/unormdata.js +0 -1
|
@@ -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 the OData model implementation of a tree binding
|
|
8
8
|
sap.ui.define([
|
|
9
9
|
"sap/base/assert",
|
|
@@ -92,7 +92,7 @@ sap.ui.define([
|
|
|
92
92
|
* @extends sap.ui.model.TreeBinding
|
|
93
93
|
* @hideconstructor
|
|
94
94
|
* @public
|
|
95
|
-
* @version 1.
|
|
95
|
+
* @version 1.97.0
|
|
96
96
|
*/
|
|
97
97
|
var ODataTreeBinding = TreeBinding.extend("sap.ui.model.odata.v2.ODataTreeBinding", /** @lends sap.ui.model.odata.v2.ODataTreeBinding.prototype */ {
|
|
98
98
|
|
|
@@ -102,8 +102,8 @@ sap.ui.define([
|
|
|
102
102
|
//make sure we have at least an empty parameter object
|
|
103
103
|
this.mParameters = this.mParameters || mParameters || {};
|
|
104
104
|
|
|
105
|
-
this.sGroupId;
|
|
106
|
-
this.sRefreshGroupId;
|
|
105
|
+
this.sGroupId = undefined;
|
|
106
|
+
this.sRefreshGroupId = undefined;
|
|
107
107
|
this.oFinalLengths = {};
|
|
108
108
|
this.oLengths = {};
|
|
109
109
|
this.oKeys = {};
|
|
@@ -158,14 +158,9 @@ sap.ui.define([
|
|
|
158
158
|
}
|
|
159
159
|
|
|
160
160
|
// internal operation mode switch, default is the same as "OperationMode.Server"
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
switch (this.sOperationMode) {
|
|
165
|
-
case OperationMode.Server: this.bClientOperation = false; break;
|
|
166
|
-
case OperationMode.Client: this.bClientOperation = true; break;
|
|
167
|
-
case OperationMode.Auto: this.bClientOperation = false; break; //initially start the same as the server mode
|
|
168
|
-
}
|
|
161
|
+
// the internal operation mode might change, the external operation mode
|
|
162
|
+
// (this.sOperationMode) will always be the original value
|
|
163
|
+
this.bClientOperation = this.sOperationMode === OperationMode.Client;
|
|
169
164
|
|
|
170
165
|
// the threshold for the OperationMode.Auto
|
|
171
166
|
this.iThreshold = (mParameters && mParameters.threshold) || 0;
|
|
@@ -206,19 +201,30 @@ sap.ui.define([
|
|
|
206
201
|
/**
|
|
207
202
|
* Builds a node filter string.
|
|
208
203
|
* mParams.id holds the ID value for filtering on the hierarchy node.
|
|
204
|
+
*
|
|
205
|
+
* @param {object} mParams The filter params
|
|
206
|
+
* @returns {string} The filter to use with <code>$filter</code>
|
|
209
207
|
*/
|
|
210
208
|
ODataTreeBinding.prototype._getNodeFilterParams = function (mParams) {
|
|
211
|
-
var sPropName = mParams.isRoot ? this.oTreeProperties["hierarchy-node-for"]
|
|
209
|
+
var sPropName = mParams.isRoot ? this.oTreeProperties["hierarchy-node-for"]
|
|
210
|
+
: this.oTreeProperties["hierarchy-parent-node-for"];
|
|
212
211
|
var oEntityType = this._getEntityType();
|
|
213
|
-
return ODataUtils._createFilterParams(new Filter(sPropName, "EQ", mParams.id),
|
|
212
|
+
return ODataUtils._createFilterParams(new Filter(sPropName, "EQ", mParams.id),
|
|
213
|
+
this.oModel.oMetadata, oEntityType);
|
|
214
214
|
};
|
|
215
215
|
|
|
216
216
|
/**
|
|
217
217
|
* Builds the Level-Filter string
|
|
218
|
+
*
|
|
219
|
+
* @param {string} sOperator The filter operator
|
|
220
|
+
* @param {number} iLevel The filter level
|
|
221
|
+
* @returns {string} The filter to use with <code>$filter</code>
|
|
218
222
|
*/
|
|
219
223
|
ODataTreeBinding.prototype._getLevelFilterParams = function (sOperator, iLevel) {
|
|
220
224
|
var oEntityType = this._getEntityType();
|
|
221
|
-
return ODataUtils._createFilterParams(
|
|
225
|
+
return ODataUtils._createFilterParams(
|
|
226
|
+
new Filter(this.oTreeProperties["hierarchy-level-for"], sOperator, iLevel),
|
|
227
|
+
this.oModel.oMetadata, oEntityType);
|
|
222
228
|
};
|
|
223
229
|
|
|
224
230
|
/**
|
|
@@ -411,19 +417,22 @@ sap.ui.define([
|
|
|
411
417
|
* @public
|
|
412
418
|
*/
|
|
413
419
|
ODataTreeBinding.prototype.hasChildren = function(oContext) {
|
|
420
|
+
var iLength;
|
|
421
|
+
|
|
414
422
|
if (this.bHasTreeAnnotations) {
|
|
415
423
|
if (!oContext) {
|
|
416
424
|
return false;
|
|
417
425
|
}
|
|
418
|
-
var sDrilldownState = oContext.getProperty(
|
|
426
|
+
var sDrilldownState = oContext.getProperty(
|
|
427
|
+
this.oTreeProperties["hierarchy-drill-state-for"]);
|
|
419
428
|
|
|
420
429
|
var sNodeKey = this.oModel.getKey(oContext);
|
|
421
|
-
//var sHierarchyNode = oContext.getProperty(this.oTreeProperties["hierarchy-node-for"]);
|
|
422
430
|
|
|
423
|
-
|
|
431
|
+
iLength = this.oLengths[sNodeKey];
|
|
424
432
|
|
|
425
|
-
// if the server returned no children for a node (even though it has a DrilldownState of
|
|
426
|
-
// the length for this node is set to 0 and finalized
|
|
433
|
+
// if the server returned no children for a node (even though it has a DrilldownState of
|
|
434
|
+
// "expanded"), the length for this node is set to 0 and finalized
|
|
435
|
+
// -> no children available
|
|
427
436
|
if (iLength === 0 && this.oFinalLengths[sNodeKey]) {
|
|
428
437
|
return false;
|
|
429
438
|
}
|
|
@@ -435,8 +444,10 @@ sap.ui.define([
|
|
|
435
444
|
} else if (sDrilldownState === "leaf"){
|
|
436
445
|
return false;
|
|
437
446
|
} else {
|
|
438
|
-
Log.warning("The entity '" + oContext.getPath() +
|
|
439
|
-
|
|
447
|
+
Log.warning("The entity '" + oContext.getPath() +
|
|
448
|
+
"' has not specified Drilldown State property value.");
|
|
449
|
+
//fault tolerance for empty property values (we optimistically say that those nodes
|
|
450
|
+
// can be expanded/collapsed)
|
|
440
451
|
if (sDrilldownState === undefined || sDrilldownState === "") {
|
|
441
452
|
return true;
|
|
442
453
|
}
|
|
@@ -446,9 +457,10 @@ sap.ui.define([
|
|
|
446
457
|
if (!oContext) {
|
|
447
458
|
return this.oLengths[this.getPath()] > 0;
|
|
448
459
|
}
|
|
449
|
-
|
|
460
|
+
iLength = this.oLengths[oContext.getPath() + "/" + this._getNavPath(oContext.getPath())];
|
|
450
461
|
|
|
451
|
-
//only return false if we definitely know that the length is 0, otherwise, we have
|
|
462
|
+
//only return false if we definitely know that the length is 0, otherwise, we have
|
|
463
|
+
// either a known length or none at all (undefined)
|
|
452
464
|
return iLength !== 0;
|
|
453
465
|
}
|
|
454
466
|
};
|
|
@@ -558,6 +570,7 @@ sap.ui.define([
|
|
|
558
570
|
}
|
|
559
571
|
}
|
|
560
572
|
|
|
573
|
+
return false;
|
|
561
574
|
// check requested sections where we still wait for an answer
|
|
562
575
|
};
|
|
563
576
|
|
|
@@ -603,7 +616,7 @@ sap.ui.define([
|
|
|
603
616
|
i = Math.max((aMissingSections[0].startIndex - iThreshold - this._iPageSize), 0);
|
|
604
617
|
var iFirstStartIndex = aMissingSections[0].startIndex;
|
|
605
618
|
for (i; i < iFirstStartIndex; i++) {
|
|
606
|
-
|
|
619
|
+
sKey = this.oKeys[sNodeId][i];
|
|
607
620
|
if (!sKey) {
|
|
608
621
|
if (!fnFindInLoadedSections(i)) {
|
|
609
622
|
aMissingSections = TreeBindingUtils.mergeSections(aMissingSections, {startIndex: i, length: 1});
|
|
@@ -620,7 +633,7 @@ sap.ui.define([
|
|
|
620
633
|
}
|
|
621
634
|
|
|
622
635
|
for (i; i < iEndIndex; i++) {
|
|
623
|
-
|
|
636
|
+
sKey = this.oKeys[sNodeId][i];
|
|
624
637
|
if (!sKey) {
|
|
625
638
|
if (!fnFindInLoadedSections(i)) {
|
|
626
639
|
aMissingSections = TreeBindingUtils.mergeSections(aMissingSections, {startIndex: i, length: 1});
|
|
@@ -628,14 +641,13 @@ sap.ui.define([
|
|
|
628
641
|
}
|
|
629
642
|
}
|
|
630
643
|
}
|
|
631
|
-
} else {
|
|
632
644
|
// for initial loading of a node use this shortcut.
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
645
|
+
} else if (!fnFindInLoadedSections(iStartIndex)) {
|
|
646
|
+
// "i" is our shifted forward startIndex for the "negative" thresholding
|
|
647
|
+
// in this case i is always smaller than iStartIndex, but minimum is 0
|
|
648
|
+
var iLengthShift = iStartIndex - i;
|
|
649
|
+
aMissingSections = TreeBindingUtils.mergeSections(aMissingSections,
|
|
650
|
+
{startIndex: i, length: iLength + iLengthShift + iThreshold});
|
|
639
651
|
}
|
|
640
652
|
|
|
641
653
|
// check if metadata are already available
|
|
@@ -701,17 +713,23 @@ sap.ui.define([
|
|
|
701
713
|
// request the missing sections and manage the loaded sections map
|
|
702
714
|
for (i = 0; i < aMissingSections.length; i++) {
|
|
703
715
|
var oRequestedSection = aMissingSections[i];
|
|
704
|
-
this._mLoadedSections[sNodeId] = TreeBindingUtils.mergeSections(
|
|
705
|
-
|
|
716
|
+
this._mLoadedSections[sNodeId] = TreeBindingUtils.mergeSections(
|
|
717
|
+
this._mLoadedSections[sNodeId],
|
|
718
|
+
{
|
|
719
|
+
startIndex: oRequestedSection.startIndex,
|
|
720
|
+
length: oRequestedSection.length
|
|
721
|
+
});
|
|
722
|
+
this._loadSubNodes(sNodeId, oRequestedSection.startIndex,
|
|
723
|
+
oRequestedSection.length, 0, aParams, mRequestParameters,
|
|
724
|
+
oRequestedSection);
|
|
706
725
|
}
|
|
707
|
-
} else
|
|
708
|
-
|
|
726
|
+
} else if (!this.oAllKeys
|
|
727
|
+
&& !this.mRequestHandles[ODataTreeBinding.REQUEST_KEY_CLIENT]) {
|
|
728
|
+
// OperationMode is set to "Client" AND we have something missing (should only
|
|
729
|
+
// happen once, at the very first loading request)
|
|
709
730
|
// of course also make sure no request is running already
|
|
710
|
-
|
|
711
|
-
this._loadCompleteTreeWithAnnotations(aParams);
|
|
712
|
-
}
|
|
731
|
+
this._loadCompleteTreeWithAnnotations(aParams);
|
|
713
732
|
}
|
|
714
|
-
|
|
715
733
|
}
|
|
716
734
|
}
|
|
717
735
|
|
|
@@ -775,7 +793,7 @@ sap.ui.define([
|
|
|
775
793
|
// if necessary we add all other filters to the count request
|
|
776
794
|
var sFilterParams = "";
|
|
777
795
|
if (this.bUseServersideApplicationFilters) {
|
|
778
|
-
|
|
796
|
+
sFilterParams = this.getFilterParams();
|
|
779
797
|
}
|
|
780
798
|
|
|
781
799
|
//only build filter statement if necessary
|
|
@@ -809,10 +827,13 @@ sap.ui.define([
|
|
|
809
827
|
|
|
810
828
|
/**
|
|
811
829
|
* Issues a $count request for the given node-id/odata-key.
|
|
812
|
-
* Only used when running in CountMode.Request
|
|
830
|
+
* Only used when running in <code>CountMode.Request</code>. Inlinecounts are appended directly
|
|
831
|
+
* when issuing a loading request.
|
|
832
|
+
*
|
|
833
|
+
* @param {string} sNodeId The node's ID
|
|
813
834
|
* @private
|
|
814
835
|
*/
|
|
815
|
-
ODataTreeBinding.prototype._getCountForNodeId = function(sNodeId
|
|
836
|
+
ODataTreeBinding.prototype._getCountForNodeId = function(sNodeId) {
|
|
816
837
|
var that = this,
|
|
817
838
|
sGroupId;
|
|
818
839
|
|
|
@@ -908,8 +929,12 @@ sap.ui.define([
|
|
|
908
929
|
/**
|
|
909
930
|
* Creates key map for given data
|
|
910
931
|
*
|
|
911
|
-
* @param {Array} aData
|
|
912
|
-
*
|
|
932
|
+
* @param {Array} aData
|
|
933
|
+
* Data which should be preprocessed
|
|
934
|
+
* @param {boolean} bSkipFirstNode
|
|
935
|
+
* Whether to skip the first node
|
|
936
|
+
* @returns {Object<string,string[]>|undefined}
|
|
937
|
+
* Map of parent and child keys or <code>undefined</code> when <code>aData</code> is empty
|
|
913
938
|
*
|
|
914
939
|
* @private
|
|
915
940
|
*/
|
|
@@ -935,6 +960,8 @@ sap.ui.define([
|
|
|
935
960
|
|
|
936
961
|
return mKeys;
|
|
937
962
|
}
|
|
963
|
+
|
|
964
|
+
return undefined;
|
|
938
965
|
};
|
|
939
966
|
|
|
940
967
|
/**
|
|
@@ -961,8 +988,8 @@ sap.ui.define([
|
|
|
961
988
|
/**
|
|
962
989
|
* Update node key in case if it changes
|
|
963
990
|
*
|
|
964
|
-
* @param {object} oNode
|
|
965
|
-
* @param {string} sNewKey
|
|
991
|
+
* @param {object} oNode The node
|
|
992
|
+
* @param {string} sNewKey The new key
|
|
966
993
|
*
|
|
967
994
|
* @private
|
|
968
995
|
*/
|
|
@@ -1066,17 +1093,27 @@ sap.ui.define([
|
|
|
1066
1093
|
/**
|
|
1067
1094
|
* Triggers backend requests to load the child nodes of the node with the given sNodeId.
|
|
1068
1095
|
*
|
|
1069
|
-
* @param {string} sNodeId
|
|
1070
|
-
*
|
|
1071
|
-
* @param {int}
|
|
1072
|
-
*
|
|
1073
|
-
* @param {
|
|
1074
|
-
*
|
|
1075
|
-
* @param {
|
|
1096
|
+
* @param {string} sNodeId
|
|
1097
|
+
* The value of the hierarchy node property on which a parent node filter will be performed
|
|
1098
|
+
* @param {int} iStartIndex
|
|
1099
|
+
* Start index of the page
|
|
1100
|
+
* @param {int} iLength
|
|
1101
|
+
* Length of the page
|
|
1102
|
+
* @param {int} iThreshold
|
|
1103
|
+
* Additionally loaded entities
|
|
1104
|
+
* @param {array} aParams
|
|
1105
|
+
* OData URL parameters, already concatenated with "="
|
|
1106
|
+
* @param {object} mParameters
|
|
1107
|
+
* Additional request parameters
|
|
1108
|
+
* @param {object} mParameters.navPath
|
|
1109
|
+
* The navigation path
|
|
1110
|
+
* @param {object} oRequestedSection
|
|
1111
|
+
* The requested section
|
|
1076
1112
|
*
|
|
1077
1113
|
* @private
|
|
1078
1114
|
*/
|
|
1079
|
-
ODataTreeBinding.prototype._loadSubNodes = function(sNodeId, iStartIndex, iLength, iThreshold,
|
|
1115
|
+
ODataTreeBinding.prototype._loadSubNodes = function(sNodeId, iStartIndex, iLength, iThreshold,
|
|
1116
|
+
aParams, mParameters, oRequestedSection) {
|
|
1080
1117
|
var that = this,
|
|
1081
1118
|
sGroupId,
|
|
1082
1119
|
bInlineCountRequested = false;
|
|
@@ -1102,6 +1139,7 @@ sap.ui.define([
|
|
|
1102
1139
|
var sRequestKey = "" + sNodeId + "-" + iStartIndex + "-" + this._iPageSize + "-" + iThreshold;
|
|
1103
1140
|
|
|
1104
1141
|
function fnSuccess(oData) {
|
|
1142
|
+
var oEntry, i;
|
|
1105
1143
|
|
|
1106
1144
|
if (oData) {
|
|
1107
1145
|
// make sure we have a keys array
|
|
@@ -1123,8 +1161,8 @@ sap.ui.define([
|
|
|
1123
1161
|
if (that.bHasTreeAnnotations) {
|
|
1124
1162
|
var mLastNodeIdIndices = {};
|
|
1125
1163
|
|
|
1126
|
-
for (
|
|
1127
|
-
|
|
1164
|
+
for (i = 0; i < oData.results.length; i++) {
|
|
1165
|
+
oEntry = oData.results[i];
|
|
1128
1166
|
|
|
1129
1167
|
if (i == 0) {
|
|
1130
1168
|
mLastNodeIdIndices[sNodeId] = iStartIndex;
|
|
@@ -1137,8 +1175,8 @@ sap.ui.define([
|
|
|
1137
1175
|
}
|
|
1138
1176
|
} else {
|
|
1139
1177
|
// Case 1b: Navigation Properties
|
|
1140
|
-
for (
|
|
1141
|
-
|
|
1178
|
+
for (i = 0; i < oData.results.length; i++) {
|
|
1179
|
+
oEntry = oData.results[i];
|
|
1142
1180
|
var sKey = that.oModel._getKey(oEntry);
|
|
1143
1181
|
that._processODataObject(oEntry, "/" + sKey, mParameters.navPath);
|
|
1144
1182
|
that.oKeys[sNodeId][i + iStartIndex] = sKey;
|
|
@@ -1225,9 +1263,11 @@ sap.ui.define([
|
|
|
1225
1263
|
ODataTreeBinding.REQUEST_KEY_CLIENT = "_OPERATIONMODE_CLIENT_TREE_LOADING";
|
|
1226
1264
|
|
|
1227
1265
|
/**
|
|
1228
|
-
* Loads the complete collection from the given binding path.
|
|
1229
|
-
*
|
|
1266
|
+
* Loads the complete collection from the given binding path. The tree is then reconstructed
|
|
1267
|
+
* from the response entries based on the properties with hierarchy annotations.
|
|
1230
1268
|
* Adds additional URL parameters.
|
|
1269
|
+
*
|
|
1270
|
+
* @param {string[]} aURLParams Additional URL parameters
|
|
1231
1271
|
*/
|
|
1232
1272
|
ODataTreeBinding.prototype._loadCompleteTreeWithAnnotations = function (aURLParams) {
|
|
1233
1273
|
var that = this;
|
|
@@ -1375,16 +1415,11 @@ sap.ui.define([
|
|
|
1375
1415
|
} else {
|
|
1376
1416
|
this.oKeys = {};
|
|
1377
1417
|
|
|
1378
|
-
// the internal operation mode might change, the external operation mode
|
|
1418
|
+
// the internal operation mode might change, the external operation mode
|
|
1419
|
+
// (this.sOperationMode) will always be the original value
|
|
1379
1420
|
// internal operation mode switch, default is the same as "OperationMode.Server"
|
|
1380
|
-
this.bClientOperation =
|
|
1421
|
+
this.bClientOperation = this.sOperationMode === OperationMode.Client;
|
|
1381
1422
|
|
|
1382
|
-
// the internal operation mode might change, the external operation mode (this.sOperationMode) will always be the original value
|
|
1383
|
-
switch (this.sOperationMode) {
|
|
1384
|
-
case OperationMode.Server: this.bClientOperation = false; break;
|
|
1385
|
-
case OperationMode.Client: this.bClientOperation = true; break;
|
|
1386
|
-
case OperationMode.Auto: this.bClientOperation = false; break; //initially start the same as the server mode
|
|
1387
|
-
}
|
|
1388
1423
|
// if no data is available after the reset we can't be sure the threshold is met or rejected
|
|
1389
1424
|
this.bThresholdRejected = false;
|
|
1390
1425
|
|
|
@@ -1439,8 +1474,8 @@ sap.ui.define([
|
|
|
1439
1474
|
* validation, use the parameter <code>bForceUpdate</code>.
|
|
1440
1475
|
*
|
|
1441
1476
|
* @param {boolean} [bForceUpdate] Update the bound control even if no data has been changed
|
|
1442
|
-
* @param {object} [mChangedEntities]
|
|
1443
|
-
* @param {string} [mEntityTypes]
|
|
1477
|
+
* @param {object} [mChangedEntities] A map of changed entities
|
|
1478
|
+
* @param {string} [mEntityTypes] A map of entity types
|
|
1444
1479
|
*
|
|
1445
1480
|
* @private
|
|
1446
1481
|
*/
|
|
@@ -1503,25 +1538,36 @@ sap.ui.define([
|
|
|
1503
1538
|
/**
|
|
1504
1539
|
* Applies the given filters to the ODataTreeBinding.
|
|
1505
1540
|
*
|
|
1506
|
-
* Please note that filters of type <code>FilterType.Control</code> are not supported for
|
|
1507
|
-
*
|
|
1508
|
-
* of type <code>Application</code>
|
|
1509
|
-
*
|
|
1541
|
+
* Please note that filters of type <code>FilterType.Control</code> are not supported for
|
|
1542
|
+
* <code>OperationMode.Server</code>,
|
|
1543
|
+
* here only filters of type <code>FilterType.Application</code> are allowed. Filters given via
|
|
1544
|
+
* {@link sap.ui.model.odata.v2.ODataModel#bindTree} are always
|
|
1545
|
+
* of type <code>Application</code> and will be sent with every back-end request.
|
|
1546
|
+
* For more information, see {@link sap.ui.model.odata.v2.ODataModel#bindTree}.
|
|
1510
1547
|
*
|
|
1511
|
-
* Since 1.34.0, complete client-side filtering is supported for
|
|
1512
|
-
* <code>OperationMode.
|
|
1548
|
+
* Since 1.34.0, complete client-side filtering is supported for
|
|
1549
|
+
* <code>OperationMode.Client</code> and also in <code>OperationMode.Auto</code> if the
|
|
1550
|
+
* back-end count is lower than the threshold.
|
|
1513
1551
|
* In this case, all types of filters will be applied on the client.
|
|
1514
|
-
* See also: {@link sap.ui.model.odata.OperationMode.Auto}
|
|
1515
|
-
*
|
|
1516
|
-
* For the <code>OperationMode.Client</code> and <code>OperationMode.Auto</code>, you may also
|
|
1517
|
-
*
|
|
1518
|
-
* <code>Application</code> will always be applied
|
|
1519
|
-
*
|
|
1520
|
-
*
|
|
1521
|
-
*
|
|
1522
|
-
* @param {sap.ui.model.
|
|
1552
|
+
* See also: {@link sap.ui.model.odata.OperationMode.Auto} and {@link sap.ui.model.FilterType}.
|
|
1553
|
+
*
|
|
1554
|
+
* For the <code>OperationMode.Client</code> and <code>OperationMode.Auto</code>, you may also
|
|
1555
|
+
* specify the <code>useServersideApplicationFilters</code> binding parameter when creating an
|
|
1556
|
+
* instance. If it is set, the filters of type <code>Application</code> will always be applied
|
|
1557
|
+
* on the back end and trigger an OData request.
|
|
1558
|
+
* For more information, see {@link sap.ui.model.odata.v2.ODataModel#bindTree}.
|
|
1559
|
+
*
|
|
1560
|
+
* @param {sap.ui.model.Filter[]|sap.ui.model.Filter} aFilters
|
|
1561
|
+
* Filter or array of filters to apply
|
|
1562
|
+
* @param {sap.ui.model.FilterType} sFilterType
|
|
1563
|
+
* Type of the filter which should be adjusted. If it is not given,
|
|
1523
1564
|
* the type <code>FilterType.Control</code> is assumed
|
|
1524
|
-
* @
|
|
1565
|
+
* @param {boolean} [bReturnSuccess]
|
|
1566
|
+
* Whether to return <code>true</code> or <code>false</code>, instead of <code>this</code>,
|
|
1567
|
+
* depending on whether the filtering has been done
|
|
1568
|
+
* @return {this}
|
|
1569
|
+
* Returns <code>this</code> to facilitate method chaining
|
|
1570
|
+
*
|
|
1525
1571
|
* @see sap.ui.model.TreeBinding.prototype.filter
|
|
1526
1572
|
* @public
|
|
1527
1573
|
*/
|
|
@@ -1536,7 +1582,8 @@ sap.ui.define([
|
|
|
1536
1582
|
if (sFilterType == FilterType.Control && (!this.bClientOperation || this.sOperationMode == OperationMode.Server)) {
|
|
1537
1583
|
Log.warning("Filtering with ControlFilters is ONLY possible if the ODataTreeBinding is running in OperationMode.Client or " +
|
|
1538
1584
|
"OperationMode.Auto, in case the given threshold is lower than the total number of tree nodes.");
|
|
1539
|
-
|
|
1585
|
+
|
|
1586
|
+
return this;
|
|
1540
1587
|
}
|
|
1541
1588
|
|
|
1542
1589
|
// empty filters
|
|
@@ -1672,11 +1719,17 @@ sap.ui.define([
|
|
|
1672
1719
|
};
|
|
1673
1720
|
|
|
1674
1721
|
/**
|
|
1675
|
-
* Sorts the Tree according to the given Sorter(s).
|
|
1676
|
-
*
|
|
1677
|
-
*
|
|
1678
|
-
*
|
|
1722
|
+
* Sorts the Tree according to the given Sorter(s). In <code>OperationMode.Client</code> or
|
|
1723
|
+
* <code>OperationMode.Auto</code> (if the given threshold is satisfied), the sorters are
|
|
1724
|
+
* applied locally on the client.
|
|
1725
|
+
*
|
|
1726
|
+
* @param {sap.ui.model.Sorter[]|sap.ui.model.Sorter} aSorters
|
|
1727
|
+
* The Sorter or an Array of sap.ui.model.Sorter instances
|
|
1728
|
+
* @param {boolean} [bReturnSuccess]
|
|
1729
|
+
* Whether to return <code>true</code> or <code>false</code>, instead of <code>this</code>,
|
|
1730
|
+
* depending on whether the sorting has been done
|
|
1679
1731
|
* @return {this} returns <code>this</code> to facilitate method chaining
|
|
1732
|
+
*
|
|
1680
1733
|
* @public
|
|
1681
1734
|
*/
|
|
1682
1735
|
ODataTreeBinding.prototype.sort = function(aSorters, bReturnSuccess) {
|
|
@@ -1720,6 +1773,10 @@ sap.ui.define([
|
|
|
1720
1773
|
/**
|
|
1721
1774
|
* Sets the comparator for each sorter in the sorters array according to the
|
|
1722
1775
|
* Edm type of the sort property
|
|
1776
|
+
*
|
|
1777
|
+
* @param {sap.ui.model.Sorter[]} aSorters The sorters
|
|
1778
|
+
* @param {object} oEntityType The entity type of the collection
|
|
1779
|
+
*
|
|
1723
1780
|
* @private
|
|
1724
1781
|
*/
|
|
1725
1782
|
ODataTreeBinding.prototype.addSortComparators = function(aSorters, oEntityType) {
|
|
@@ -1761,10 +1818,13 @@ sap.ui.define([
|
|
|
1761
1818
|
};
|
|
1762
1819
|
|
|
1763
1820
|
/**
|
|
1764
|
-
* Check whether this Binding would provide new values and in case it changed,
|
|
1765
|
-
*
|
|
1821
|
+
* Check whether this Binding would provide new values and in case it changed,fire a change
|
|
1822
|
+
* event.
|
|
1766
1823
|
*
|
|
1767
1824
|
* @param {boolean} bForceUpdate
|
|
1825
|
+
* Whether to fire the event regardless of the bindings state
|
|
1826
|
+
* @param {object} mChangedEntities
|
|
1827
|
+
* A map of changed entities
|
|
1768
1828
|
*
|
|
1769
1829
|
* @private
|
|
1770
1830
|
*/
|
|
@@ -1782,10 +1842,14 @@ sap.ui.define([
|
|
|
1782
1842
|
bChangeDetected = true;
|
|
1783
1843
|
return false;
|
|
1784
1844
|
}
|
|
1845
|
+
|
|
1846
|
+
return true;
|
|
1785
1847
|
});
|
|
1786
1848
|
if (bChangeDetected) {
|
|
1787
1849
|
return false;
|
|
1788
1850
|
}
|
|
1851
|
+
|
|
1852
|
+
return true;
|
|
1789
1853
|
});
|
|
1790
1854
|
}
|
|
1791
1855
|
}
|
|
@@ -1801,7 +1865,9 @@ sap.ui.define([
|
|
|
1801
1865
|
* Splits the given path along the navigation properties.
|
|
1802
1866
|
* Only used when bound against a service, which describes the tree via navigation properties.
|
|
1803
1867
|
*
|
|
1804
|
-
* @param {string} sPath
|
|
1868
|
+
* @param {string} sPath The path
|
|
1869
|
+
* @returns {string} The split path
|
|
1870
|
+
*
|
|
1805
1871
|
* @private
|
|
1806
1872
|
*/
|
|
1807
1873
|
ODataTreeBinding.prototype._getNavPath = function(sPath) {
|
|
@@ -1809,7 +1875,7 @@ sap.ui.define([
|
|
|
1809
1875
|
var sAbsolutePath = this.oModel.resolve(sPath, this.getContext());
|
|
1810
1876
|
|
|
1811
1877
|
if (!sAbsolutePath) {
|
|
1812
|
-
return;
|
|
1878
|
+
return undefined;
|
|
1813
1879
|
}
|
|
1814
1880
|
|
|
1815
1881
|
var aPathParts = sAbsolutePath.split("/"),
|
|
@@ -1822,6 +1888,7 @@ sap.ui.define([
|
|
|
1822
1888
|
//Replace context with subitems context
|
|
1823
1889
|
sNavPath = this.oNavigationPaths[sCurrent];
|
|
1824
1890
|
}
|
|
1891
|
+
|
|
1825
1892
|
return sNavPath;
|
|
1826
1893
|
};
|
|
1827
1894
|
|
|
@@ -1873,6 +1940,8 @@ sap.ui.define([
|
|
|
1873
1940
|
*
|
|
1874
1941
|
* The extracted hierarchy information will be stored in "this.oTreeProperties" (if any)
|
|
1875
1942
|
*
|
|
1943
|
+
* @returns {boolean} Whether the metadata has tree annotations
|
|
1944
|
+
*
|
|
1876
1945
|
* @private
|
|
1877
1946
|
*/
|
|
1878
1947
|
ODataTreeBinding.prototype._hasTreeAnnotations = function() {
|
|
@@ -1949,6 +2018,8 @@ sap.ui.define([
|
|
|
1949
2018
|
that.oTreeProperties[sName] = oProperty.name;
|
|
1950
2019
|
}
|
|
1951
2020
|
});
|
|
2021
|
+
|
|
2022
|
+
return true;
|
|
1952
2023
|
});
|
|
1953
2024
|
|
|
1954
2025
|
return fnSanityCheckTreeAnnotations();
|
|
@@ -2032,10 +2103,12 @@ sap.ui.define([
|
|
|
2032
2103
|
/**
|
|
2033
2104
|
* Initially only apply the Adapter interface.
|
|
2034
2105
|
* The real adapter will be applied after the initialize.
|
|
2106
|
+
*
|
|
2107
|
+
* @returns {this} A reference to itself
|
|
2035
2108
|
* @private
|
|
2036
2109
|
*/
|
|
2037
2110
|
ODataTreeBinding.prototype.applyAdapterInterface = function () {
|
|
2038
|
-
|
|
2111
|
+
/*
|
|
2039
2112
|
* Data Interface.
|
|
2040
2113
|
* Documentation, see the corresponding Adapter classes.
|
|
2041
2114
|
*/
|
|
@@ -2054,7 +2127,7 @@ sap.ui.define([
|
|
|
2054
2127
|
this.getContextByIndex = this.getContextByIndex || function () {
|
|
2055
2128
|
return;
|
|
2056
2129
|
};
|
|
2057
|
-
|
|
2130
|
+
/*
|
|
2058
2131
|
* Event Interface.
|
|
2059
2132
|
* Documentation, see the corresponding Adapter classes.
|
|
2060
2133
|
*/
|
|
@@ -2115,6 +2188,8 @@ sap.ui.define([
|
|
|
2115
2188
|
that.oTreeProperties[sName] = oProperty.name;
|
|
2116
2189
|
}
|
|
2117
2190
|
});
|
|
2191
|
+
|
|
2192
|
+
return true;
|
|
2118
2193
|
});
|
|
2119
2194
|
//perform magnitude annotation check
|
|
2120
2195
|
this.oTreeProperties[sMagnitudeAnnotation] = this.oTreeProperties[sMagnitudeAnnotation]
|
|
@@ -2279,9 +2354,7 @@ sap.ui.define([
|
|
|
2279
2354
|
|
|
2280
2355
|
sPath = this.getResolvedPath();
|
|
2281
2356
|
|
|
2282
|
-
|
|
2283
|
-
return this.oModel._createRequestUrl(sPath, null, aParams);
|
|
2284
|
-
}
|
|
2357
|
+
return sPath && this.oModel._createRequestUrl(sPath, null, aParams);
|
|
2285
2358
|
};
|
|
2286
2359
|
|
|
2287
2360
|
/**
|
|
@@ -2317,11 +2390,15 @@ sap.ui.define([
|
|
|
2317
2390
|
};
|
|
2318
2391
|
|
|
2319
2392
|
/**
|
|
2320
|
-
* Sets the rootLevel
|
|
2321
|
-
* The root level is the level of the topmost tree nodes
|
|
2322
|
-
*
|
|
2323
|
-
*
|
|
2324
|
-
*
|
|
2393
|
+
* Sets the <code>rootLevel</code>.
|
|
2394
|
+
* The root level is the level of the topmost tree nodes that will be used as an entry point
|
|
2395
|
+
* for OData services.
|
|
2396
|
+
* This is only possible (and necessary) for OData services implementing the hierarchy
|
|
2397
|
+
* annotation specification,
|
|
2398
|
+
* or when providing the annotation information locally as a binding parameter.
|
|
2399
|
+
* For more information, see {@link sap.ui.model.odata.v2.ODataModel#bindTree}.
|
|
2400
|
+
*
|
|
2401
|
+
* @param {int} iRootLevel The new <code>rootLevel</code>
|
|
2325
2402
|
*
|
|
2326
2403
|
* @public
|
|
2327
2404
|
*/
|
|
@@ -2338,7 +2415,8 @@ sap.ui.define([
|
|
|
2338
2415
|
|
|
2339
2416
|
/**
|
|
2340
2417
|
* Returns the rootLevel
|
|
2341
|
-
*
|
|
2418
|
+
*
|
|
2419
|
+
* @returns {int} The root level
|
|
2342
2420
|
*
|
|
2343
2421
|
* @public
|
|
2344
2422
|
*/
|
|
@@ -2348,9 +2426,13 @@ sap.ui.define([
|
|
|
2348
2426
|
|
|
2349
2427
|
/**
|
|
2350
2428
|
* Retrieves the EntityType of the bindings path, resolved with the current context.
|
|
2429
|
+
*
|
|
2430
|
+
* @returns {object|undefined}
|
|
2431
|
+
* The entity type or <code>undefined</code>, if the bindings path can't be resolved
|
|
2432
|
+
*
|
|
2351
2433
|
* @private
|
|
2352
2434
|
*/
|
|
2353
|
-
ODataTreeBinding.prototype._getEntityType = function(){
|
|
2435
|
+
ODataTreeBinding.prototype._getEntityType = function() {
|
|
2354
2436
|
var sResolvedPath = this.getResolvedPath();
|
|
2355
2437
|
|
|
2356
2438
|
if (sResolvedPath) {
|