@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.v2.ODataListBinding
|
|
8
8
|
sap.ui.define([
|
|
9
9
|
"sap/base/assert",
|
|
@@ -32,6 +32,8 @@ sap.ui.define([
|
|
|
32
32
|
|
|
33
33
|
/*global Set */
|
|
34
34
|
|
|
35
|
+
var aCreateParametersAllowlist = ["changeSetId", "error", "expand", "groupId", "success"];
|
|
36
|
+
|
|
35
37
|
/**
|
|
36
38
|
* @class
|
|
37
39
|
* List binding implementation for OData format.
|
|
@@ -45,6 +47,12 @@ sap.ui.define([
|
|
|
45
47
|
* @param {string} [mParameters.batchGroupId] Sets the batch group ID to be used for requests originating from this binding
|
|
46
48
|
* @param {sap.ui.model.odata.CountMode} [mParameters.countMode] Defines the count mode of this binding;
|
|
47
49
|
* if not specified, the default count mode of the <code>oModel</code> is applied
|
|
50
|
+
* @param {string} [mParameters.createdEntitiesKey=""]
|
|
51
|
+
* A key used in combination with the resolved path of this binding to identify the entities
|
|
52
|
+
* created this binding's {@link #create} method.
|
|
53
|
+
*
|
|
54
|
+
* <b>Note:</b> Different controls or control aggregation bindings to the same collection must
|
|
55
|
+
* have different <code>createdEntitiesKey</code> values.
|
|
48
56
|
* @param {Object<string,string>} [mParameters.custom] An optional map of custom query parameters. Custom parameters must not start with <code>$</code>
|
|
49
57
|
* @param {string} [mParameters.expand] Value for the OData <code>$expand</code> query parameter which is included in the request
|
|
50
58
|
* @param {boolean} [mParameters.faultTolerant] Turns on the fault tolerance mode, data is not reset if a back-end request returns an error
|
|
@@ -112,6 +120,7 @@ sap.ui.define([
|
|
|
112
120
|
this.mNormalizeCache = {};
|
|
113
121
|
this.bTransitionMessagesOnly = !!(mParameters
|
|
114
122
|
&& mParameters.transitionMessagesOnly);
|
|
123
|
+
this.sCreatedEntitiesKey = mParameters && mParameters.createdEntitiesKey || "";
|
|
115
124
|
|
|
116
125
|
// check filter integrity
|
|
117
126
|
this.oModel.checkFilterOperation(this.aApplicationFilters);
|
|
@@ -154,7 +163,7 @@ sap.ui.define([
|
|
|
154
163
|
* @protected
|
|
155
164
|
*/
|
|
156
165
|
ODataListBinding.prototype.getContexts = function(iStartIndex, iLength, iThreshold) {
|
|
157
|
-
var aContexts, oInterval, aIntervals, iLimit,
|
|
166
|
+
var aContexts, oInterval, aIntervals, iLimit, oSkipAndTop,
|
|
158
167
|
aContextData = [];
|
|
159
168
|
|
|
160
169
|
if (this.bInitial) {
|
|
@@ -187,17 +196,13 @@ sap.ui.define([
|
|
|
187
196
|
iStartIndex = 0;
|
|
188
197
|
}
|
|
189
198
|
if (!iLength) {
|
|
190
|
-
iLength = this.
|
|
191
|
-
if (this.bLengthFinal && this.iLength < iLength) {
|
|
192
|
-
iLength = this.iLength;
|
|
193
|
-
}
|
|
199
|
+
iLength = this._getMaximumLength();
|
|
194
200
|
}
|
|
195
201
|
if (!iThreshold) {
|
|
196
202
|
iThreshold = 0;
|
|
197
203
|
}
|
|
198
204
|
|
|
199
205
|
// re-set the threshold in OperationMode.Auto
|
|
200
|
-
// between binding-treshold and the threshold given as an argument, the bigger one will be taken
|
|
201
206
|
if (this.sOperationMode == OperationMode.Auto) {
|
|
202
207
|
if (this.iThreshold >= 0) {
|
|
203
208
|
iThreshold = Math.max(this.iThreshold, iThreshold);
|
|
@@ -211,8 +216,9 @@ sap.ui.define([
|
|
|
211
216
|
}
|
|
212
217
|
} else {
|
|
213
218
|
iLimit = this.bLengthFinal ? this.iLength : undefined;
|
|
214
|
-
|
|
215
|
-
|
|
219
|
+
oSkipAndTop = this._getSkipAndTop(iStartIndex, iLength);
|
|
220
|
+
aIntervals = ODataUtils._getReadIntervals(this.aKeys, oSkipAndTop.skip, oSkipAndTop.top,
|
|
221
|
+
iThreshold, iLimit);
|
|
216
222
|
oInterval = ODataUtils._mergeIntervals(aIntervals);
|
|
217
223
|
// check if metadata are already available
|
|
218
224
|
if (this.oModel.getServiceMetadata()) {
|
|
@@ -274,31 +280,37 @@ sap.ui.define([
|
|
|
274
280
|
};
|
|
275
281
|
|
|
276
282
|
/**
|
|
277
|
-
*
|
|
283
|
+
* Returns contexts for the list.
|
|
278
284
|
*
|
|
279
|
-
* @param {
|
|
280
|
-
*
|
|
285
|
+
* @param {number} [iStartIndex=0]
|
|
286
|
+
* The start index of the requested contexts
|
|
287
|
+
* @param {number} [iLength]
|
|
288
|
+
* The requested amount of contexts
|
|
289
|
+
* @return {sap.ui.model.odata.v2.Context[]}
|
|
290
|
+
* The available contexts for the given range
|
|
281
291
|
*
|
|
282
|
-
* @return {sap.ui.model.odata.v2.Context[]} The contexts
|
|
283
292
|
* @private
|
|
284
293
|
*/
|
|
285
|
-
ODataListBinding.prototype._getContexts = function(iStartIndex, iLength) {
|
|
286
|
-
var oContext, sKey,
|
|
294
|
+
ODataListBinding.prototype._getContexts = function (iStartIndex, iLength) {
|
|
295
|
+
var oContext, i, sKey,
|
|
287
296
|
aContexts = [],
|
|
297
|
+
aCreatedContexts = this._getCreatedContexts(),
|
|
298
|
+
iCreated = aCreatedContexts.length,
|
|
288
299
|
sDeepPath = this.oModel.resolveDeep(this.sPath, this.oContext);
|
|
289
300
|
|
|
290
301
|
if (!iStartIndex) {
|
|
291
302
|
iStartIndex = 0;
|
|
292
303
|
}
|
|
293
304
|
if (!iLength) {
|
|
294
|
-
iLength = this.
|
|
295
|
-
if (this.bLengthFinal && this.iLength < iLength) {
|
|
296
|
-
iLength = this.iLength;
|
|
297
|
-
}
|
|
305
|
+
iLength = this._getMaximumLength();
|
|
298
306
|
}
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
307
|
+
for (i = iStartIndex; i < iCreated && iLength > 0; i += 1) {
|
|
308
|
+
aContexts.push(aCreatedContexts[i]);
|
|
309
|
+
iLength -= 1;
|
|
310
|
+
}
|
|
311
|
+
iStartIndex = Math.max(0, iStartIndex - iCreated);
|
|
312
|
+
// Loop through known data and check whether we already have all rows loaded
|
|
313
|
+
for (i = iStartIndex; iLength > 0; i += 1) {
|
|
302
314
|
sKey = this.aKeys[i];
|
|
303
315
|
if (!sKey) {
|
|
304
316
|
break;
|
|
@@ -306,6 +318,7 @@ sap.ui.define([
|
|
|
306
318
|
oContext = this.oModel.getContext('/' + sKey,
|
|
307
319
|
sDeepPath + sKey.substr(sKey.indexOf("(")));
|
|
308
320
|
aContexts.push(oContext);
|
|
321
|
+
iLength -= 1;
|
|
309
322
|
}
|
|
310
323
|
|
|
311
324
|
return aContexts;
|
|
@@ -313,64 +326,66 @@ sap.ui.define([
|
|
|
313
326
|
|
|
314
327
|
/**
|
|
315
328
|
* Setter for context.
|
|
316
|
-
*
|
|
329
|
+
*
|
|
330
|
+
* @param {Object} oContext
|
|
331
|
+
* The new context object
|
|
332
|
+
* @throws {Error}
|
|
333
|
+
* If the context was changed and this binding has transient contexts; see {@link #create} and
|
|
334
|
+
* {@link sap.ui.model.odata.v2.Context#isTransient}
|
|
317
335
|
*/
|
|
318
|
-
ODataListBinding.prototype.setContext = function(oContext) {
|
|
319
|
-
var sResolvedPath,
|
|
320
|
-
bCreated = oContext && oContext.bCreated,
|
|
336
|
+
ODataListBinding.prototype.setContext = function (oContext) {
|
|
337
|
+
var bHasCreatedContexts, sResolvedPath,
|
|
321
338
|
bForceUpdate = oContext && oContext.isRefreshForced(),
|
|
322
|
-
|
|
323
|
-
|
|
339
|
+
bPreliminary = oContext && oContext.isPreliminary(),
|
|
340
|
+
bTransient = oContext && oContext.isTransient && oContext.isTransient(),
|
|
341
|
+
bUpdated = oContext && oContext.isUpdated();
|
|
324
342
|
|
|
325
343
|
// If binding is initial or not a relative binding, nothing to do here
|
|
326
344
|
if (this.bInitial || !this.isRelative()) {
|
|
327
345
|
return;
|
|
328
346
|
}
|
|
329
|
-
|
|
330
347
|
// If context is preliminary and usePreliminary is not set, exit here
|
|
331
348
|
if (bPreliminary && !this.bUsePreliminaryContext) {
|
|
332
349
|
return;
|
|
333
350
|
}
|
|
334
|
-
|
|
335
351
|
if (bUpdated && this.bUsePreliminaryContext && this.oContext === oContext) {
|
|
336
352
|
this._fireChange({ reason: ChangeReason.Context });
|
|
353
|
+
|
|
337
354
|
return;
|
|
338
355
|
}
|
|
339
|
-
|
|
340
356
|
if (Context.hasChanged(this.oContext, oContext)) {
|
|
341
|
-
|
|
357
|
+
if (this.oContext !== oContext) {
|
|
358
|
+
bHasCreatedContexts = this._getCreatedContexts().length > 0;
|
|
359
|
+
}
|
|
342
360
|
this.oContext = oContext;
|
|
343
|
-
|
|
344
|
-
sResolvedPath = this.getResolvedPath();
|
|
361
|
+
sResolvedPath = this.getResolvedPath(); // resolved path with the new context
|
|
345
362
|
this.sDeepPath = this.oModel.resolveDeep(this.sPath, this.oContext);
|
|
346
|
-
|
|
347
363
|
if (!this._checkPathType()) {
|
|
348
364
|
Log.error("List Binding is not bound against a list for " + sResolvedPath);
|
|
349
365
|
}
|
|
350
|
-
|
|
351
366
|
// ensure that data state is updated with each change of the context
|
|
352
367
|
this.checkDataState();
|
|
353
|
-
|
|
354
368
|
// If path does not resolve or parent context is created, reset current list
|
|
355
|
-
if (!sResolvedPath ||
|
|
356
|
-
if (this.aAllKeys || this.aKeys.length > 0
|
|
369
|
+
if (!sResolvedPath || bTransient) {
|
|
370
|
+
if (bHasCreatedContexts || this.aAllKeys || this.aKeys.length > 0
|
|
371
|
+
|| this.iLength > 0) {
|
|
357
372
|
this.aAllKeys = null;
|
|
358
373
|
this.aKeys = [];
|
|
359
374
|
this.iLength = 0;
|
|
360
375
|
this.bLengthFinal = true;
|
|
361
|
-
this._fireChange({
|
|
376
|
+
this._fireChange({reason : ChangeReason.Context});
|
|
362
377
|
}
|
|
378
|
+
|
|
363
379
|
return;
|
|
364
380
|
}
|
|
365
|
-
|
|
366
381
|
// get new entity type with new context and init filters now correctly
|
|
367
382
|
this._initSortersFilters();
|
|
368
|
-
|
|
369
383
|
if (this.checkExpandedList() && !bForceUpdate) {
|
|
370
|
-
// if there are pending requests e.g. previous context requested data which returns
|
|
371
|
-
// the pending requests need to be aborted such that the responded (previous)
|
|
384
|
+
// if there are pending requests e.g. previous context requested data which returns
|
|
385
|
+
// null the pending requests need to be aborted such that the responded (previous)
|
|
386
|
+
// data doesn't overwrite the current one
|
|
372
387
|
this.abortPendingRequest();
|
|
373
|
-
this._fireChange({
|
|
388
|
+
this._fireChange({reason : ChangeReason.Context});
|
|
374
389
|
} else {
|
|
375
390
|
this._refresh();
|
|
376
391
|
}
|
|
@@ -681,14 +696,15 @@ sap.ui.define([
|
|
|
681
696
|
* @public
|
|
682
697
|
*/
|
|
683
698
|
ODataListBinding.prototype.getLength = function() {
|
|
699
|
+
var iResult = this.iLength + this._getCreatedContexts().length;
|
|
700
|
+
|
|
701
|
+
if (this.bLengthFinal || this.iLength === 0) {
|
|
702
|
+
return iResult;
|
|
703
|
+
}
|
|
704
|
+
|
|
684
705
|
// If length is not final and larger than zero, add some additional length to enable
|
|
685
706
|
// scrolling/paging for controls that only do this if more items are available
|
|
686
|
-
|
|
687
|
-
return this.iLength;
|
|
688
|
-
} else {
|
|
689
|
-
var iAdditionalLength = this.iLastThreshold || this.iLastLength || 10;
|
|
690
|
-
return this.iLength + iAdditionalLength;
|
|
691
|
-
}
|
|
707
|
+
return iResult + (this.iLastThreshold || this.iLastLength || 10);
|
|
692
708
|
};
|
|
693
709
|
|
|
694
710
|
/**
|
|
@@ -768,6 +784,25 @@ sap.ui.define([
|
|
|
768
784
|
}
|
|
769
785
|
};
|
|
770
786
|
|
|
787
|
+
/**
|
|
788
|
+
* Gets the maximum length based on the final length, the number of created entities and the
|
|
789
|
+
* model's size limit.
|
|
790
|
+
*
|
|
791
|
+
* @returns {number}
|
|
792
|
+
* The maximum length
|
|
793
|
+
*
|
|
794
|
+
* @private
|
|
795
|
+
*/
|
|
796
|
+
ODataListBinding.prototype._getMaximumLength = function () {
|
|
797
|
+
var iLength = this.oModel.iSizeLimit;
|
|
798
|
+
|
|
799
|
+
if (this.bLengthFinal) {
|
|
800
|
+
iLength = Math.min(iLength, this.iLength + this._getCreatedContexts().length);
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
return iLength;
|
|
804
|
+
};
|
|
805
|
+
|
|
771
806
|
/**
|
|
772
807
|
* Refreshes the binding, check whether the model data has been changed and fire change event
|
|
773
808
|
* if this is the case. For server side models this should refetch the data from the server.
|
|
@@ -793,20 +828,20 @@ sap.ui.define([
|
|
|
793
828
|
* @private
|
|
794
829
|
*/
|
|
795
830
|
ODataListBinding.prototype._refresh = function(bForceUpdate, mChangedEntities, mEntityTypes) {
|
|
796
|
-
var
|
|
797
|
-
|
|
831
|
+
var oEntityType, sResolvedPath,
|
|
832
|
+
bChangeDetected = false,
|
|
833
|
+
bRelativeAndTransient = this.isRelative()
|
|
834
|
+
&& this.oContext && this.oContext.isTransient && this.oContext.isTransient();
|
|
798
835
|
|
|
799
|
-
if (
|
|
836
|
+
if (bRelativeAndTransient) {
|
|
800
837
|
return;
|
|
801
838
|
}
|
|
802
|
-
|
|
803
839
|
this.bPendingRefresh = false;
|
|
804
|
-
|
|
805
840
|
if (!bForceUpdate) {
|
|
806
841
|
if (mEntityTypes){
|
|
807
|
-
|
|
842
|
+
sResolvedPath = this.getResolvedPath();
|
|
808
843
|
if (sResolvedPath) {
|
|
809
|
-
|
|
844
|
+
oEntityType = this.oModel.oMetadata._getEntityTypeByPath(sResolvedPath);
|
|
810
845
|
if (oEntityType && (oEntityType.entityType in mEntityTypes)) {
|
|
811
846
|
bChangeDetected = true;
|
|
812
847
|
}
|
|
@@ -816,6 +851,7 @@ sap.ui.define([
|
|
|
816
851
|
each(this.aKeys, function(i, sKey) {
|
|
817
852
|
if (sKey in mChangedEntities) {
|
|
818
853
|
bChangeDetected = true;
|
|
854
|
+
|
|
819
855
|
return false;
|
|
820
856
|
}
|
|
821
857
|
});
|
|
@@ -827,11 +863,12 @@ sap.ui.define([
|
|
|
827
863
|
if (bForceUpdate || bChangeDetected) {
|
|
828
864
|
if (this.bSuspended && !this.bIgnoreSuspend && !bForceUpdate) {
|
|
829
865
|
this.bPendingRefresh = true;
|
|
866
|
+
|
|
830
867
|
return;
|
|
831
868
|
}
|
|
832
869
|
this.abortPendingRequest(true);
|
|
833
870
|
this.resetData();
|
|
834
|
-
this._fireRefresh({reason: ChangeReason.Refresh});
|
|
871
|
+
this._fireRefresh({reason : ChangeReason.Refresh});
|
|
835
872
|
}
|
|
836
873
|
};
|
|
837
874
|
|
|
@@ -912,13 +949,14 @@ sap.ui.define([
|
|
|
912
949
|
* @public
|
|
913
950
|
*/
|
|
914
951
|
ODataListBinding.prototype.initialize = function() {
|
|
915
|
-
var
|
|
916
|
-
|
|
952
|
+
var bRelativeAndTransient = this.isRelative()
|
|
953
|
+
&& this.oContext && this.oContext.isTransient && this.oContext.isTransient();
|
|
917
954
|
|
|
955
|
+
if (this.oModel.oMetadata && this.oModel.oMetadata.isLoaded() && this.bInitial
|
|
956
|
+
&& !bRelativeAndTransient) {
|
|
918
957
|
if (!this._checkPathType()) {
|
|
919
958
|
Log.error("List Binding is not bound against a list for " + this.getResolvedPath());
|
|
920
959
|
}
|
|
921
|
-
|
|
922
960
|
this.bInitial = false;
|
|
923
961
|
this._initSortersFilters();
|
|
924
962
|
if (!this.bSuspended) {
|
|
@@ -928,10 +966,10 @@ sap.ui.define([
|
|
|
928
966
|
this._fireRefresh({reason: ChangeReason.Refresh});
|
|
929
967
|
}
|
|
930
968
|
}
|
|
931
|
-
|
|
932
969
|
// ensure that data state is updated after initialization
|
|
933
970
|
this.checkDataState();
|
|
934
971
|
}
|
|
972
|
+
|
|
935
973
|
return this;
|
|
936
974
|
};
|
|
937
975
|
|
|
@@ -943,12 +981,11 @@ sap.ui.define([
|
|
|
943
981
|
* @param {object} mChangedEntities Map of changed entities
|
|
944
982
|
* @private
|
|
945
983
|
*/
|
|
946
|
-
ODataListBinding.prototype.checkUpdate = function(bForceUpdate, mChangedEntities) {
|
|
947
|
-
var
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
aOldRefs;
|
|
984
|
+
ODataListBinding.prototype.checkUpdate = function (bForceUpdate, mChangedEntities) {
|
|
985
|
+
var aContexts, oCurrentData, bExpandedList, aLastKeys, aOldRefs,
|
|
986
|
+
bChangeDetected = false,
|
|
987
|
+
bChangeReason = this.sChangeReason ? this.sChangeReason : ChangeReason.Change,
|
|
988
|
+
that = this;
|
|
952
989
|
|
|
953
990
|
if ((this.bSuspended && !this.bIgnoreSuspend && !bForceUpdate) || this.bPendingRequest) {
|
|
954
991
|
return;
|
|
@@ -969,8 +1006,8 @@ sap.ui.define([
|
|
|
969
1006
|
aOldRefs = this.aExpandRefs;
|
|
970
1007
|
|
|
971
1008
|
|
|
972
|
-
|
|
973
|
-
|
|
1009
|
+
aLastKeys = this.aKeys.slice();
|
|
1010
|
+
bExpandedList = this.checkExpandedList(true);
|
|
974
1011
|
|
|
975
1012
|
// apply sorting and filtering again, as the newly set entities may have changed in clientmode
|
|
976
1013
|
if (!bExpandedList && this.useClientMode()) {
|
|
@@ -998,9 +1035,8 @@ sap.ui.define([
|
|
|
998
1035
|
if (bChangeDetected && this.aLastContexts) {
|
|
999
1036
|
// Reset bChangeDetected and compare actual data of entries
|
|
1000
1037
|
bChangeDetected = false;
|
|
1001
|
-
|
|
1002
1038
|
//Get contexts for visible area and compare with stored contexts
|
|
1003
|
-
|
|
1039
|
+
aContexts = this._getContexts(this.iLastStartIndex, this.iLastLength);
|
|
1004
1040
|
if (this.aLastContexts.length !== aContexts.length) {
|
|
1005
1041
|
bChangeDetected = true;
|
|
1006
1042
|
} else {
|
|
@@ -1492,6 +1528,98 @@ sap.ui.define([
|
|
|
1492
1528
|
});
|
|
1493
1529
|
};
|
|
1494
1530
|
|
|
1531
|
+
/**
|
|
1532
|
+
* The function is experimental and the API/behaviour is not finalized and hence this must not
|
|
1533
|
+
* be used for productive usage.
|
|
1534
|
+
*
|
|
1535
|
+
* Creates a new entity via {@link sap.ui.model.odata.v2.ODataModel#createEntry} and inserts it
|
|
1536
|
+
* at the start of the list.
|
|
1537
|
+
*
|
|
1538
|
+
* Note: If there are transient entities in the list, switching the parent context is not
|
|
1539
|
+
* supported. The transient entities are stored at the ListBinding only, that means if a table
|
|
1540
|
+
* is rebound, that is the list binding is replaced by a new instance, the newly created
|
|
1541
|
+
* entities are not visible any more. Nevertheless they still exist and the corresponding
|
|
1542
|
+
* requests are fired with the next call of {@link #submitChanges}.
|
|
1543
|
+
*
|
|
1544
|
+
* Note: The metadata have to be loaded before {@link #create} can be called.
|
|
1545
|
+
*
|
|
1546
|
+
* @param {object} [oInitialData={}]
|
|
1547
|
+
* The initial data for the created entity; see <code>mParameters.properties</code> parameter
|
|
1548
|
+
* of {@link sap.ui.model.odata.v2.ODataModel#createEntry}
|
|
1549
|
+
* @param {boolean} [bAtEnd=false]
|
|
1550
|
+
* Whether the entity is inserted at the end of the list. When creating multiple entities,
|
|
1551
|
+
* this parameter must have the same value for each entity.
|
|
1552
|
+
* @param {object} mParameters
|
|
1553
|
+
* A map of parameters as specified for {@link sap.ui.model.odata.v2.ODataModel#createEntry}
|
|
1554
|
+
* where only the following subset of these is supported.
|
|
1555
|
+
* @param {string} [mParameters.changeSetId]
|
|
1556
|
+
* The ID of the <code>ChangeSet</code> that this request should belong to
|
|
1557
|
+
* @param {function} [mParameters.error]
|
|
1558
|
+
* The error callback function
|
|
1559
|
+
* @param {string} [mParameters.expand]
|
|
1560
|
+
* A comma-separated list of navigation properties to be expanded for the newly created
|
|
1561
|
+
* entity; see {@link sap.ui.model.odata.v2.ODataModel#createEntry}
|
|
1562
|
+
* @param {string} [mParameters.groupId]
|
|
1563
|
+
* The ID of a request group; requests belonging to the same group will be bundled in one
|
|
1564
|
+
* batch request
|
|
1565
|
+
* @param {function} [mParameters.success]
|
|
1566
|
+
* The success callback function
|
|
1567
|
+
* @returns {sap.ui.model.odata.v2.Context}
|
|
1568
|
+
* The context representing the created entity
|
|
1569
|
+
* @throws {Error}
|
|
1570
|
+
* If a relative binding is unresolved, if the binding's context is transient, if
|
|
1571
|
+
* <code>bAtEnd</code> is truthy, if the collection data has been read via
|
|
1572
|
+
* <code>$expand</code> together with the parent entity, if the metadata is not yet available,
|
|
1573
|
+
* or if there are unsupported parameters in the given parameters map; see
|
|
1574
|
+
* {@link sap.ui.model.odata.v2.ODataModel#createEntry} for additional errors thrown
|
|
1575
|
+
*
|
|
1576
|
+
* @private
|
|
1577
|
+
* @ui5-restricted sap.suite.ui.generic.template
|
|
1578
|
+
*/
|
|
1579
|
+
ODataListBinding.prototype.create = function (oInitialData, bAtEnd, mParameters) {
|
|
1580
|
+
var oCreatedContext, oCreatedContextsCache, sResolvedPath,
|
|
1581
|
+
mCreateParameters = {
|
|
1582
|
+
context : this.oContext,
|
|
1583
|
+
properties : oInitialData,
|
|
1584
|
+
refreshAfterChange : false},
|
|
1585
|
+
that = this;
|
|
1586
|
+
|
|
1587
|
+
if (bAtEnd === true) {
|
|
1588
|
+
throw new Error("Option 'bAtEnd' is not supported");
|
|
1589
|
+
}
|
|
1590
|
+
Object.keys(mParameters || {}).forEach(function (sParameterKey) {
|
|
1591
|
+
if (!aCreateParametersAllowlist.includes(sParameterKey)) {
|
|
1592
|
+
throw new Error("Parameter '" + sParameterKey + "' is not supported");
|
|
1593
|
+
}
|
|
1594
|
+
});
|
|
1595
|
+
if (this.oContext && this.oContext.isTransient && this.oContext.isTransient()) {
|
|
1596
|
+
throw new Error("Parent context is transient");
|
|
1597
|
+
}
|
|
1598
|
+
if (this.bUseExpandedList) {
|
|
1599
|
+
throw new Error("The collection has been read via $expand while reading the parent"
|
|
1600
|
+
+ " entity");
|
|
1601
|
+
}
|
|
1602
|
+
if (!this.oModel.oMetadata.isLoaded()) {
|
|
1603
|
+
throw new Error("Metadata is not loaded");
|
|
1604
|
+
}
|
|
1605
|
+
|
|
1606
|
+
sResolvedPath = this.getResolvedPath();
|
|
1607
|
+
oCreatedContextsCache = this.oModel._getCreatedContextsCache();
|
|
1608
|
+
Object.assign(mCreateParameters, mParameters);
|
|
1609
|
+
oCreatedContext = this.oModel.createEntry(this.sPath, mCreateParameters);
|
|
1610
|
+
oCreatedContext.created().catch(function () {
|
|
1611
|
+
oCreatedContextsCache.removeContext(oCreatedContext, sResolvedPath,
|
|
1612
|
+
that.sCreatedEntitiesKey);
|
|
1613
|
+
that._fireChange({reason : ChangeReason.Remove});
|
|
1614
|
+
});
|
|
1615
|
+
|
|
1616
|
+
oCreatedContextsCache.addContext(oCreatedContext, sResolvedPath,
|
|
1617
|
+
this.sCreatedEntitiesKey);
|
|
1618
|
+
this._fireChange({reason : ChangeReason.Add});
|
|
1619
|
+
|
|
1620
|
+
return oCreatedContext;
|
|
1621
|
+
};
|
|
1622
|
+
|
|
1495
1623
|
/**
|
|
1496
1624
|
* Requests a {@link sap.ui.model.Filter} object which can be used to filter the list binding by
|
|
1497
1625
|
* entries with model messages. With the filter callback, you can define if a message is
|
|
@@ -1554,5 +1682,40 @@ sap.ui.define([
|
|
|
1554
1682
|
return Promise.resolve(oFilter);
|
|
1555
1683
|
};
|
|
1556
1684
|
|
|
1685
|
+
/**
|
|
1686
|
+
* Gets the array of contexts for created entities, created via {@link #create}.
|
|
1687
|
+
*
|
|
1688
|
+
* @returns {sap.ui.model.odata.v2.Context[]} The array of contexts for created entities
|
|
1689
|
+
*
|
|
1690
|
+
* @private
|
|
1691
|
+
*/
|
|
1692
|
+
ODataListBinding.prototype._getCreatedContexts = function () {
|
|
1693
|
+
return this.oModel._getCreatedContextsCache()
|
|
1694
|
+
.getContexts(this.getResolvedPath(), this.sCreatedEntitiesKey);
|
|
1695
|
+
};
|
|
1696
|
+
|
|
1697
|
+
/**
|
|
1698
|
+
* Gets an object with the values for system query options $skip and $top based on the given
|
|
1699
|
+
* start index and length, both from control point of view. It considers the number of entities
|
|
1700
|
+
* created via {@link #create}.
|
|
1701
|
+
*
|
|
1702
|
+
* @param {number} iStartIndex The start index from control point of view
|
|
1703
|
+
* @param {number} iLength The length from control point of view
|
|
1704
|
+
* @returns {object}
|
|
1705
|
+
* An object containing the properties <code>skip</code> and <code>top</code>; the values
|
|
1706
|
+
* correspond to the system query options <code>$skip</code> and <code>$top</code>
|
|
1707
|
+
*
|
|
1708
|
+
* @private
|
|
1709
|
+
*/
|
|
1710
|
+
ODataListBinding.prototype._getSkipAndTop = function (iStartIndex, iLength) {
|
|
1711
|
+
var iServerStartIndex = iStartIndex - this._getCreatedContexts().length,
|
|
1712
|
+
iServerLength = iServerStartIndex > 0 ? iLength : iLength + iServerStartIndex;
|
|
1713
|
+
|
|
1714
|
+
return {
|
|
1715
|
+
skip : Math.max(0, iServerStartIndex),
|
|
1716
|
+
top : Math.max(0, iServerLength)
|
|
1717
|
+
};
|
|
1718
|
+
};
|
|
1719
|
+
|
|
1557
1720
|
return ODataListBinding;
|
|
1558
1721
|
});
|