@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
|
// Provides class sap.ui.model.odata.TreeBindingAdapter
|
|
8
8
|
sap.ui.define([
|
|
9
9
|
'sap/ui/model/TreeBinding',
|
|
@@ -78,30 +78,34 @@ sap.ui.define([
|
|
|
78
78
|
|
|
79
79
|
/**
|
|
80
80
|
* Returns a tree state handle to encapsulate the actual tree state.
|
|
81
|
-
* TODO: Encode the list to avoid conflicts with delimiters in the flat expanded list?
|
|
81
|
+
* TODO: Encode the list to avoid conflicts with delimiters in the flat expanded list?
|
|
82
|
+
* Re-Check this when back-end support is implemented.
|
|
82
83
|
*
|
|
83
|
-
* This function is exposed in the sub-classes/adapters (e.g. ODataTreeBindingAdapter) if
|
|
84
|
+
* This function is exposed in the sub-classes/adapters (e.g. ODataTreeBindingAdapter) if
|
|
85
|
+
* necessary/possible.
|
|
84
86
|
*
|
|
87
|
+
* @returns {object} The current tree state
|
|
85
88
|
* @private
|
|
86
89
|
*/
|
|
87
90
|
TreeBindingAdapter.prototype.getCurrentTreeState = function () {
|
|
88
|
-
var sDelimiter = ";"
|
|
91
|
+
var sDelimiter = ";",
|
|
92
|
+
sGroupID;
|
|
89
93
|
|
|
90
94
|
//expanded
|
|
91
95
|
var mExpandedEntriesGroupIDs = {};
|
|
92
|
-
for (
|
|
96
|
+
for (sGroupID in this._mTreeState.expanded) {
|
|
93
97
|
mExpandedEntriesGroupIDs[sGroupID] = true;
|
|
94
98
|
}
|
|
95
99
|
|
|
96
100
|
//collapsed
|
|
97
101
|
var mCollapsedEntriesGroupIDs = {};
|
|
98
|
-
for (
|
|
102
|
+
for (sGroupID in this._mTreeState.collapsed) {
|
|
99
103
|
mCollapsedEntriesGroupIDs[sGroupID] = true;
|
|
100
104
|
}
|
|
101
105
|
|
|
102
106
|
//selected
|
|
103
107
|
var mSelectedEntriesGroupIDs = {};
|
|
104
|
-
for (
|
|
108
|
+
for (sGroupID in this._mTreeState.selected) {
|
|
105
109
|
mSelectedEntriesGroupIDs[sGroupID] = true;
|
|
106
110
|
}
|
|
107
111
|
|
|
@@ -132,7 +136,8 @@ sap.ui.define([
|
|
|
132
136
|
/**
|
|
133
137
|
* Sets the given as a start point for the tree.
|
|
134
138
|
* Only in OperationMode.Client.
|
|
135
|
-
*
|
|
139
|
+
*
|
|
140
|
+
* @param {object} oTreeState Only valid tree states from the same binding are accepted
|
|
136
141
|
* @private
|
|
137
142
|
*/
|
|
138
143
|
TreeBindingAdapter.prototype.setTreeState = function (oTreeState) {
|
|
@@ -140,15 +145,19 @@ sap.ui.define([
|
|
|
140
145
|
};
|
|
141
146
|
|
|
142
147
|
/**
|
|
143
|
-
* Sets the
|
|
144
|
-
*
|
|
148
|
+
* Sets the auto expand mode for this Adapter. Default is "Bundled".
|
|
149
|
+
*
|
|
150
|
+
* @param {sap.ui.model.TreeAutoExpandMode} sAutoExpandMode The new auto expand mode to set
|
|
145
151
|
*/
|
|
146
152
|
TreeBindingAdapter.prototype.setAutoExpandMode = function (sAutoExpandMode) {
|
|
147
153
|
this._autoExpandMode = sAutoExpandMode;
|
|
148
154
|
};
|
|
149
155
|
|
|
150
156
|
/**
|
|
151
|
-
*
|
|
157
|
+
* Returns the number of entries in the tree.
|
|
158
|
+
*
|
|
159
|
+
* @return {number} Returns the number of entries in the tree
|
|
160
|
+
* @public
|
|
152
161
|
*/
|
|
153
162
|
TreeBindingAdapter.prototype.getLength = function() {
|
|
154
163
|
if (!this._oRootNode) {
|
|
@@ -159,10 +168,20 @@ sap.ui.define([
|
|
|
159
168
|
return this._oRootNode.magnitude;
|
|
160
169
|
};
|
|
161
170
|
|
|
171
|
+
/**
|
|
172
|
+
* Gets the context of the node at the given index.
|
|
173
|
+
*
|
|
174
|
+
* @param {number} iIndex
|
|
175
|
+
* The index of the node
|
|
176
|
+
*
|
|
177
|
+
* @returns {sap.ui.model.Context|undefined}
|
|
178
|
+
* The context of the node at the given index or <code>undefined</code> if the binding is
|
|
179
|
+
* initial or no node was found at the given index
|
|
180
|
+
*/
|
|
162
181
|
TreeBindingAdapter.prototype.getContextByIndex = function (iIndex) {
|
|
163
182
|
//step out if the binding is initial (as long as the metadata is not yet loaded)
|
|
164
183
|
if (this.isInitial()) {
|
|
165
|
-
return;
|
|
184
|
+
return undefined;
|
|
166
185
|
}
|
|
167
186
|
|
|
168
187
|
var oNode = this.findNode(iIndex);
|
|
@@ -172,7 +191,7 @@ sap.ui.define([
|
|
|
172
191
|
TreeBindingAdapter.prototype.getNodeByIndex = function(iIndex) {
|
|
173
192
|
//step out if the binding is initial (as long as the metadata is not yet loaded)
|
|
174
193
|
if (this.isInitial()) {
|
|
175
|
-
return;
|
|
194
|
+
return undefined;
|
|
176
195
|
}
|
|
177
196
|
|
|
178
197
|
// if the requested index is bigger than the magnitude of the tree, the index can never
|
|
@@ -185,32 +204,40 @@ sap.ui.define([
|
|
|
185
204
|
};
|
|
186
205
|
|
|
187
206
|
/**
|
|
188
|
-
*
|
|
189
|
-
*
|
|
207
|
+
* Gets the tree node matching the given search parameters. However, if there are sum rows
|
|
208
|
+
* cached (meaning, they are currently displayed), these will also be returned.
|
|
209
|
+
*
|
|
210
|
+
* @param {number} iRowIndex
|
|
211
|
+
* The row index of the node
|
|
212
|
+
*
|
|
213
|
+
* @returns {object|undefined}
|
|
214
|
+
* The found node or <code>undefined</code> if the binding is initial or no node is found
|
|
190
215
|
*/
|
|
191
|
-
TreeBindingAdapter.prototype.findNode = function (
|
|
216
|
+
TreeBindingAdapter.prototype.findNode = function (iRowIndex) {
|
|
192
217
|
|
|
193
218
|
//step out if the binding is initial (as long as the metadata is not yet loaded)
|
|
194
219
|
if (this.isInitial()) {
|
|
195
|
-
return;
|
|
220
|
+
return undefined;
|
|
196
221
|
}
|
|
197
222
|
|
|
198
|
-
var sParameterType = typeof
|
|
223
|
+
var sParameterType = typeof iRowIndex;
|
|
199
224
|
var oFoundNode;
|
|
200
225
|
|
|
201
226
|
var aSearchResult = [];
|
|
202
227
|
|
|
203
228
|
//if the parameter is an index -> first check the cache, and then search the tree if necessary
|
|
204
229
|
if (sParameterType === "number") {
|
|
205
|
-
oFoundNode = this._aRowIndexMap[
|
|
230
|
+
oFoundNode = this._aRowIndexMap[iRowIndex];
|
|
206
231
|
|
|
207
232
|
if (!oFoundNode) {
|
|
208
233
|
var iIndexCounter = -1;
|
|
209
234
|
this._match(this._oRootNode, aSearchResult, 1, function (oNodeToCheck) {
|
|
210
|
-
if (iIndexCounter ===
|
|
235
|
+
if (iIndexCounter === iRowIndex) {
|
|
211
236
|
return true;
|
|
212
237
|
}
|
|
213
238
|
iIndexCounter += 1;
|
|
239
|
+
|
|
240
|
+
return false;
|
|
214
241
|
});
|
|
215
242
|
|
|
216
243
|
oFoundNode = aSearchResult[0];
|
|
@@ -265,10 +292,20 @@ sap.ui.define([
|
|
|
265
292
|
return oNodeStateInSource;
|
|
266
293
|
};
|
|
267
294
|
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* Creates a new node state using supplied parameters.
|
|
298
|
+
*
|
|
299
|
+
* @param {object} mParameters
|
|
300
|
+
* Parameters for the new node state
|
|
301
|
+
*
|
|
302
|
+
* @returns {object|undefined}
|
|
303
|
+
* The created node state or <code>undefined</code> if no group id is given
|
|
304
|
+
*/
|
|
268
305
|
TreeBindingAdapter.prototype._createNodeState = function (mParameters) {
|
|
269
306
|
if (!mParameters.groupID) {
|
|
270
307
|
assert(false, "To create a node state a group ID is mandatory!");
|
|
271
|
-
return;
|
|
308
|
+
return undefined;
|
|
272
309
|
}
|
|
273
310
|
|
|
274
311
|
// check if the tree has an initial expansion state for the given groupID
|
|
@@ -316,23 +353,31 @@ sap.ui.define([
|
|
|
316
353
|
|
|
317
354
|
/**
|
|
318
355
|
* Merges the new section with all currently known sections.
|
|
319
|
-
* Makes sure
|
|
356
|
+
* Makes sure that only non overlapping sections are kept.
|
|
357
|
+
*
|
|
358
|
+
* @param {string} sGroupID
|
|
359
|
+
* The group ID of the node below which the new section should be merged
|
|
360
|
+
* @param {object} oNewSection
|
|
361
|
+
* The new section to merge
|
|
362
|
+
*
|
|
363
|
+
* @returns {object|undefined}
|
|
364
|
+
* The merged sections
|
|
320
365
|
*/
|
|
321
366
|
TreeBindingAdapter.prototype._updateNodeSections = function (sGroupID, oNewSection) {
|
|
322
367
|
var oNodeState = this._getNodeState(sGroupID);
|
|
323
368
|
|
|
324
369
|
if (!oNodeState) {
|
|
325
370
|
assert(false, "No Node State for Group ID '" + sGroupID + "' found!");
|
|
326
|
-
return;
|
|
371
|
+
return undefined;
|
|
327
372
|
} else if (!oNewSection) {
|
|
328
373
|
assert(false, "No Section given!");
|
|
329
|
-
return;
|
|
374
|
+
return undefined;
|
|
330
375
|
} else if (oNewSection.length <= 0) {
|
|
331
376
|
assert(false, "The length of the given section must be positive greater than 0.");
|
|
332
|
-
return;
|
|
377
|
+
return undefined;
|
|
333
378
|
} else if (oNewSection.startIndex < 0) {
|
|
334
379
|
assert(false, "The sections start index must be greater/equal to 0.");
|
|
335
|
-
return;
|
|
380
|
+
return undefined;
|
|
336
381
|
}
|
|
337
382
|
|
|
338
383
|
// Iterate over all known/loaded sections of the node
|
|
@@ -372,6 +417,10 @@ sap.ui.define([
|
|
|
372
417
|
/**
|
|
373
418
|
* Calculates the maximum possible group-size for a given node.
|
|
374
419
|
* Not the same as the direct number of children.
|
|
420
|
+
*
|
|
421
|
+
* @param {object} oNode The node to calculate the group-size for
|
|
422
|
+
*
|
|
423
|
+
* @returns {number} The maximum possible group-size
|
|
375
424
|
*/
|
|
376
425
|
TreeBindingAdapter.prototype._getMaxGroupSize = function (oNode) {
|
|
377
426
|
var iMaxGroupSize = 0;
|
|
@@ -429,6 +478,10 @@ sap.ui.define([
|
|
|
429
478
|
*/
|
|
430
479
|
TreeBindingAdapter.prototype._getContextsOrNodes = function (bReturnNodes, iStartIndex,
|
|
431
480
|
iLength, iThreshold) {
|
|
481
|
+
var mMissingSections, oNode,
|
|
482
|
+
aContexts = [],
|
|
483
|
+
aNodes = [];
|
|
484
|
+
|
|
432
485
|
if (!this.isResolved() || this.isInitial()) {
|
|
433
486
|
return [];
|
|
434
487
|
}
|
|
@@ -455,7 +508,6 @@ sap.ui.define([
|
|
|
455
508
|
this._buildTree(iStartIndex, iLength);
|
|
456
509
|
|
|
457
510
|
// retrieve the requested section of nodes from the tree
|
|
458
|
-
var aNodes = [];
|
|
459
511
|
if (this._oRootNode) {
|
|
460
512
|
aNodes = this._retrieveNodeSection(this._oRootNode, iStartIndex, iLength);
|
|
461
513
|
}
|
|
@@ -464,10 +516,8 @@ sap.ui.define([
|
|
|
464
516
|
this._updateRowIndexMap(aNodes, iStartIndex);
|
|
465
517
|
|
|
466
518
|
//find missing sections
|
|
467
|
-
var aContexts = [];
|
|
468
|
-
var mMissingSections;
|
|
469
519
|
for (var i = 0; i < aNodes.length; i++) {
|
|
470
|
-
|
|
520
|
+
oNode = aNodes[i];
|
|
471
521
|
// we found a gap because the node is empty (context is undefined)
|
|
472
522
|
if (!oNode.context) {
|
|
473
523
|
mMissingSections = mMissingSections || {};
|
|
@@ -498,7 +548,7 @@ sap.ui.define([
|
|
|
498
548
|
// try to fill gaps in our return array if we already have new data (thanks to thresholding)
|
|
499
549
|
aContexts = [];
|
|
500
550
|
for (var j = 0; j < aNodes.length; j++) {
|
|
501
|
-
|
|
551
|
+
oNode = aNodes[j];
|
|
502
552
|
aContexts.push(oNode.context);
|
|
503
553
|
}
|
|
504
554
|
}
|
|
@@ -530,7 +580,10 @@ sap.ui.define([
|
|
|
530
580
|
};
|
|
531
581
|
|
|
532
582
|
/**
|
|
533
|
-
*
|
|
583
|
+
* Updates a node section from the tree with our RowIndex Mapping table.
|
|
584
|
+
*
|
|
585
|
+
* @param {object[]} aNodes The nodes to update
|
|
586
|
+
* @param {number} iStartIndex The position where the update should start
|
|
534
587
|
*/
|
|
535
588
|
TreeBindingAdapter.prototype._updateRowIndexMap = function (aNodes, iStartIndex) {
|
|
536
589
|
//throw away the old mapping index
|
|
@@ -542,15 +595,21 @@ sap.ui.define([
|
|
|
542
595
|
};
|
|
543
596
|
|
|
544
597
|
/**
|
|
545
|
-
* Depth-First traversal of a sub-tree object structure starting with the given node as the
|
|
546
|
-
* Retrieves all found nodes (including gaps). Gaps will be filled with placeholder
|
|
547
|
-
* These placeholders are later used to automatically update the tree after
|
|
548
|
-
* sub-tree(s) containing the gaps.
|
|
549
|
-
*
|
|
550
|
-
* @param {
|
|
551
|
-
*
|
|
552
|
-
* @
|
|
553
|
-
*
|
|
598
|
+
* Depth-First traversal of a sub-tree object structure starting with the given node as the
|
|
599
|
+
* root. Retrieves all found nodes (including gaps). Gaps will be filled with placeholder
|
|
600
|
+
* nodes. These placeholders are later used to automatically update the tree after
|
|
601
|
+
* invalidating and refreshing the sub-tree(s) containing the gaps.
|
|
602
|
+
*
|
|
603
|
+
* @param {object} oNode
|
|
604
|
+
* Ignored; the root node is always used as starting point
|
|
605
|
+
* @param {number} iStartIndex
|
|
606
|
+
* The start of the tree section which should be retrieved
|
|
607
|
+
* @param {number} iLength
|
|
608
|
+
* The length of the tree section which should be retrieved
|
|
609
|
+
*
|
|
610
|
+
* @return {object[]} An array containing all collected nodes, for which the absolute node
|
|
611
|
+
* index is greater than iStartIndex; the length of the array will be iLength (or less if
|
|
612
|
+
* the tree does not have that many nodes).
|
|
554
613
|
* @private
|
|
555
614
|
*/
|
|
556
615
|
TreeBindingAdapter.prototype._retrieveNodeSection = function (oNode, iStartIndex, iLength) {
|
|
@@ -573,13 +632,16 @@ sap.ui.define([
|
|
|
573
632
|
aNodes.push(oNode);
|
|
574
633
|
return true;
|
|
575
634
|
}
|
|
635
|
+
|
|
636
|
+
return false;
|
|
576
637
|
});
|
|
577
638
|
|
|
578
639
|
return aNodes;
|
|
579
640
|
};
|
|
580
641
|
|
|
581
642
|
/**
|
|
582
|
-
* Builds the tree from start index with the specified number of nodes
|
|
643
|
+
* Builds the tree from start index with the specified number of nodes.
|
|
644
|
+
*
|
|
583
645
|
* @param {int} iStartIndex Index from which the tree shall be built
|
|
584
646
|
* @param {int} iLength Number of Nodes
|
|
585
647
|
*/
|
|
@@ -597,7 +659,7 @@ sap.ui.define([
|
|
|
597
659
|
// create root node state if none exists
|
|
598
660
|
if (!oRootNodeState) {
|
|
599
661
|
|
|
600
|
-
|
|
662
|
+
oRootNodeState = this._createNodeState({
|
|
601
663
|
groupID: sRootGroupID,
|
|
602
664
|
sum: true,
|
|
603
665
|
sections: [{
|
|
@@ -637,13 +699,18 @@ sap.ui.define([
|
|
|
637
699
|
};
|
|
638
700
|
|
|
639
701
|
/**
|
|
640
|
-
* Calculate the request length based on the given information
|
|
702
|
+
* Calculate the request length based on the given information.
|
|
703
|
+
*
|
|
704
|
+
* @param {number} iMaxGroupSize The maximum group size
|
|
705
|
+
* @param {object} oSection The information of the current section
|
|
706
|
+
*
|
|
707
|
+
* @returns {number} The calculated request length
|
|
641
708
|
*
|
|
642
|
-
* @param {int} iMaxGroupSize the maximum group size
|
|
643
|
-
* @param {object} oSection the information of the current section
|
|
644
709
|
* @protected
|
|
645
|
-
* @deprecated
|
|
646
|
-
*
|
|
710
|
+
* @deprecated
|
|
711
|
+
* since version 1.52. This method is marked as 'protected' which was meant to
|
|
712
|
+
* be overwritten by its subclasses. It may be renamed or deleted and should only be
|
|
713
|
+
* called from this class or its subclasses.
|
|
647
714
|
*/
|
|
648
715
|
TreeBindingAdapter.prototype._calculateRequestLength = function(iMaxGroupSize, oSection) {
|
|
649
716
|
var iRequestedLength;
|
|
@@ -799,6 +866,8 @@ sap.ui.define([
|
|
|
799
866
|
/**
|
|
800
867
|
* Returns if the Binding is grouped, default is true.
|
|
801
868
|
* AnalyticalBindings might differ.
|
|
869
|
+
*
|
|
870
|
+
* @returns {boolean} true
|
|
802
871
|
*/
|
|
803
872
|
TreeBindingAdapter.prototype.isGrouped = function () {
|
|
804
873
|
return true;
|
|
@@ -808,7 +877,6 @@ sap.ui.define([
|
|
|
808
877
|
* Hook which needs to be implemented by subclasses
|
|
809
878
|
* Calculates a unique group ID for a given node
|
|
810
879
|
* @param {Object} oNode Node of which the group ID shall be calculated
|
|
811
|
-
* @returns {string} Group ID for oNode
|
|
812
880
|
*/
|
|
813
881
|
TreeBindingAdapter.prototype._calculateGroupID = function (oNode) {
|
|
814
882
|
Log.error("TreeBindingAdapter#_calculateGroupID: Not implemented. Needs to be implemented in respective sub-classes.");
|
|
@@ -885,7 +953,10 @@ sap.ui.define([
|
|
|
885
953
|
|
|
886
954
|
/**
|
|
887
955
|
* Retrieves the expanded state of the row sitting at the given index.
|
|
888
|
-
*
|
|
956
|
+
*
|
|
957
|
+
* @param {number} iIndex The index for which the expansion state should be retrieved
|
|
958
|
+
*
|
|
959
|
+
* @returns {boolean} Whether the node at the given index is expanded
|
|
889
960
|
*/
|
|
890
961
|
TreeBindingAdapter.prototype.isExpanded = function (iIndex) {
|
|
891
962
|
var oNode = this.findNode(iIndex);
|
|
@@ -1026,15 +1097,27 @@ sap.ui.define([
|
|
|
1026
1097
|
|
|
1027
1098
|
/**
|
|
1028
1099
|
* Calls the given matching function on every child node in the sub tree with root "oNode".
|
|
1029
|
-
* Inside the map function "this" is bound to the TreeBindingAdapter instance.
|
|
1030
|
-
*
|
|
1031
|
-
*
|
|
1032
|
-
*
|
|
1033
|
-
* @param {
|
|
1034
|
-
*
|
|
1035
|
-
*
|
|
1036
|
-
* @param {
|
|
1037
|
-
*
|
|
1100
|
+
* Inside the map function "this" is bound to the TreeBindingAdapter instance. The matching
|
|
1101
|
+
* function must return "true" if the node should be collected as a match, and false
|
|
1102
|
+
* otherwise.
|
|
1103
|
+
*
|
|
1104
|
+
* @param {object} oNode
|
|
1105
|
+
* The starting node of the sub-tree which will be traversed, handed to the
|
|
1106
|
+
* fnMatchFunction
|
|
1107
|
+
* @param {array} aResults
|
|
1108
|
+
* The collected nodes for which the matching function returns true
|
|
1109
|
+
* @param {number} iMaxNumberOfMatches
|
|
1110
|
+
* The maximum number of matched nodes, _match() will stopp if this boundary is reached
|
|
1111
|
+
* @param {function} fnMatchFunction
|
|
1112
|
+
* The match function is called for every traversed nodes
|
|
1113
|
+
* @param {number} [iPositionInParent]
|
|
1114
|
+
* The relative position of the oNode parameter to its parent nodes children array, handed
|
|
1115
|
+
* to the fnMatchFunction
|
|
1116
|
+
* @param {object} [oParentNode]
|
|
1117
|
+
* The parent node of the oNode parameter, handed to the fnMatchFunction
|
|
1118
|
+
*
|
|
1119
|
+
* @returns {boolean}
|
|
1120
|
+
* Whether the <code>iMaxNumberOfMatches</code> has been reached
|
|
1038
1121
|
*/
|
|
1039
1122
|
TreeBindingAdapter.prototype._match = function (oNode, aResults, iMaxNumberOfMatches, fnMatchFunction, iPositionInParent, oParentNode) {
|
|
1040
1123
|
|
|
@@ -1090,6 +1173,10 @@ sap.ui.define([
|
|
|
1090
1173
|
|
|
1091
1174
|
/**
|
|
1092
1175
|
* A group ID starts and ends with a "/".
|
|
1176
|
+
*
|
|
1177
|
+
* @param {string} sGroupID The group ID to get the level from
|
|
1178
|
+
*
|
|
1179
|
+
* @returns {number} The level of the group ID
|
|
1093
1180
|
*/
|
|
1094
1181
|
TreeBindingAdapter.prototype._getGroupIdLevel = function (sGroupID) {
|
|
1095
1182
|
if (sGroupID == null) {
|
|
@@ -1100,7 +1187,11 @@ sap.ui.define([
|
|
|
1100
1187
|
};
|
|
1101
1188
|
|
|
1102
1189
|
/**
|
|
1103
|
-
* Determines the size of a group
|
|
1190
|
+
* Determines the size of a group.
|
|
1191
|
+
*
|
|
1192
|
+
* @param {object} oNode The node to determine the size of
|
|
1193
|
+
*
|
|
1194
|
+
* @returns {number} The child count of the given node
|
|
1104
1195
|
*/
|
|
1105
1196
|
TreeBindingAdapter.prototype._getGroupSize = function (oNode) {
|
|
1106
1197
|
return this.getChildCount(oNode.context);
|
|
@@ -1136,7 +1227,10 @@ sap.ui.define([
|
|
|
1136
1227
|
|
|
1137
1228
|
/**
|
|
1138
1229
|
* Returns the selection state for the node at the given index.
|
|
1139
|
-
*
|
|
1230
|
+
*
|
|
1231
|
+
* @param {number} iRowIndex The row index to check for selection state
|
|
1232
|
+
*
|
|
1233
|
+
* @returns {boolean} Whether the node at the given index is selected
|
|
1140
1234
|
*/
|
|
1141
1235
|
TreeBindingAdapter.prototype.isIndexSelected = function (iRowIndex) {
|
|
1142
1236
|
var oNode = this.getNodeByIndex(iRowIndex);
|
|
@@ -1144,9 +1238,12 @@ sap.ui.define([
|
|
|
1144
1238
|
};
|
|
1145
1239
|
|
|
1146
1240
|
/**
|
|
1147
|
-
* Returns
|
|
1241
|
+
* Returns whether the node at the given index is selectable.
|
|
1148
1242
|
* In the AnalyticalTable only nodes with isLeaf = true are selectable.
|
|
1149
|
-
*
|
|
1243
|
+
*
|
|
1244
|
+
* @param {number} iRowIndex The row index which should be checked for "selectability"
|
|
1245
|
+
*
|
|
1246
|
+
* @returns {boolean} Whether the node at the given index is selectable
|
|
1150
1247
|
*/
|
|
1151
1248
|
TreeBindingAdapter.prototype.isIndexSelectable = function (iRowIndex) {
|
|
1152
1249
|
var oNode = this.getNodeByIndex(iRowIndex);
|
|
@@ -1154,7 +1251,12 @@ sap.ui.define([
|
|
|
1154
1251
|
};
|
|
1155
1252
|
|
|
1156
1253
|
/**
|
|
1157
|
-
* Checks if the given node can be selected. Always true for TreeTable controls, except
|
|
1254
|
+
* Checks if the given node can be selected. Always true for TreeTable controls, except when
|
|
1255
|
+
* the node is not defined.
|
|
1256
|
+
*
|
|
1257
|
+
* @param {object} oNode The node to check
|
|
1258
|
+
*
|
|
1259
|
+
* @returns {boolean} Whether the node can be selected
|
|
1158
1260
|
*/
|
|
1159
1261
|
TreeBindingAdapter.prototype._isNodeSelectable = function (oNode) {
|
|
1160
1262
|
return !!oNode && !oNode.isArtificial;
|
|
@@ -1194,9 +1296,9 @@ sap.ui.define([
|
|
|
1194
1296
|
};
|
|
1195
1297
|
|
|
1196
1298
|
/**
|
|
1197
|
-
* Retrieves the "Lead-Selection-Index"
|
|
1198
|
-
*
|
|
1199
|
-
* @return {
|
|
1299
|
+
* Retrieves the "Lead-Selection-Index". Normally this is the last selected node/table row.
|
|
1300
|
+
*
|
|
1301
|
+
* @return {number} Returns the lead selection index or -1 if none is set
|
|
1200
1302
|
*/
|
|
1201
1303
|
TreeBindingAdapter.prototype.getSelectedIndex = function () {
|
|
1202
1304
|
//if we have no nodes selected, the lead selection index is -1
|
|
@@ -1215,9 +1317,12 @@ sap.ui.define([
|
|
|
1215
1317
|
if (oNode) {
|
|
1216
1318
|
if (oNode.groupID === this._sLeadSelectionGroupID) {
|
|
1217
1319
|
nodeFound = true;
|
|
1320
|
+
|
|
1218
1321
|
return true;
|
|
1219
1322
|
}
|
|
1220
1323
|
}
|
|
1324
|
+
|
|
1325
|
+
return false;
|
|
1221
1326
|
};
|
|
1222
1327
|
this._match(this._oRootNode, [], 1, fnMatchFunction);
|
|
1223
1328
|
|
|
@@ -1263,6 +1368,8 @@ sap.ui.define([
|
|
|
1263
1368
|
return true;
|
|
1264
1369
|
}
|
|
1265
1370
|
}
|
|
1371
|
+
|
|
1372
|
+
return false;
|
|
1266
1373
|
};
|
|
1267
1374
|
|
|
1268
1375
|
this._match(this._oRootNode, [], iNumberOfNodesToSelect, fnMatchFunction);
|
|
@@ -1271,7 +1378,9 @@ sap.ui.define([
|
|
|
1271
1378
|
};
|
|
1272
1379
|
|
|
1273
1380
|
/**
|
|
1274
|
-
* Returns the number of selected nodes (including not-yet loaded)
|
|
1381
|
+
* Returns the number of selected nodes (including not-yet loaded).
|
|
1382
|
+
*
|
|
1383
|
+
* @returns {number} The count of selected nodes
|
|
1275
1384
|
* @private
|
|
1276
1385
|
*/
|
|
1277
1386
|
TreeBindingAdapter.prototype.getSelectedNodesCount = function () {
|
|
@@ -1336,7 +1445,11 @@ sap.ui.define([
|
|
|
1336
1445
|
};
|
|
1337
1446
|
|
|
1338
1447
|
/**
|
|
1339
|
-
* Returns the number of currently selectable nodes (with respect to the current
|
|
1448
|
+
* Returns the number of currently selectable nodes (with respect to the current
|
|
1449
|
+
* expand/collapse state).
|
|
1450
|
+
*
|
|
1451
|
+
* @param {object} [oNode] The node to get the selectable nodes count from
|
|
1452
|
+
*
|
|
1340
1453
|
* @returns {int} Number of currently selectable nodes
|
|
1341
1454
|
*/
|
|
1342
1455
|
TreeBindingAdapter.prototype._getSelectableNodesCount = function (oNode) {
|
|
@@ -1348,8 +1461,11 @@ sap.ui.define([
|
|
|
1348
1461
|
};
|
|
1349
1462
|
|
|
1350
1463
|
/**
|
|
1351
|
-
* Returns an array containing all selected contexts, ordered by their appearance in the
|
|
1352
|
-
*
|
|
1464
|
+
* Returns an array containing all selected contexts, ordered by their appearance in the
|
|
1465
|
+
* tree.
|
|
1466
|
+
*
|
|
1467
|
+
* @return {sap.ui.model.Context[]}
|
|
1468
|
+
* An array containing the binding contexts for all selected nodes
|
|
1353
1469
|
*/
|
|
1354
1470
|
TreeBindingAdapter.prototype.getSelectedContexts = function () {
|
|
1355
1471
|
var aResultContexts = [];
|
|
@@ -1375,9 +1491,12 @@ sap.ui.define([
|
|
|
1375
1491
|
aResultContexts.push(oNode.context);
|
|
1376
1492
|
// cache the selected node for subsequent findNode/getContextByIndex calls
|
|
1377
1493
|
that._aRowIndexMap[iNodeCounter] = oNode;
|
|
1494
|
+
|
|
1378
1495
|
return true;
|
|
1379
1496
|
}
|
|
1380
1497
|
}
|
|
1498
|
+
|
|
1499
|
+
return false;
|
|
1381
1500
|
};
|
|
1382
1501
|
|
|
1383
1502
|
this._match(this._oRootNode, [], iNumberOfNodesToSelect, fnMatchFunction);
|
|
@@ -1387,22 +1506,25 @@ sap.ui.define([
|
|
|
1387
1506
|
|
|
1388
1507
|
/**
|
|
1389
1508
|
* Sets the selection to the range from iFromIndex to iToIndex (including boundaries).
|
|
1390
|
-
* e.g. setSelectionInterval(1,3) marks the rows 1,2 and 3.
|
|
1391
|
-
*
|
|
1392
|
-
*
|
|
1509
|
+
* e.g. <code>setSelectionInterval(1,3)</code> marks the rows 1,2 and 3. All currently
|
|
1510
|
+
* selected rows will be deselected in the process. A <code>selectionChanged</code> event is
|
|
1511
|
+
* fired.
|
|
1512
|
+
*
|
|
1513
|
+
* @param {number} iFromIndex The first index to select
|
|
1514
|
+
* @param {number} iToIndex The last index to select
|
|
1393
1515
|
*/
|
|
1394
1516
|
TreeBindingAdapter.prototype.setSelectionInterval = function (iFromIndex, iToIndex) {
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1517
|
+
var i, iIndex,
|
|
1518
|
+
// clears the selection but suppresses the selection change event
|
|
1519
|
+
mClearParams = this._clearSelection(),
|
|
1520
|
+
mIndicesFound = {},
|
|
1521
|
+
aRowIndices = [],
|
|
1522
|
+
// the addSelectionInterval function takes care of the selection change event
|
|
1523
|
+
mSetParams = this._setSelectionInterval(iFromIndex, iToIndex, true);
|
|
1402
1524
|
|
|
1403
1525
|
// flag all cleared indices as changed
|
|
1404
|
-
for (
|
|
1405
|
-
|
|
1526
|
+
for (i = 0; i < mClearParams.rowIndices.length; i++) {
|
|
1527
|
+
iIndex = mClearParams.rowIndices[i];
|
|
1406
1528
|
mIndicesFound[iIndex] = true;
|
|
1407
1529
|
}
|
|
1408
1530
|
|
|
@@ -1433,11 +1555,19 @@ sap.ui.define([
|
|
|
1433
1555
|
};
|
|
1434
1556
|
|
|
1435
1557
|
/**
|
|
1436
|
-
* Sets the value inside the given range to the value given with 'bSelectionValue'
|
|
1558
|
+
* Sets the value inside the given range to the value given with 'bSelectionValue'.
|
|
1559
|
+
*
|
|
1560
|
+
* @param {number} iFromIndex
|
|
1561
|
+
* The starting index of the selection range
|
|
1562
|
+
* @param {number} iToIndex
|
|
1563
|
+
* The end index of the selection range, which will be included in the selection
|
|
1564
|
+
* @param {boolean} bSelectionValue
|
|
1565
|
+
* The selection state which should be applied to all indices between 'from' and 'to'
|
|
1566
|
+
* index
|
|
1567
|
+
*
|
|
1568
|
+
* @returns {object}
|
|
1569
|
+
* A map containing info about the changed selection
|
|
1437
1570
|
* @private
|
|
1438
|
-
* @param {int} iFromIndex the starting index of the selection range
|
|
1439
|
-
* @param {int} iToIndex the end index of the selection range
|
|
1440
|
-
* @param {boolean} bSelectionValue the selection state which should be applied to all indices between 'from' and 'to' index
|
|
1441
1571
|
*/
|
|
1442
1572
|
TreeBindingAdapter.prototype._setSelectionInterval = function (iFromIndex, iToIndex, bSelectionValue) {
|
|
1443
1573
|
//make sure the "From" Index is always lower than the "To" Index
|
|
@@ -1485,6 +1615,7 @@ sap.ui.define([
|
|
|
1485
1615
|
}
|
|
1486
1616
|
}
|
|
1487
1617
|
|
|
1618
|
+
return false;
|
|
1488
1619
|
};
|
|
1489
1620
|
|
|
1490
1621
|
this._match(this._oRootNode, aNewlySelectedNodes, iNumberOfNodesToSelect, fnMatchFunction);
|
|
@@ -1507,10 +1638,14 @@ sap.ui.define([
|
|
|
1507
1638
|
};
|
|
1508
1639
|
|
|
1509
1640
|
/**
|
|
1510
|
-
* Marks a range of tree nodes as selected/deselected, starting with iFromIndex
|
|
1511
|
-
* The TreeNodes are referenced via their absolute row
|
|
1512
|
-
* Please be aware, that the absolute row index only applies to the tree which is
|
|
1513
|
-
* Invisible nodes (collapsed child nodes) will not be
|
|
1641
|
+
* Marks a range of tree nodes as selected/deselected, starting with <code>iFromIndex</code>
|
|
1642
|
+
* going to <code>iToIndex</code>. The TreeNodes are referenced via their absolute row
|
|
1643
|
+
* index. Please be aware, that the absolute row index only applies to the tree which is
|
|
1644
|
+
* visualized by the TreeTable. Invisible nodes (collapsed child nodes) will not be
|
|
1645
|
+
* regarded.
|
|
1646
|
+
*
|
|
1647
|
+
* @param {number} iFromIndex The first index to mark
|
|
1648
|
+
* @param {number} iToIndex The last index to mark
|
|
1514
1649
|
*/
|
|
1515
1650
|
TreeBindingAdapter.prototype.addSelectionInterval = function (iFromIndex, iToIndex) {
|
|
1516
1651
|
var mParams = this._setSelectionInterval(iFromIndex, iToIndex, true);
|
|
@@ -1518,7 +1653,10 @@ sap.ui.define([
|
|
|
1518
1653
|
};
|
|
1519
1654
|
|
|
1520
1655
|
/**
|
|
1521
|
-
* Removes the selections inside the given range (including boundaries)
|
|
1656
|
+
* Removes the selections inside the given range (including boundaries).
|
|
1657
|
+
*
|
|
1658
|
+
* @param {number} iFromIndex The first index to remove the selection from
|
|
1659
|
+
* @param {number} iToIndex The last index to remove the selection from
|
|
1522
1660
|
*/
|
|
1523
1661
|
TreeBindingAdapter.prototype.removeSelectionInterval = function (iFromIndex, iToIndex) {
|
|
1524
1662
|
var mParams = this._setSelectionInterval(iFromIndex, iToIndex, false);
|
|
@@ -1579,7 +1717,9 @@ sap.ui.define([
|
|
|
1579
1717
|
};
|
|
1580
1718
|
|
|
1581
1719
|
/**
|
|
1582
|
-
* Removes the selection from all nodes
|
|
1720
|
+
* Removes the selection from all nodes.
|
|
1721
|
+
*
|
|
1722
|
+
* @returns {object} An object containing information about the new selection state
|
|
1583
1723
|
* @private
|
|
1584
1724
|
*/
|
|
1585
1725
|
TreeBindingAdapter.prototype._clearSelection = function () {
|
|
@@ -1633,6 +1773,8 @@ sap.ui.define([
|
|
|
1633
1773
|
return true;
|
|
1634
1774
|
}
|
|
1635
1775
|
}
|
|
1776
|
+
|
|
1777
|
+
return false;
|
|
1636
1778
|
};
|
|
1637
1779
|
|
|
1638
1780
|
this._match(this._oRootNode, [], iMaxNumberOfMatches, fnMatch);
|
|
@@ -1650,20 +1792,25 @@ sap.ui.define([
|
|
|
1650
1792
|
};
|
|
1651
1793
|
/**
|
|
1652
1794
|
* Removes the complete selection.
|
|
1653
|
-
*
|
|
1795
|
+
*
|
|
1796
|
+
* @param {boolean} bSuppressSelectionChangeEvent
|
|
1797
|
+
* Whether to suppress the <code>selectionChange</code> event
|
|
1654
1798
|
*/
|
|
1655
|
-
TreeBindingAdapter.prototype.clearSelection = function (
|
|
1799
|
+
TreeBindingAdapter.prototype.clearSelection = function (bSuppressSelectionChangeEvent) {
|
|
1656
1800
|
var oChanges = this._clearSelection();
|
|
1657
1801
|
|
|
1658
1802
|
// check if the selection change event should be suppressed
|
|
1659
|
-
if (!
|
|
1803
|
+
if (!bSuppressSelectionChangeEvent) {
|
|
1660
1804
|
this._publishSelectionChanges(oChanges);
|
|
1661
1805
|
}
|
|
1662
1806
|
};
|
|
1663
1807
|
|
|
1664
1808
|
/**
|
|
1665
|
-
* Fires a
|
|
1666
|
-
*
|
|
1809
|
+
* Fires a <code>selectionChanged</code> event with the given parameters. Also performs a
|
|
1810
|
+
* sanity check on the parameters.
|
|
1811
|
+
*
|
|
1812
|
+
* @param {object} mParams
|
|
1813
|
+
* An object containing information about selection change
|
|
1667
1814
|
*/
|
|
1668
1815
|
TreeBindingAdapter.prototype._publishSelectionChanges = function (mParams) {
|
|
1669
1816
|
|
|
@@ -1694,8 +1841,10 @@ sap.ui.define([
|
|
|
1694
1841
|
};
|
|
1695
1842
|
|
|
1696
1843
|
/**
|
|
1697
|
-
* Sets the node hierarchy to collapse recursive. When set to true, all child nodes will
|
|
1698
|
-
*
|
|
1844
|
+
* Sets the node hierarchy to collapse recursive. When set to true, all child nodes will be
|
|
1845
|
+
* collapsed as well.
|
|
1846
|
+
*
|
|
1847
|
+
* @param {boolean} bCollapseRecursive Whether to enable the recursive collapsing
|
|
1699
1848
|
*/
|
|
1700
1849
|
TreeBindingAdapter.prototype.setCollapseRecursive = function (bCollapseRecursive) {
|
|
1701
1850
|
this.bCollapseRecursive = !!bCollapseRecursive;
|
|
@@ -1703,6 +1852,8 @@ sap.ui.define([
|
|
|
1703
1852
|
|
|
1704
1853
|
/**
|
|
1705
1854
|
* Gets the collapsing behavior when parent nodes are collapsed.
|
|
1855
|
+
*
|
|
1856
|
+
* @returns {boolean} Whether recursive collapsing is enabled
|
|
1706
1857
|
*/
|
|
1707
1858
|
TreeBindingAdapter.prototype.getCollapseRecursive = function () {
|
|
1708
1859
|
return this.bCollapseRecursive;
|