@openui5/sap.ui.core 1.96.5 → 1.99.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 +93 -3
- package/.reuse/dep5 +26 -31
- package/THIRDPARTY.txt +15 -21
- package/package.json +1 -1
- package/src/jquery.sap.global.js +1 -1
- package/src/jquery.sap.mobile.js +29 -19
- 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/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 +81 -169
- package/src/sap/ui/Global.js +11 -16
- package/src/sap/ui/VersionInfo.js +13 -10
- package/src/sap/ui/base/BindingParser.js +34 -7
- 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 +50 -29
- package/src/sap/ui/base/ManagedObjectMetadata.js +1 -1
- 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 +1 -27
- package/src/sap/ui/core/AppCacheBuster.js +4 -4
- package/src/sap/ui/core/BusyIndicator.js +1 -1
- package/src/sap/ui/core/BusyIndicatorUtils.js +1 -1
- package/src/sap/ui/core/Component.js +33 -11
- package/src/sap/ui/core/ComponentContainer.js +1 -1
- package/src/sap/ui/core/ComponentMetadata.js +1 -1
- package/src/sap/ui/core/ComponentSupport.js +1 -1
- package/src/sap/ui/core/Configuration.js +79 -13
- package/src/sap/ui/core/Control.js +4 -3
- package/src/sap/ui/core/Core.js +4 -7
- 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 +6 -12
- 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 +1 -1
- package/src/sap/ui/core/FocusHandler.js +1 -1
- package/src/sap/ui/core/Fragment.js +1 -1
- package/src/sap/ui/core/HTML.js +3 -3
- package/src/sap/ui/core/HTMLRenderer.js +1 -1
- package/src/sap/ui/core/History.js +1 -1
- package/src/sap/ui/core/Icon.js +2 -3
- package/src/sap/ui/core/IconRenderer.js +1 -1
- package/src/sap/ui/core/IndicationColorSupport.js +1 -1
- package/src/sap/ui/core/IntervalTrigger.js +1 -1
- package/src/sap/ui/core/InvisibleMessage.js +1 -1
- package/src/sap/ui/core/InvisibleRenderer.js +1 -1
- package/src/sap/ui/core/InvisibleText.js +1 -1
- package/src/sap/ui/core/Item.js +1 -1
- package/src/sap/ui/core/LabelEnablement.js +9 -2
- 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/LocalBusyIndicatorRenderer.js +2 -2
- package/src/sap/ui/core/LocalBusyIndicatorSupport.js +1 -1
- package/src/sap/ui/core/Locale.js +1 -1
- package/src/sap/ui/core/LocaleData.js +39 -4
- package/src/sap/ui/core/Manifest.js +1 -1
- package/src/sap/ui/core/Message.js +1 -1
- package/src/sap/ui/core/Placeholder.js +28 -28
- package/src/sap/ui/core/Popup.js +3 -3
- package/src/sap/ui/core/RenderManager.js +3 -3
- package/src/sap/ui/core/Renderer.js +1 -1
- package/src/sap/ui/core/ResizeHandler.js +1 -1
- package/src/sap/ui/core/ScrollBar.js +4 -3
- package/src/sap/ui/core/ScrollBarRenderer.js +1 -1
- package/src/sap/ui/core/SeparatorItem.js +1 -1
- 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 +2 -2
- package/src/sap/ui/core/UIArea.js +3 -3
- package/src/sap/ui/core/UIComponent.js +1 -1
- package/src/sap/ui/core/UIComponentMetadata.js +1 -1
- package/src/sap/ui/core/ValueStateSupport.js +1 -1
- package/src/sap/ui/core/VariantLayoutData.js +1 -1
- package/src/sap/ui/core/XMLComposite.js +1 -1
- package/src/sap/ui/core/XMLCompositeMetadata.js +1 -1
- package/src/sap/ui/core/XMLTemplateProcessor.js +26 -5
- package/src/sap/ui/core/_IconRegistry.js +10 -1
- package/src/sap/ui/core/cache/LRUPersistentCache.js +4 -2
- package/src/sap/ui/core/date/Japanese.js +1 -1
- package/src/sap/ui/core/date/UniversalDateUtils.js +205 -2
- package/src/sap/ui/core/delegate/ItemNavigation.js +1 -1
- package/src/sap/ui/core/delegate/ScrollEnablement.js +9 -6
- package/src/sap/ui/core/dnd/DragAndDrop.js +2 -2
- package/src/sap/ui/core/dnd/DragDropBase.js +1 -1
- package/src/sap/ui/core/dnd/DragDropInfo.js +1 -1
- package/src/sap/ui/core/dnd/DragInfo.js +1 -1
- package/src/sap/ui/core/dnd/DropInfo.js +1 -1
- package/src/sap/ui/core/format/DateFormat.js +562 -174
- package/src/sap/ui/core/format/DateFormatTimezoneDisplay.js +43 -0
- package/src/sap/ui/core/format/ListFormat.js +2 -2
- package/src/sap/ui/core/format/NumberFormat.js +1 -1
- package/src/sap/ui/core/format/TimezoneUtil.js +248 -0
- package/src/sap/ui/core/hyphenation/Hyphenation.js +1 -1
- package/src/sap/ui/core/library.js +47 -10
- 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 +1 -1
- package/src/sap/ui/core/message/MessageMixin.js +2 -1
- 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.properties +4 -0
- package/src/sap/ui/core/messagebundle_ar.properties +2 -0
- package/src/sap/ui/core/messagebundle_bg.properties +7 -5
- package/src/sap/ui/core/messagebundle_ca.properties +2 -0
- package/src/sap/ui/core/messagebundle_cs.properties +2 -0
- package/src/sap/ui/core/messagebundle_cy.properties +2 -0
- package/src/sap/ui/core/messagebundle_da.properties +2 -0
- package/src/sap/ui/core/messagebundle_de.properties +3 -1
- package/src/sap/ui/core/messagebundle_el.properties +2 -0
- package/src/sap/ui/core/messagebundle_en.properties +2 -0
- package/src/sap/ui/core/messagebundle_en_GB.properties +2 -0
- package/src/sap/ui/core/messagebundle_en_US_sappsd.properties +2 -0
- package/src/sap/ui/core/messagebundle_en_US_saprigi.properties +1 -0
- package/src/sap/ui/core/messagebundle_en_US_saptrc.properties +2 -0
- package/src/sap/ui/core/messagebundle_es.properties +2 -0
- package/src/sap/ui/core/messagebundle_es_MX.properties +2 -0
- package/src/sap/ui/core/messagebundle_et.properties +2 -0
- package/src/sap/ui/core/messagebundle_fi.properties +2 -0
- package/src/sap/ui/core/messagebundle_fr.properties +9 -7
- package/src/sap/ui/core/messagebundle_fr_CA.properties +2 -0
- package/src/sap/ui/core/messagebundle_hi.properties +2 -0
- package/src/sap/ui/core/messagebundle_hr.properties +2 -0
- package/src/sap/ui/core/messagebundle_hu.properties +2 -0
- package/src/sap/ui/core/messagebundle_id.properties +4 -2
- package/src/sap/ui/core/messagebundle_it.properties +3 -1
- package/src/sap/ui/core/messagebundle_iw.properties +2 -0
- package/src/sap/ui/core/messagebundle_ja.properties +2 -0
- package/src/sap/ui/core/messagebundle_kk.properties +2 -0
- package/src/sap/ui/core/messagebundle_ko.properties +2 -0
- package/src/sap/ui/core/messagebundle_lt.properties +2 -0
- package/src/sap/ui/core/messagebundle_lv.properties +3 -1
- package/src/sap/ui/core/messagebundle_ms.properties +2 -0
- package/src/sap/ui/core/messagebundle_nl.properties +2 -0
- package/src/sap/ui/core/messagebundle_no.properties +6 -4
- package/src/sap/ui/core/messagebundle_pl.properties +2 -0
- package/src/sap/ui/core/messagebundle_pt.properties +2 -0
- package/src/sap/ui/core/messagebundle_pt_PT.properties +2 -0
- package/src/sap/ui/core/messagebundle_ro.properties +2 -0
- package/src/sap/ui/core/messagebundle_ru.properties +23 -21
- package/src/sap/ui/core/messagebundle_sh.properties +2 -0
- package/src/sap/ui/core/messagebundle_sk.properties +2 -0
- package/src/sap/ui/core/messagebundle_sl.properties +2 -0
- package/src/sap/ui/core/messagebundle_sv.properties +2 -0
- package/src/sap/ui/core/messagebundle_th.properties +2 -0
- package/src/sap/ui/core/messagebundle_tr.properties +2 -0
- package/src/sap/ui/core/messagebundle_uk.properties +2 -0
- package/src/sap/ui/core/messagebundle_vi.properties +2 -0
- package/src/sap/ui/core/messagebundle_zh_CN.properties +2 -0
- package/src/sap/ui/core/messagebundle_zh_TW.properties +2 -0
- package/src/sap/ui/core/mvc/Controller.js +4 -4
- package/src/sap/ui/core/mvc/HTMLView.js +1 -1
- package/src/sap/ui/core/mvc/HTMLViewRenderer.js +1 -1
- package/src/sap/ui/core/mvc/JSONView.js +2 -1
- package/src/sap/ui/core/mvc/JSONViewRenderer.js +1 -1
- package/src/sap/ui/core/mvc/JSView.js +1 -1
- package/src/sap/ui/core/mvc/JSViewRenderer.js +1 -1
- package/src/sap/ui/core/mvc/TemplateView.js +1 -1
- package/src/sap/ui/core/mvc/TemplateViewRenderer.js +1 -1
- package/src/sap/ui/core/mvc/View.js +2 -1
- package/src/sap/ui/core/mvc/ViewRenderer.js +1 -1
- package/src/sap/ui/core/mvc/XMLView.js +16 -3
- 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 +6 -6
- package/src/sap/ui/core/routing/Router.js +4 -3
- package/src/sap/ui/core/routing/Targets.js +17 -13
- package/src/sap/ui/core/rules/Misc.support.js +51 -1
- package/src/sap/ui/core/rules/Model.support.js +95 -8
- 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 +1 -1
- package/src/sap/ui/core/support/plugins/Interaction.js +1 -1
- package/src/sap/ui/core/support/plugins/LocalStorage.js +1 -1
- package/src/sap/ui/core/support/plugins/Performance.js +1 -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 +1 -1
- package/src/sap/ui/core/support/techinfo/TechnicalInfo.js +2 -6
- package/src/sap/ui/core/support/trace/E2eTraceLib.js +3 -3
- package/src/sap/ui/core/themes/base/fonts/SAP-icons.woff2 +0 -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/DraftEnabledMockServer.js +21 -16
- 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 +157 -58
- package/src/sap/ui/core/util/PasteHelper.js +4 -4
- package/src/sap/ui/core/util/XMLPreprocessor.js +16 -4
- package/src/sap/ui/core/util/reflection/XmlTreeModifier.js +1 -1
- package/src/sap/ui/core/util/serializer/HTMLViewSerializer.js +1 -1
- package/src/sap/ui/core/util/serializer/Serializer.js +1 -1
- package/src/sap/ui/core/util/serializer/ViewSerializer.js +1 -1
- package/src/sap/ui/core/util/serializer/XMLViewSerializer.js +1 -1
- package/src/sap/ui/core/util/serializer/delegate/Delegate.js +1 -1
- package/src/sap/ui/core/util/serializer/delegate/HTML.js +1 -1
- package/src/sap/ui/core/util/serializer/delegate/XML.js +1 -1
- package/src/sap/ui/core/ws/ReadyState.js +1 -1
- package/src/sap/ui/core/ws/SapPcpWebSocket.js +1 -1
- package/src/sap/ui/core/ws/WebSocket.js +1 -1
- package/src/sap/ui/debug/ControlTree.js +1 -1
- package/src/sap/ui/debug/DebugEnv.js +1 -1
- package/src/sap/ui/debug/PropertyList.js +1 -1
- package/src/sap/ui/dom/includeStylesheet.js +8 -3
- package/src/sap/ui/events/jquery/EventExtension.js +1 -1
- package/src/sap/ui/events/jquery/EventSimulation.js +3 -13
- package/src/sap/ui/model/Binding.js +4 -3
- package/src/sap/ui/model/ChangeReason.js +1 -1
- package/src/sap/ui/model/ClientListBinding.js +7 -0
- package/src/sap/ui/model/ClientModel.js +6 -5
- package/src/sap/ui/model/ClientTreeBinding.js +1 -1
- package/src/sap/ui/model/ClientTreeBindingAdapter.js +1 -1
- package/src/sap/ui/model/CompositeBinding.js +1 -1
- package/src/sap/ui/model/CompositeDataState.js +26 -4
- package/src/sap/ui/model/CompositeType.js +1 -1
- package/src/sap/ui/model/ContextBinding.js +1 -1
- package/src/sap/ui/model/DataState.js +27 -6
- package/src/sap/ui/model/ListBinding.js +24 -5
- package/src/sap/ui/model/MetaModel.js +2 -3
- package/src/sap/ui/model/Model.js +6 -11
- package/src/sap/ui/model/SelectionModel.js +1 -1
- package/src/sap/ui/model/SimpleType.js +1 -1
- package/src/sap/ui/model/TreeAutoExpandMode.js +1 -1
- package/src/sap/ui/model/TreeBindingAdapter.js +0 -2
- package/src/sap/ui/model/TreeBindingUtils.js +2 -0
- package/src/sap/ui/model/Type.js +1 -1
- package/src/sap/ui/model/analytics/AnalyticalBinding.js +13 -8
- package/src/sap/ui/model/analytics/AnalyticalTreeBindingAdapter.js +16 -18
- package/src/sap/ui/model/analytics/ODataModelAdapter.js +2 -15
- package/src/sap/ui/model/base/ManagedObjectModel.js +1 -1
- package/src/sap/ui/model/json/JSONListBinding.js +1 -1
- package/src/sap/ui/model/json/JSONModel.js +7 -7
- package/src/sap/ui/model/json/JSONPropertyBinding.js +2 -2
- package/src/sap/ui/model/message/MessageListBinding.js +1 -1
- package/src/sap/ui/model/message/MessageModel.js +3 -3
- package/src/sap/ui/model/message/MessagePropertyBinding.js +2 -2
- package/src/sap/ui/model/odata/AnnotationHelper.js +2 -2
- package/src/sap/ui/model/odata/AnnotationParser.js +4 -2
- package/src/sap/ui/model/odata/ODataAnnotations.js +1 -1
- package/src/sap/ui/model/odata/ODataListBinding.js +62 -39
- package/src/sap/ui/model/odata/ODataMessageParser.js +2 -2
- package/src/sap/ui/model/odata/ODataMetaModel.js +3 -3
- package/src/sap/ui/model/odata/ODataMetadata.js +138 -87
- package/src/sap/ui/model/odata/ODataModel.js +443 -216
- package/src/sap/ui/model/odata/ODataPropertyBinding.js +7 -5
- package/src/sap/ui/model/odata/ODataTreeBinding.js +1 -1
- package/src/sap/ui/model/odata/ODataTreeBindingAdapter.js +27 -17
- package/src/sap/ui/model/odata/ODataTreeBindingFlat.js +440 -260
- package/src/sap/ui/model/odata/ODataUtils.js +24 -9
- package/src/sap/ui/model/odata/_AnnotationHelperBasics.js +3 -2
- package/src/sap/ui/model/odata/_AnnotationHelperExpression.js +11 -9
- package/src/sap/ui/model/odata/_ODataMetaModelUtils.js +7 -5
- package/src/sap/ui/model/odata/type/Boolean.js +1 -1
- package/src/sap/ui/model/odata/type/Byte.js +1 -1
- package/src/sap/ui/model/odata/type/Currency.js +1 -1
- package/src/sap/ui/model/odata/type/Date.js +1 -1
- package/src/sap/ui/model/odata/type/DateTime.js +1 -1
- package/src/sap/ui/model/odata/type/DateTimeBase.js +1 -1
- package/src/sap/ui/model/odata/type/DateTimeOffset.js +1 -1
- package/src/sap/ui/model/odata/type/DateTimeWithTimezone.js +338 -0
- 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 +1 -2
- package/src/sap/ui/model/odata/v2/Context.js +98 -14
- package/src/sap/ui/model/odata/v2/ODataAnnotations.js +1 -1
- package/src/sap/ui/model/odata/v2/ODataContextBinding.js +8 -4
- package/src/sap/ui/model/odata/v2/ODataListBinding.js +418 -172
- package/src/sap/ui/model/odata/v2/ODataModel.js +242 -138
- package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +164 -92
- package/src/sap/ui/model/odata/v2/_CreatedContextsCache.js +117 -7
- package/src/sap/ui/model/odata/v4/AnnotationHelper.js +21 -22
- package/src/sap/ui/model/odata/v4/Context.js +249 -83
- package/src/sap/ui/model/odata/v4/ODataBinding.js +100 -43
- package/src/sap/ui/model/odata/v4/ODataContextBinding.js +309 -228
- package/src/sap/ui/model/odata/v4/ODataListBinding.js +573 -278
- package/src/sap/ui/model/odata/v4/ODataMetaModel.js +131 -100
- package/src/sap/ui/model/odata/v4/ODataModel.js +342 -259
- package/src/sap/ui/model/odata/v4/ODataParentBinding.js +113 -100
- package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +87 -81
- package/src/sap/ui/model/odata/v4/ODataUtils.js +5 -5
- package/src/sap/ui/model/odata/v4/SubmitMode.js +0 -1
- package/src/sap/ui/model/odata/v4/ValueListType.js +0 -1
- package/src/sap/ui/model/odata/v4/_AnnotationHelperExpression.js +20 -20
- package/src/sap/ui/model/odata/v4/lib/_AggregationCache.js +3 -5
- package/src/sap/ui/model/odata/v4/lib/_AggregationHelper.js +5 -4
- package/src/sap/ui/model/odata/v4/lib/_Batch.js +21 -20
- package/src/sap/ui/model/odata/v4/lib/_Cache.js +278 -103
- package/src/sap/ui/model/odata/v4/lib/_GroupLock.js +1 -1
- package/src/sap/ui/model/odata/v4/lib/_Helper.js +55 -21
- package/src/sap/ui/model/odata/v4/lib/_MetadataConverter.js +62 -61
- package/src/sap/ui/model/odata/v4/lib/_MetadataRequestor.js +1 -1
- package/src/sap/ui/model/odata/v4/lib/_Parser.js +52 -43
- package/src/sap/ui/model/odata/v4/lib/_Requestor.js +61 -41
- package/src/sap/ui/model/odata/v4/lib/_V2MetadataConverter.js +147 -147
- package/src/sap/ui/model/odata/v4/lib/_V2Requestor.js +14 -13
- package/src/sap/ui/model/odata/v4/lib/_V4MetadataConverter.js +66 -67
- package/src/sap/ui/model/resource/ResourceModel.js +1 -1
- package/src/sap/ui/model/resource/ResourcePropertyBinding.js +1 -1
- package/src/sap/ui/model/type/Boolean.js +1 -1
- package/src/sap/ui/model/type/Currency.js +1 -1
- package/src/sap/ui/model/type/Date.js +1 -1
- package/src/sap/ui/model/type/DateInterval.js +1 -1
- package/src/sap/ui/model/type/DateTime.js +1 -1
- package/src/sap/ui/model/type/DateTimeInterval.js +1 -1
- package/src/sap/ui/model/type/FileSize.js +1 -1
- package/src/sap/ui/model/type/Float.js +1 -1
- package/src/sap/ui/model/type/Integer.js +1 -1
- package/src/sap/ui/model/type/String.js +1 -1
- package/src/sap/ui/model/type/Time.js +1 -1
- package/src/sap/ui/model/type/TimeInterval.js +1 -1
- package/src/sap/ui/model/type/Unit.js +1 -1
- package/src/sap/ui/model/xml/XMLListBinding.js +1 -1
- package/src/sap/ui/model/xml/XMLModel.js +5 -5
- package/src/sap/ui/model/xml/XMLPropertyBinding.js +2 -2
- package/src/sap/ui/performance/trace/Passport.js +3 -3
- package/src/sap/ui/qunit/utils/ControlIterator.js +1 -1
- package/src/sap/ui/qunit/utils/MemoryLeakCheck.js +1 -1
- package/src/sap/ui/test/BlanketReporter.js +1 -1
- package/src/sap/ui/test/Opa5.js +1 -1
- package/src/sap/ui/test/TestUtils.js +2 -2
- package/src/sap/ui/test/_LogCollector.js +1 -1
- package/src/sap/ui/test/actions/Action.js +11 -2
- package/src/sap/ui/test/actions/Press.js +79 -3
- package/src/sap/ui/test/autowaiter/_XHRWaiter.js +1 -1
- package/src/sap/ui/test/generic/_EnforceSemanticRendering.js +111 -0
- package/src/sap/ui/test/starter/createSuite.js +1 -2
- package/src/sap/ui/thirdparty/jquery-mobile-custom.js +3 -6
- package/src/sap/ui/thirdparty/jqueryui/jquery-ui-datepicker.js +143 -3
- package/src/sap/ui/thirdparty/jqueryui/jquery-ui-position.js +8 -1
- package/src/sap/ui/util/Mobile.js +28 -39
- package/src/sap/ui/util/Storage.js +1 -1
- package/src/sap/ui/util/XMLHelper.js +53 -30
- package/src/ui5loader.js +9 -9
- package/ui5.yaml +244 -1
- package/src/sap/ui/core/CustomizingConfiguration.js +0 -47
- 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/unorm.js +0 -1
- package/src/sap/ui/thirdparty/unormdata.js +0 -1
|
@@ -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.99.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
|
|
|
@@ -885,8 +906,7 @@ sap.ui.define([
|
|
|
885
906
|
* Retrieves parent ids from a given data set
|
|
886
907
|
*
|
|
887
908
|
* @param {Array} aData Lookup array to search for parent ids
|
|
888
|
-
* @
|
|
889
|
-
* @returns {Array} Array of all parent ids
|
|
909
|
+
* @returns {Object<string,string>} Map of all parent ids
|
|
890
910
|
*
|
|
891
911
|
* @private
|
|
892
912
|
*/
|
|
@@ -908,8 +928,12 @@ sap.ui.define([
|
|
|
908
928
|
/**
|
|
909
929
|
* Creates key map for given data
|
|
910
930
|
*
|
|
911
|
-
* @param {Array} aData
|
|
912
|
-
*
|
|
931
|
+
* @param {Array} aData
|
|
932
|
+
* Data which should be preprocessed
|
|
933
|
+
* @param {boolean} bSkipFirstNode
|
|
934
|
+
* Whether to skip the first node
|
|
935
|
+
* @returns {Object<string,string[]>|undefined}
|
|
936
|
+
* Map of parent and child keys or <code>undefined</code> when <code>aData</code> is empty
|
|
913
937
|
*
|
|
914
938
|
* @private
|
|
915
939
|
*/
|
|
@@ -935,6 +959,8 @@ sap.ui.define([
|
|
|
935
959
|
|
|
936
960
|
return mKeys;
|
|
937
961
|
}
|
|
962
|
+
|
|
963
|
+
return undefined;
|
|
938
964
|
};
|
|
939
965
|
|
|
940
966
|
/**
|
|
@@ -961,8 +987,8 @@ sap.ui.define([
|
|
|
961
987
|
/**
|
|
962
988
|
* Update node key in case if it changes
|
|
963
989
|
*
|
|
964
|
-
* @param {object} oNode
|
|
965
|
-
* @param {string} sNewKey
|
|
990
|
+
* @param {object} oNode The node
|
|
991
|
+
* @param {string} sNewKey The new key
|
|
966
992
|
*
|
|
967
993
|
* @private
|
|
968
994
|
*/
|
|
@@ -1066,17 +1092,27 @@ sap.ui.define([
|
|
|
1066
1092
|
/**
|
|
1067
1093
|
* Triggers backend requests to load the child nodes of the node with the given sNodeId.
|
|
1068
1094
|
*
|
|
1069
|
-
* @param {string} sNodeId
|
|
1070
|
-
*
|
|
1071
|
-
* @param {int}
|
|
1072
|
-
*
|
|
1073
|
-
* @param {
|
|
1074
|
-
*
|
|
1075
|
-
* @param {
|
|
1095
|
+
* @param {string} sNodeId
|
|
1096
|
+
* The value of the hierarchy node property on which a parent node filter will be performed
|
|
1097
|
+
* @param {int} iStartIndex
|
|
1098
|
+
* Start index of the page
|
|
1099
|
+
* @param {int} iLength
|
|
1100
|
+
* Length of the page
|
|
1101
|
+
* @param {int} iThreshold
|
|
1102
|
+
* Additionally loaded entities
|
|
1103
|
+
* @param {array} aParams
|
|
1104
|
+
* OData URL parameters, already concatenated with "="
|
|
1105
|
+
* @param {object} mParameters
|
|
1106
|
+
* Additional request parameters
|
|
1107
|
+
* @param {object} mParameters.navPath
|
|
1108
|
+
* The navigation path
|
|
1109
|
+
* @param {object} oRequestedSection
|
|
1110
|
+
* The requested section
|
|
1076
1111
|
*
|
|
1077
1112
|
* @private
|
|
1078
1113
|
*/
|
|
1079
|
-
ODataTreeBinding.prototype._loadSubNodes = function(sNodeId, iStartIndex, iLength, iThreshold,
|
|
1114
|
+
ODataTreeBinding.prototype._loadSubNodes = function(sNodeId, iStartIndex, iLength, iThreshold,
|
|
1115
|
+
aParams, mParameters, oRequestedSection) {
|
|
1080
1116
|
var that = this,
|
|
1081
1117
|
sGroupId,
|
|
1082
1118
|
bInlineCountRequested = false;
|
|
@@ -1102,6 +1138,7 @@ sap.ui.define([
|
|
|
1102
1138
|
var sRequestKey = "" + sNodeId + "-" + iStartIndex + "-" + this._iPageSize + "-" + iThreshold;
|
|
1103
1139
|
|
|
1104
1140
|
function fnSuccess(oData) {
|
|
1141
|
+
var oEntry, i;
|
|
1105
1142
|
|
|
1106
1143
|
if (oData) {
|
|
1107
1144
|
// make sure we have a keys array
|
|
@@ -1123,8 +1160,8 @@ sap.ui.define([
|
|
|
1123
1160
|
if (that.bHasTreeAnnotations) {
|
|
1124
1161
|
var mLastNodeIdIndices = {};
|
|
1125
1162
|
|
|
1126
|
-
for (
|
|
1127
|
-
|
|
1163
|
+
for (i = 0; i < oData.results.length; i++) {
|
|
1164
|
+
oEntry = oData.results[i];
|
|
1128
1165
|
|
|
1129
1166
|
if (i == 0) {
|
|
1130
1167
|
mLastNodeIdIndices[sNodeId] = iStartIndex;
|
|
@@ -1137,8 +1174,8 @@ sap.ui.define([
|
|
|
1137
1174
|
}
|
|
1138
1175
|
} else {
|
|
1139
1176
|
// Case 1b: Navigation Properties
|
|
1140
|
-
for (
|
|
1141
|
-
|
|
1177
|
+
for (i = 0; i < oData.results.length; i++) {
|
|
1178
|
+
oEntry = oData.results[i];
|
|
1142
1179
|
var sKey = that.oModel._getKey(oEntry);
|
|
1143
1180
|
that._processODataObject(oEntry, "/" + sKey, mParameters.navPath);
|
|
1144
1181
|
that.oKeys[sNodeId][i + iStartIndex] = sKey;
|
|
@@ -1225,9 +1262,11 @@ sap.ui.define([
|
|
|
1225
1262
|
ODataTreeBinding.REQUEST_KEY_CLIENT = "_OPERATIONMODE_CLIENT_TREE_LOADING";
|
|
1226
1263
|
|
|
1227
1264
|
/**
|
|
1228
|
-
* Loads the complete collection from the given binding path.
|
|
1229
|
-
*
|
|
1265
|
+
* Loads the complete collection from the given binding path. The tree is then reconstructed
|
|
1266
|
+
* from the response entries based on the properties with hierarchy annotations.
|
|
1230
1267
|
* Adds additional URL parameters.
|
|
1268
|
+
*
|
|
1269
|
+
* @param {string[]} aURLParams Additional URL parameters
|
|
1231
1270
|
*/
|
|
1232
1271
|
ODataTreeBinding.prototype._loadCompleteTreeWithAnnotations = function (aURLParams) {
|
|
1233
1272
|
var that = this;
|
|
@@ -1375,16 +1414,11 @@ sap.ui.define([
|
|
|
1375
1414
|
} else {
|
|
1376
1415
|
this.oKeys = {};
|
|
1377
1416
|
|
|
1378
|
-
// the internal operation mode might change, the external operation mode
|
|
1417
|
+
// the internal operation mode might change, the external operation mode
|
|
1418
|
+
// (this.sOperationMode) will always be the original value
|
|
1379
1419
|
// internal operation mode switch, default is the same as "OperationMode.Server"
|
|
1380
|
-
this.bClientOperation =
|
|
1420
|
+
this.bClientOperation = this.sOperationMode === OperationMode.Client;
|
|
1381
1421
|
|
|
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
1422
|
// if no data is available after the reset we can't be sure the threshold is met or rejected
|
|
1389
1423
|
this.bThresholdRejected = false;
|
|
1390
1424
|
|
|
@@ -1439,8 +1473,8 @@ sap.ui.define([
|
|
|
1439
1473
|
* validation, use the parameter <code>bForceUpdate</code>.
|
|
1440
1474
|
*
|
|
1441
1475
|
* @param {boolean} [bForceUpdate] Update the bound control even if no data has been changed
|
|
1442
|
-
* @param {object} [mChangedEntities]
|
|
1443
|
-
* @param {string} [mEntityTypes]
|
|
1476
|
+
* @param {object} [mChangedEntities] A map of changed entities
|
|
1477
|
+
* @param {string} [mEntityTypes] A map of entity types
|
|
1444
1478
|
*
|
|
1445
1479
|
* @private
|
|
1446
1480
|
*/
|
|
@@ -1527,7 +1561,12 @@ sap.ui.define([
|
|
|
1527
1561
|
* @param {sap.ui.model.FilterType} sFilterType
|
|
1528
1562
|
* Type of the filter which should be adjusted. If it is not given,
|
|
1529
1563
|
* the type <code>FilterType.Control</code> is assumed
|
|
1530
|
-
* @
|
|
1564
|
+
* @param {boolean} [bReturnSuccess]
|
|
1565
|
+
* Whether to return <code>true</code> or <code>false</code>, instead of <code>this</code>,
|
|
1566
|
+
* depending on whether the filtering has been done
|
|
1567
|
+
* @return {this}
|
|
1568
|
+
* Returns <code>this</code> to facilitate method chaining
|
|
1569
|
+
*
|
|
1531
1570
|
* @see sap.ui.model.TreeBinding.prototype.filter
|
|
1532
1571
|
* @public
|
|
1533
1572
|
*/
|
|
@@ -1542,7 +1581,8 @@ sap.ui.define([
|
|
|
1542
1581
|
if (sFilterType == FilterType.Control && (!this.bClientOperation || this.sOperationMode == OperationMode.Server)) {
|
|
1543
1582
|
Log.warning("Filtering with ControlFilters is ONLY possible if the ODataTreeBinding is running in OperationMode.Client or " +
|
|
1544
1583
|
"OperationMode.Auto, in case the given threshold is lower than the total number of tree nodes.");
|
|
1545
|
-
|
|
1584
|
+
|
|
1585
|
+
return this;
|
|
1546
1586
|
}
|
|
1547
1587
|
|
|
1548
1588
|
// empty filters
|
|
@@ -1678,11 +1718,17 @@ sap.ui.define([
|
|
|
1678
1718
|
};
|
|
1679
1719
|
|
|
1680
1720
|
/**
|
|
1681
|
-
* Sorts the Tree according to the given Sorter(s).
|
|
1682
|
-
*
|
|
1683
|
-
*
|
|
1684
|
-
*
|
|
1721
|
+
* Sorts the Tree according to the given Sorter(s). In <code>OperationMode.Client</code> or
|
|
1722
|
+
* <code>OperationMode.Auto</code> (if the given threshold is satisfied), the sorters are
|
|
1723
|
+
* applied locally on the client.
|
|
1724
|
+
*
|
|
1725
|
+
* @param {sap.ui.model.Sorter[]|sap.ui.model.Sorter} aSorters
|
|
1726
|
+
* The Sorter or an Array of sap.ui.model.Sorter instances
|
|
1727
|
+
* @param {boolean} [bReturnSuccess]
|
|
1728
|
+
* Whether to return <code>true</code> or <code>false</code>, instead of <code>this</code>,
|
|
1729
|
+
* depending on whether the sorting has been done
|
|
1685
1730
|
* @return {this} returns <code>this</code> to facilitate method chaining
|
|
1731
|
+
*
|
|
1686
1732
|
* @public
|
|
1687
1733
|
*/
|
|
1688
1734
|
ODataTreeBinding.prototype.sort = function(aSorters, bReturnSuccess) {
|
|
@@ -1726,6 +1772,10 @@ sap.ui.define([
|
|
|
1726
1772
|
/**
|
|
1727
1773
|
* Sets the comparator for each sorter in the sorters array according to the
|
|
1728
1774
|
* Edm type of the sort property
|
|
1775
|
+
*
|
|
1776
|
+
* @param {sap.ui.model.Sorter[]} aSorters The sorters
|
|
1777
|
+
* @param {object} oEntityType The entity type of the collection
|
|
1778
|
+
*
|
|
1729
1779
|
* @private
|
|
1730
1780
|
*/
|
|
1731
1781
|
ODataTreeBinding.prototype.addSortComparators = function(aSorters, oEntityType) {
|
|
@@ -1767,10 +1817,13 @@ sap.ui.define([
|
|
|
1767
1817
|
};
|
|
1768
1818
|
|
|
1769
1819
|
/**
|
|
1770
|
-
* Check whether this Binding would provide new values and in case it changed,
|
|
1771
|
-
*
|
|
1820
|
+
* Check whether this Binding would provide new values and in case it changed,fire a change
|
|
1821
|
+
* event.
|
|
1772
1822
|
*
|
|
1773
|
-
* @param {boolean} bForceUpdate
|
|
1823
|
+
* @param {boolean} [bForceUpdate]
|
|
1824
|
+
* Whether to fire the event regardless of the bindings state
|
|
1825
|
+
* @param {object} mChangedEntities
|
|
1826
|
+
* A map of changed entities
|
|
1774
1827
|
*
|
|
1775
1828
|
* @private
|
|
1776
1829
|
*/
|
|
@@ -1788,10 +1841,14 @@ sap.ui.define([
|
|
|
1788
1841
|
bChangeDetected = true;
|
|
1789
1842
|
return false;
|
|
1790
1843
|
}
|
|
1844
|
+
|
|
1845
|
+
return true;
|
|
1791
1846
|
});
|
|
1792
1847
|
if (bChangeDetected) {
|
|
1793
1848
|
return false;
|
|
1794
1849
|
}
|
|
1850
|
+
|
|
1851
|
+
return true;
|
|
1795
1852
|
});
|
|
1796
1853
|
}
|
|
1797
1854
|
}
|
|
@@ -1807,7 +1864,9 @@ sap.ui.define([
|
|
|
1807
1864
|
* Splits the given path along the navigation properties.
|
|
1808
1865
|
* Only used when bound against a service, which describes the tree via navigation properties.
|
|
1809
1866
|
*
|
|
1810
|
-
* @param {string} sPath
|
|
1867
|
+
* @param {string} sPath The path
|
|
1868
|
+
* @returns {string} The split path
|
|
1869
|
+
*
|
|
1811
1870
|
* @private
|
|
1812
1871
|
*/
|
|
1813
1872
|
ODataTreeBinding.prototype._getNavPath = function(sPath) {
|
|
@@ -1815,7 +1874,7 @@ sap.ui.define([
|
|
|
1815
1874
|
var sAbsolutePath = this.oModel.resolve(sPath, this.getContext());
|
|
1816
1875
|
|
|
1817
1876
|
if (!sAbsolutePath) {
|
|
1818
|
-
return;
|
|
1877
|
+
return undefined;
|
|
1819
1878
|
}
|
|
1820
1879
|
|
|
1821
1880
|
var aPathParts = sAbsolutePath.split("/"),
|
|
@@ -1828,6 +1887,7 @@ sap.ui.define([
|
|
|
1828
1887
|
//Replace context with subitems context
|
|
1829
1888
|
sNavPath = this.oNavigationPaths[sCurrent];
|
|
1830
1889
|
}
|
|
1890
|
+
|
|
1831
1891
|
return sNavPath;
|
|
1832
1892
|
};
|
|
1833
1893
|
|
|
@@ -1879,6 +1939,8 @@ sap.ui.define([
|
|
|
1879
1939
|
*
|
|
1880
1940
|
* The extracted hierarchy information will be stored in "this.oTreeProperties" (if any)
|
|
1881
1941
|
*
|
|
1942
|
+
* @returns {boolean} Whether the metadata has tree annotations
|
|
1943
|
+
*
|
|
1882
1944
|
* @private
|
|
1883
1945
|
*/
|
|
1884
1946
|
ODataTreeBinding.prototype._hasTreeAnnotations = function() {
|
|
@@ -1955,6 +2017,8 @@ sap.ui.define([
|
|
|
1955
2017
|
that.oTreeProperties[sName] = oProperty.name;
|
|
1956
2018
|
}
|
|
1957
2019
|
});
|
|
2020
|
+
|
|
2021
|
+
return true;
|
|
1958
2022
|
});
|
|
1959
2023
|
|
|
1960
2024
|
return fnSanityCheckTreeAnnotations();
|
|
@@ -2038,10 +2102,12 @@ sap.ui.define([
|
|
|
2038
2102
|
/**
|
|
2039
2103
|
* Initially only apply the Adapter interface.
|
|
2040
2104
|
* The real adapter will be applied after the initialize.
|
|
2105
|
+
*
|
|
2106
|
+
* @returns {this} A reference to itself
|
|
2041
2107
|
* @private
|
|
2042
2108
|
*/
|
|
2043
2109
|
ODataTreeBinding.prototype.applyAdapterInterface = function () {
|
|
2044
|
-
|
|
2110
|
+
/*
|
|
2045
2111
|
* Data Interface.
|
|
2046
2112
|
* Documentation, see the corresponding Adapter classes.
|
|
2047
2113
|
*/
|
|
@@ -2060,7 +2126,7 @@ sap.ui.define([
|
|
|
2060
2126
|
this.getContextByIndex = this.getContextByIndex || function () {
|
|
2061
2127
|
return;
|
|
2062
2128
|
};
|
|
2063
|
-
|
|
2129
|
+
/*
|
|
2064
2130
|
* Event Interface.
|
|
2065
2131
|
* Documentation, see the corresponding Adapter classes.
|
|
2066
2132
|
*/
|
|
@@ -2121,6 +2187,8 @@ sap.ui.define([
|
|
|
2121
2187
|
that.oTreeProperties[sName] = oProperty.name;
|
|
2122
2188
|
}
|
|
2123
2189
|
});
|
|
2190
|
+
|
|
2191
|
+
return true;
|
|
2124
2192
|
});
|
|
2125
2193
|
//perform magnitude annotation check
|
|
2126
2194
|
this.oTreeProperties[sMagnitudeAnnotation] = this.oTreeProperties[sMagnitudeAnnotation]
|
|
@@ -2285,9 +2353,7 @@ sap.ui.define([
|
|
|
2285
2353
|
|
|
2286
2354
|
sPath = this.getResolvedPath();
|
|
2287
2355
|
|
|
2288
|
-
|
|
2289
|
-
return this.oModel._createRequestUrl(sPath, null, aParams);
|
|
2290
|
-
}
|
|
2356
|
+
return sPath && this.oModel._createRequestUrl(sPath, null, aParams);
|
|
2291
2357
|
};
|
|
2292
2358
|
|
|
2293
2359
|
/**
|
|
@@ -2330,7 +2396,8 @@ sap.ui.define([
|
|
|
2330
2396
|
* annotation specification,
|
|
2331
2397
|
* or when providing the annotation information locally as a binding parameter.
|
|
2332
2398
|
* For more information, see {@link sap.ui.model.odata.v2.ODataModel#bindTree}.
|
|
2333
|
-
*
|
|
2399
|
+
*
|
|
2400
|
+
* @param {int} iRootLevel The new <code>rootLevel</code>
|
|
2334
2401
|
*
|
|
2335
2402
|
* @public
|
|
2336
2403
|
*/
|
|
@@ -2347,7 +2414,8 @@ sap.ui.define([
|
|
|
2347
2414
|
|
|
2348
2415
|
/**
|
|
2349
2416
|
* Returns the rootLevel
|
|
2350
|
-
*
|
|
2417
|
+
*
|
|
2418
|
+
* @returns {int} The root level
|
|
2351
2419
|
*
|
|
2352
2420
|
* @public
|
|
2353
2421
|
*/
|
|
@@ -2357,9 +2425,13 @@ sap.ui.define([
|
|
|
2357
2425
|
|
|
2358
2426
|
/**
|
|
2359
2427
|
* Retrieves the EntityType of the bindings path, resolved with the current context.
|
|
2428
|
+
*
|
|
2429
|
+
* @returns {object|undefined}
|
|
2430
|
+
* The entity type or <code>undefined</code>, if the bindings path can't be resolved
|
|
2431
|
+
*
|
|
2360
2432
|
* @private
|
|
2361
2433
|
*/
|
|
2362
|
-
ODataTreeBinding.prototype._getEntityType = function(){
|
|
2434
|
+
ODataTreeBinding.prototype._getEntityType = function() {
|
|
2363
2435
|
var sResolvedPath = this.getResolvedPath();
|
|
2364
2436
|
|
|
2365
2437
|
if (sResolvedPath) {
|