@openui5/sap.ui.core 1.96.2 → 1.97.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.json +2 -2
- package/.reuse/dep5 +1 -1
- package/THIRDPARTY.txt +2 -1
- package/package.json +1 -1
- package/src/jquery.sap.global.js +1 -1
- package/src/jquery.sap.properties.js +1 -1
- package/src/jquery.sap.resources.js +2 -2
- package/src/jquery.sap.script.js +1 -1
- package/src/jquery.sap.storage.js +3 -3
- package/src/sap/base/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 +4 -4
- package/src/sap/ui/Global.js +11 -16
- 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 +3 -3
- 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/Component.js +31 -9
- 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/Control.js +2 -2
- package/src/sap/ui/core/Core.js +2 -2
- package/src/sap/ui/core/CustomData.js +1 -1
- package/src/sap/ui/core/DeclarativeSupport.js +1 -1
- package/src/sap/ui/core/Element.js +2 -6
- package/src/sap/ui/core/ElementMetadata.js +1 -1
- package/src/sap/ui/core/EnabledPropagator.js +1 -1
- package/src/sap/ui/core/EventBus.js +1 -1
- package/src/sap/ui/core/Fragment.js +1 -1
- package/src/sap/ui/core/HTML.js +3 -3
- package/src/sap/ui/core/History.js +1 -1
- package/src/sap/ui/core/Icon.js +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 +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 +1 -1
- package/src/sap/ui/core/LocaleData.js +3 -3
- package/src/sap/ui/core/Manifest.js +1 -1
- package/src/sap/ui/core/Message.js +1 -1
- 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/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 +1 -1
- 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 +19 -5
- package/src/sap/ui/core/cache/LRUPersistentCache.js +4 -2
- package/src/sap/ui/core/date/UniversalDateUtils.js +33 -0
- package/src/sap/ui/core/delegate/ItemNavigation.js +1 -1
- package/src/sap/ui/core/delegate/ScrollEnablement.js +1 -1
- package/src/sap/ui/core/dnd/DragDropBase.js +1 -1
- package/src/sap/ui/core/dnd/DragDropInfo.js +1 -1
- package/src/sap/ui/core/dnd/DragInfo.js +1 -1
- package/src/sap/ui/core/dnd/DropInfo.js +1 -1
- package/src/sap/ui/core/hyphenation/Hyphenation.js +1 -1
- package/src/sap/ui/core/library.js +5 -5
- package/src/sap/ui/core/message/ControlMessageProcessor.js +5 -5
- package/src/sap/ui/core/message/Message.js +1 -1
- package/src/sap/ui/core/message/MessageManager.js +1 -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_fr.properties +7 -7
- package/src/sap/ui/core/messagebundle_ru.properties +21 -21
- 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/JSONView.js +1 -1
- package/src/sap/ui/core/mvc/JSView.js +1 -1
- package/src/sap/ui/core/mvc/TemplateView.js +1 -1
- package/src/sap/ui/core/mvc/View.js +1 -1
- package/src/sap/ui/core/mvc/XMLView.js +1 -1
- 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/rules/Misc.support.js +51 -1
- package/src/sap/ui/core/rules/Rendering.support.js +1 -4
- package/src/sap/ui/core/rules/View.support.js +14 -46
- package/src/sap/ui/core/search/OpenSearchProvider.js +1 -1
- package/src/sap/ui/core/search/SearchProvider.js +1 -1
- package/src/sap/ui/core/service/Service.js +1 -1
- package/src/sap/ui/core/service/ServiceFactory.js +1 -1
- package/src/sap/ui/core/service/ServiceFactoryRegistry.js +1 -1
- package/src/sap/ui/core/support/Plugin.js +2 -2
- package/src/sap/ui/core/support/RuleEngineOpaExtension.js +0 -1
- package/src/sap/ui/core/support/Support.js +1 -1
- package/src/sap/ui/core/support/controls/TreeViewer.js +1 -1
- package/src/sap/ui/core/support/plugins/ControlTree.js +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 +1 -1
- package/src/sap/ui/core/support/trace/E2eTraceLib.js +3 -3
- package/src/sap/ui/core/tmpl/DOMAttribute.js +1 -1
- package/src/sap/ui/core/tmpl/DOMElement.js +1 -1
- package/src/sap/ui/core/tmpl/HandlebarsTemplate.js +1 -1
- package/src/sap/ui/core/tmpl/Template.js +1 -1
- package/src/sap/ui/core/tmpl/TemplateControl.js +1 -1
- package/src/sap/ui/core/util/AsyncHintsHelper.js +1 -1
- package/src/sap/ui/core/util/Export.js +1 -1
- package/src/sap/ui/core/util/ExportCell.js +1 -1
- package/src/sap/ui/core/util/ExportColumn.js +1 -1
- package/src/sap/ui/core/util/ExportRow.js +1 -1
- package/src/sap/ui/core/util/ExportType.js +1 -1
- package/src/sap/ui/core/util/ExportTypeCSV.js +1 -1
- package/src/sap/ui/core/util/File.js +1 -1
- package/src/sap/ui/core/util/LibraryInfo.js +1 -1
- package/src/sap/ui/core/util/MockServer.js +2 -2
- package/src/sap/ui/core/util/PasteHelper.js +1 -1
- package/src/sap/ui/core/util/reflection/JsControlTreeModifier.js +4 -4
- 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/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/ClientTreeBindingAdapter.js +1 -1
- package/src/sap/ui/model/CompositeDataState.js +1 -1
- package/src/sap/ui/model/CompositeType.js +1 -1
- package/src/sap/ui/model/DataState.js +1 -1
- package/src/sap/ui/model/ListBinding.js +24 -5
- package/src/sap/ui/model/MetaModel.js +1 -1
- package/src/sap/ui/model/Model.js +5 -10
- 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 +12 -6
- package/src/sap/ui/model/analytics/AnalyticalTreeBindingAdapter.js +16 -18
- package/src/sap/ui/model/json/JSONModel.js +7 -7
- package/src/sap/ui/model/json/JSONPropertyBinding.js +1 -1
- package/src/sap/ui/model/message/MessageModel.js +3 -3
- package/src/sap/ui/model/message/MessagePropertyBinding.js +1 -1
- 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 +61 -38
- 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 +136 -85
- package/src/sap/ui/model/odata/ODataModel.js +442 -215
- package/src/sap/ui/model/odata/ODataPropertyBinding.js +7 -5
- 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 +2 -1
- package/src/sap/ui/model/odata/_AnnotationHelperExpression.js +10 -8
- package/src/sap/ui/model/odata/_ODataMetaModelUtils.js +6 -4
- package/src/sap/ui/model/odata/type/Boolean.js +1 -1
- package/src/sap/ui/model/odata/type/Byte.js +1 -1
- package/src/sap/ui/model/odata/type/Currency.js +1 -1
- package/src/sap/ui/model/odata/type/Date.js +1 -1
- package/src/sap/ui/model/odata/type/DateTime.js +1 -1
- package/src/sap/ui/model/odata/type/DateTimeBase.js +1 -1
- package/src/sap/ui/model/odata/type/DateTimeOffset.js +1 -1
- package/src/sap/ui/model/odata/type/Decimal.js +5 -1
- package/src/sap/ui/model/odata/type/Double.js +1 -1
- package/src/sap/ui/model/odata/type/Guid.js +1 -1
- package/src/sap/ui/model/odata/type/Int.js +1 -1
- package/src/sap/ui/model/odata/type/Int16.js +1 -1
- package/src/sap/ui/model/odata/type/Int32.js +1 -1
- package/src/sap/ui/model/odata/type/Int64.js +1 -1
- package/src/sap/ui/model/odata/type/ODataType.js +1 -1
- package/src/sap/ui/model/odata/type/Raw.js +1 -1
- package/src/sap/ui/model/odata/type/SByte.js +1 -1
- package/src/sap/ui/model/odata/type/Single.js +1 -1
- package/src/sap/ui/model/odata/type/Stream.js +1 -1
- package/src/sap/ui/model/odata/type/String.js +1 -1
- package/src/sap/ui/model/odata/type/Time.js +1 -1
- package/src/sap/ui/model/odata/type/TimeOfDay.js +1 -1
- package/src/sap/ui/model/odata/type/Unit.js +1 -1
- package/src/sap/ui/model/odata/type/UnitMixin.js +0 -1
- package/src/sap/ui/model/odata/v2/Context.js +42 -11
- package/src/sap/ui/model/odata/v2/ODataAnnotations.js +1 -1
- package/src/sap/ui/model/odata/v2/ODataListBinding.js +205 -88
- package/src/sap/ui/model/odata/v2/ODataModel.js +154 -89
- package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +162 -89
- package/src/sap/ui/model/odata/v2/_CreatedContextsCache.js +52 -2
- package/src/sap/ui/model/odata/v4/Context.js +48 -7
- package/src/sap/ui/model/odata/v4/ODataBinding.js +55 -24
- package/src/sap/ui/model/odata/v4/ODataContextBinding.js +67 -19
- package/src/sap/ui/model/odata/v4/ODataListBinding.js +211 -78
- package/src/sap/ui/model/odata/v4/ODataMetaModel.js +1 -1
- package/src/sap/ui/model/odata/v4/ODataModel.js +2 -1
- package/src/sap/ui/model/odata/v4/ODataParentBinding.js +36 -23
- package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +3 -3
- package/src/sap/ui/model/odata/v4/lib/_Cache.js +106 -11
- package/src/sap/ui/model/odata/v4/lib/_Helper.js +33 -3
- package/src/sap/ui/model/odata/v4/lib/_Requestor.js +11 -2
- package/src/sap/ui/model/resource/ResourceModel.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/XMLModel.js +5 -5
- package/src/sap/ui/model/xml/XMLPropertyBinding.js +1 -1
- 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/actions/Action.js +9 -2
- package/src/sap/ui/test/actions/Press.js +28 -1
- package/src/sap/ui/test/generic/_EnforceSemanticRendering.js +111 -0
- package/src/sap/ui/util/Mobile.js +28 -39
- package/src/sap/ui/util/Storage.js +1 -1
- package/src/ui5loader.js +6 -6
- 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
|
@@ -44,7 +44,7 @@ sap.ui.define([
|
|
|
44
44
|
* Implementation to access OData metadata
|
|
45
45
|
*
|
|
46
46
|
* @author SAP SE
|
|
47
|
-
* @version 1.
|
|
47
|
+
* @version 1.97.0
|
|
48
48
|
*
|
|
49
49
|
* @public
|
|
50
50
|
* @alias sap.ui.model.odata.ODataMetadata
|
|
@@ -528,11 +528,14 @@ sap.ui.define([
|
|
|
528
528
|
};
|
|
529
529
|
|
|
530
530
|
/**
|
|
531
|
-
* Extract the entity type name of a given path. Also navigation properties in the path will be
|
|
531
|
+
* Extract the entity type name of a given path. Also navigation properties in the path will be
|
|
532
|
+
* followed to get the right entity type for that property.
|
|
532
533
|
* eg.
|
|
533
534
|
* /Categories(1)/Products(1)/Category --> will get the Categories entity type
|
|
534
535
|
* /Products --> will get the Products entity type
|
|
535
|
-
*
|
|
536
|
+
*
|
|
537
|
+
* @param {string} sPath The entity types path
|
|
538
|
+
* @return {object} The entity type or null if not found
|
|
536
539
|
*/
|
|
537
540
|
ODataMetadata.prototype._getEntityTypeByPath = function(sPath) {
|
|
538
541
|
if (!sPath) {
|
|
@@ -656,6 +659,8 @@ sap.ui.define([
|
|
|
656
659
|
oEntityType.namespace = oSchema.namespace;
|
|
657
660
|
return false;
|
|
658
661
|
}
|
|
662
|
+
|
|
663
|
+
return true;
|
|
659
664
|
});
|
|
660
665
|
}
|
|
661
666
|
});
|
|
@@ -678,9 +683,14 @@ sap.ui.define([
|
|
|
678
683
|
};
|
|
679
684
|
|
|
680
685
|
/**
|
|
681
|
-
* Extracts an Annotation from given path parts
|
|
682
|
-
*
|
|
683
|
-
* @
|
|
686
|
+
* Extracts an Annotation from given path parts.
|
|
687
|
+
*
|
|
688
|
+
* @param {string} sPath
|
|
689
|
+
* The metadata path to the annotation
|
|
690
|
+
* @returns {object|undefined}
|
|
691
|
+
* The annotation for the given metadata path; returns <code>undefined</code> if no annotation
|
|
692
|
+
* can be found for that path
|
|
693
|
+
*
|
|
684
694
|
* @private
|
|
685
695
|
*/
|
|
686
696
|
ODataMetadata.prototype._getAnnotation = function(sPath) {
|
|
@@ -697,7 +707,7 @@ sap.ui.define([
|
|
|
697
707
|
assert(oEntityType, aMetaParts[0] + " is not a valid EntityType");
|
|
698
708
|
|
|
699
709
|
if (!oEntityType) {
|
|
700
|
-
return;
|
|
710
|
+
return undefined;
|
|
701
711
|
}
|
|
702
712
|
|
|
703
713
|
//extract property
|
|
@@ -706,7 +716,7 @@ sap.ui.define([
|
|
|
706
716
|
|
|
707
717
|
assert(oProperty, sPropertyPath + " is not a valid property path");
|
|
708
718
|
if (!oProperty) {
|
|
709
|
-
return;
|
|
719
|
+
return undefined;
|
|
710
720
|
}
|
|
711
721
|
|
|
712
722
|
sMetaPath = sPropertyPath.substr(sPropertyPath.indexOf(oProperty.name));
|
|
@@ -718,7 +728,7 @@ sap.ui.define([
|
|
|
718
728
|
assert(oEntityType, aParts[0] + " is not a valid path");
|
|
719
729
|
|
|
720
730
|
if (!oEntityType) {
|
|
721
|
-
return;
|
|
731
|
+
return undefined;
|
|
722
732
|
}
|
|
723
733
|
|
|
724
734
|
//extract property
|
|
@@ -731,7 +741,7 @@ sap.ui.define([
|
|
|
731
741
|
|
|
732
742
|
assert(oProperty, sPropertyPath + " is not a valid property path");
|
|
733
743
|
if (!oProperty) {
|
|
734
|
-
return;
|
|
744
|
+
return undefined;
|
|
735
745
|
}
|
|
736
746
|
|
|
737
747
|
sMetaPath = aMetaParts.join('/');
|
|
@@ -745,15 +755,19 @@ sap.ui.define([
|
|
|
745
755
|
};
|
|
746
756
|
|
|
747
757
|
/**
|
|
748
|
-
*
|
|
758
|
+
* Gets the annotation specified by the given metadata path in the given metadata object for the
|
|
759
|
+
* given type.
|
|
749
760
|
*
|
|
750
|
-
* @
|
|
761
|
+
* @param {object} oEntityType The entity type of the property
|
|
762
|
+
* @param {object} oObject The metadata object
|
|
763
|
+
* @param {string} sMetaDataPath The metadata path
|
|
764
|
+
* @return {object|undefined} The annotation object/value
|
|
751
765
|
*/
|
|
752
766
|
ODataMetadata.prototype._getAnnotationObject = function(oEntityType, oObject, sMetaDataPath) {
|
|
753
|
-
var aAnnotationParts,
|
|
767
|
+
var oAnnotation, sAnnotation, aAnnotationParts, oExtension, i, oNode, aParts;
|
|
754
768
|
|
|
755
769
|
if (!oObject) {
|
|
756
|
-
return;
|
|
770
|
+
return undefined;
|
|
757
771
|
}
|
|
758
772
|
|
|
759
773
|
oNode = oObject;
|
|
@@ -762,48 +776,45 @@ sap.ui.define([
|
|
|
762
776
|
//V4 annotation
|
|
763
777
|
if (aParts[0].indexOf('.') > -1) {
|
|
764
778
|
return this._getV4AnnotationObject(oEntityType, oObject, aParts);
|
|
765
|
-
} else {
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
break;
|
|
775
|
-
}
|
|
779
|
+
} else if (aParts.length > 1) {
|
|
780
|
+
// Additional namespace handling cannot be done to keep compatibility
|
|
781
|
+
oNode = oNode[aParts[0]];
|
|
782
|
+
if (!oNode && oObject.extensions) {
|
|
783
|
+
for (i = 0; i < oObject.extensions.length; i++) {
|
|
784
|
+
oExtension = oObject.extensions[i];
|
|
785
|
+
if (oExtension.name == aParts[0]) {
|
|
786
|
+
oNode = oExtension;
|
|
787
|
+
break;
|
|
776
788
|
}
|
|
777
789
|
}
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
}
|
|
793
|
-
}
|
|
790
|
+
}
|
|
791
|
+
sMetaDataPath = aParts.splice(0,1);
|
|
792
|
+
oAnnotation = this._getAnnotationObject(oEntityType, oNode, aParts.join('/'));
|
|
793
|
+
} else if (aParts[0].indexOf('@') > -1) { //handle attributes
|
|
794
|
+
sAnnotation = aParts[0].substr(1);
|
|
795
|
+
aAnnotationParts = sAnnotation.split(':');
|
|
796
|
+
oAnnotation = oNode[aAnnotationParts[0]];
|
|
797
|
+
if (!oAnnotation && oNode.extensions) {
|
|
798
|
+
for (i = 0; i < oNode.extensions.length; i++) {
|
|
799
|
+
oExtension = oNode.extensions[i];
|
|
800
|
+
if (oExtension.name === aAnnotationParts[1]
|
|
801
|
+
&& oExtension.namespace === this.mNamespaces[aAnnotationParts[0]]) {
|
|
802
|
+
oAnnotation = oExtension.value;
|
|
803
|
+
break;
|
|
794
804
|
}
|
|
795
|
-
}
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
805
|
+
}
|
|
806
|
+
}
|
|
807
|
+
} else { // handle nodes
|
|
808
|
+
aAnnotationParts = aParts[0].split(':');
|
|
809
|
+
oAnnotation = oNode[aAnnotationParts[0]];
|
|
810
|
+
oAnnotation = oNode[aParts[0]];
|
|
811
|
+
if (!oAnnotation && oNode.extensions) {
|
|
812
|
+
for (i = 0; i < oNode.extensions.length; i++) {
|
|
813
|
+
oExtension = oNode.extensions[i];
|
|
814
|
+
if (oExtension.name === aAnnotationParts[1]
|
|
815
|
+
&& oExtension.namespace === this.mNamespaces[aAnnotationParts[0]]) {
|
|
816
|
+
oAnnotation = oExtension;
|
|
817
|
+
break;
|
|
807
818
|
}
|
|
808
819
|
}
|
|
809
820
|
}
|
|
@@ -811,7 +822,15 @@ sap.ui.define([
|
|
|
811
822
|
return oAnnotation;
|
|
812
823
|
};
|
|
813
824
|
|
|
814
|
-
|
|
825
|
+
/**
|
|
826
|
+
* Gets the annotation specified by the given metadata path in the given metadata object for the
|
|
827
|
+
* given type.
|
|
828
|
+
*
|
|
829
|
+
* @param {object} oEntityType The entity type of the property
|
|
830
|
+
* @param {object} oObject The metadata object
|
|
831
|
+
* @param {string[]} aParts The metadata path; must contain exactly one element
|
|
832
|
+
* @return {object|undefined} The annotation object/value
|
|
833
|
+
*
|
|
815
834
|
* @private
|
|
816
835
|
*/
|
|
817
836
|
ODataMetadata.prototype._getV4AnnotationObject = function(oEntityType, oObject, aParts) {
|
|
@@ -819,7 +838,7 @@ sap.ui.define([
|
|
|
819
838
|
|
|
820
839
|
if (aParts.length > 1) {
|
|
821
840
|
assert(aParts.length == 1, "'" + aParts.join('/') + "' is not a valid annotation path");
|
|
822
|
-
return;
|
|
841
|
+
return undefined;
|
|
823
842
|
}
|
|
824
843
|
|
|
825
844
|
var sTargetName = oEntityType.namespace ? oEntityType.namespace + "." : "";
|
|
@@ -833,6 +852,7 @@ sap.ui.define([
|
|
|
833
852
|
aAnnotations.push(oObject.annotation);
|
|
834
853
|
return false;
|
|
835
854
|
}
|
|
855
|
+
return true;
|
|
836
856
|
});
|
|
837
857
|
}
|
|
838
858
|
});
|
|
@@ -849,7 +869,13 @@ sap.ui.define([
|
|
|
849
869
|
};
|
|
850
870
|
|
|
851
871
|
/**
|
|
852
|
-
*
|
|
872
|
+
* Splits a full qualified name into its namespace and its name, for example splits
|
|
873
|
+
* "my.namespace.Foo" into {name : "Foo", namespace : "my.namespace"}.
|
|
874
|
+
*
|
|
875
|
+
* @param {string} sFullName
|
|
876
|
+
* The full name
|
|
877
|
+
* @returns {object}
|
|
878
|
+
* An object containing the properties <code>name</code> and <code>namespace</code>
|
|
853
879
|
*/
|
|
854
880
|
ODataMetadata.prototype._splitName = function(sFullName) {
|
|
855
881
|
var oInfo = {};
|
|
@@ -863,13 +889,16 @@ sap.ui.define([
|
|
|
863
889
|
|
|
864
890
|
|
|
865
891
|
/**
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
892
|
+
* Gets the entity type name for the given entity set name.
|
|
893
|
+
*
|
|
894
|
+
* @param {string} sEntitySetName The collection name
|
|
895
|
+
* @returns {string} The name of the collection's entity type
|
|
896
|
+
*/
|
|
897
|
+
ODataMetadata.prototype._getEntityTypeName = function(sEntitySetName) {
|
|
869
898
|
var sEntityTypeName, oEntitySet;
|
|
870
899
|
|
|
871
|
-
if (
|
|
872
|
-
oEntitySet = this._findEntitySetByName(
|
|
900
|
+
if (sEntitySetName) {
|
|
901
|
+
oEntitySet = this._findEntitySetByName(sEntitySetName);
|
|
873
902
|
if (oEntitySet){
|
|
874
903
|
sEntityTypeName = oEntitySet.entityType;
|
|
875
904
|
}
|
|
@@ -878,7 +907,12 @@ sap.ui.define([
|
|
|
878
907
|
};
|
|
879
908
|
|
|
880
909
|
/**
|
|
881
|
-
*
|
|
910
|
+
* Gets the object of a specified type name and namespace.
|
|
911
|
+
*
|
|
912
|
+
* @param {string} sObjectType The object's type
|
|
913
|
+
* @param {string} sObjectName The object's name
|
|
914
|
+
* @param {string} sNamespace The object's namespace
|
|
915
|
+
* @returns {object} The found object
|
|
882
916
|
*/
|
|
883
917
|
ODataMetadata.prototype._getObjectMetadata = function(sObjectType, sObjectName, sNamespace) {
|
|
884
918
|
var oObject;
|
|
@@ -893,9 +927,11 @@ sap.ui.define([
|
|
|
893
927
|
oObject.namespace = oSchema.namespace;
|
|
894
928
|
return false;
|
|
895
929
|
}
|
|
930
|
+
return true;
|
|
896
931
|
});
|
|
897
932
|
return !oObject;
|
|
898
933
|
}
|
|
934
|
+
return true;
|
|
899
935
|
});
|
|
900
936
|
}
|
|
901
937
|
return oObject;
|
|
@@ -918,6 +954,7 @@ sap.ui.define([
|
|
|
918
954
|
bUseBatch = (typeof oExtension.value === 'string') ? (oExtension.value.toLowerCase() === 'true') : !!oExtension.value;
|
|
919
955
|
return false;
|
|
920
956
|
}
|
|
957
|
+
return true;
|
|
921
958
|
});
|
|
922
959
|
}
|
|
923
960
|
});
|
|
@@ -942,6 +979,7 @@ sap.ui.define([
|
|
|
942
979
|
return false;
|
|
943
980
|
}
|
|
944
981
|
}
|
|
982
|
+
return true;
|
|
945
983
|
});
|
|
946
984
|
}
|
|
947
985
|
// break if single entry is wanted and there is exactly one
|
|
@@ -979,6 +1017,8 @@ sap.ui.define([
|
|
|
979
1017
|
*
|
|
980
1018
|
* @param {string} sFunctionName The name of the function import to look up
|
|
981
1019
|
* @param {string} sMethod The HTTP Method for which this function is requested
|
|
1020
|
+
*
|
|
1021
|
+
* @returns {object|null} The function import metadata
|
|
982
1022
|
*/
|
|
983
1023
|
ODataMetadata.prototype._getFunctionImportMetadata = function(sFunctionName, sMethod) {
|
|
984
1024
|
if (sFunctionName.indexOf("/") > -1) {
|
|
@@ -991,7 +1031,7 @@ sap.ui.define([
|
|
|
991
1031
|
|
|
992
1032
|
|
|
993
1033
|
/**
|
|
994
|
-
* Returns the target EntityType for
|
|
1034
|
+
* Returns the target EntityType for the NavigationProperty of a given EntityType object. The target is
|
|
995
1035
|
* defined as the toRole of the navigationproperty; this method looks up the corresponding matching End in the
|
|
996
1036
|
* corresponding Association and returns the matching entityType
|
|
997
1037
|
* @see sap.ui.model.odata.ODataMetadata#_getEntityTypeByNavPropertyObject
|
|
@@ -1018,7 +1058,7 @@ sap.ui.define([
|
|
|
1018
1058
|
|
|
1019
1059
|
|
|
1020
1060
|
/**
|
|
1021
|
-
* Returns the target EntityType for a given
|
|
1061
|
+
* Returns the target EntityType for a given NavigationProperty object. The target is defined as the toRole of
|
|
1022
1062
|
* the navigationproperty; this method looks up the corresponding matching End in the corresponding Association
|
|
1023
1063
|
* and returns the matching entityType
|
|
1024
1064
|
*
|
|
@@ -1049,7 +1089,10 @@ sap.ui.define([
|
|
|
1049
1089
|
};
|
|
1050
1090
|
|
|
1051
1091
|
/**
|
|
1052
|
-
*
|
|
1092
|
+
* Get all navigation property names in an array by the specified entity type.
|
|
1093
|
+
*
|
|
1094
|
+
* @param {object} oEntityType The entity type
|
|
1095
|
+
* @returns {string[]} An array containing the navigation property names
|
|
1053
1096
|
*/
|
|
1054
1097
|
ODataMetadata.prototype._getNavigationPropertyNames = function(oEntityType) {
|
|
1055
1098
|
var aNavProps = [];
|
|
@@ -1062,10 +1105,14 @@ sap.ui.define([
|
|
|
1062
1105
|
};
|
|
1063
1106
|
|
|
1064
1107
|
/**
|
|
1065
|
-
* Get dependent nav property name, entityset and key properties for given entity and property
|
|
1066
|
-
* If the property name is contained as key property in a referential constraint of one of
|
|
1108
|
+
* Get dependent nav property name, entityset and key properties for given entity and property
|
|
1109
|
+
* name. If the property name is contained as key property in a referential constraint of one of
|
|
1067
1110
|
* the navigation properties, return the name of the navigation property, as well as the
|
|
1068
1111
|
* referenced entityset and the array of key properties.
|
|
1112
|
+
*
|
|
1113
|
+
* @param {object} oEntityType The entity type
|
|
1114
|
+
* @param {string} sPropertyName The property name
|
|
1115
|
+
* @returns {object} An object containing information about the navigation property
|
|
1069
1116
|
*/
|
|
1070
1117
|
ODataMetadata.prototype._getNavPropertyRefInfo = function(oEntityType, sPropertyName) {
|
|
1071
1118
|
var oNavPropInfo, oAssociation, oAssociationInfo, oAssociationSet, oPrincipal, oDependent,
|
|
@@ -1113,13 +1160,18 @@ sap.ui.define([
|
|
|
1113
1160
|
};
|
|
1114
1161
|
|
|
1115
1162
|
/**
|
|
1116
|
-
|
|
1117
|
-
|
|
1163
|
+
* Extract the property metadata of a specified property of an entity type out of the metadata
|
|
1164
|
+
* document.
|
|
1165
|
+
*
|
|
1166
|
+
* @param {object} oEntityType The entity type
|
|
1167
|
+
* @param {string} sProperty The property in the entity type
|
|
1168
|
+
* @returns {object} The property's metadata
|
|
1169
|
+
*/
|
|
1118
1170
|
ODataMetadata.prototype._getPropertyMetadata = function(oEntityType, sProperty) {
|
|
1119
1171
|
var oPropertyMetadata, that = this;
|
|
1120
1172
|
|
|
1121
1173
|
if (!oEntityType) {
|
|
1122
|
-
return;
|
|
1174
|
+
return undefined;
|
|
1123
1175
|
}
|
|
1124
1176
|
|
|
1125
1177
|
// remove starting/trailing /
|
|
@@ -1131,6 +1183,7 @@ sap.ui.define([
|
|
|
1131
1183
|
oPropertyMetadata = oProperty;
|
|
1132
1184
|
return false;
|
|
1133
1185
|
}
|
|
1186
|
+
return true;
|
|
1134
1187
|
});
|
|
1135
1188
|
|
|
1136
1189
|
if (aParts.length > 1) {
|
|
@@ -1209,9 +1262,11 @@ sap.ui.define([
|
|
|
1209
1262
|
};
|
|
1210
1263
|
|
|
1211
1264
|
/**
|
|
1212
|
-
*
|
|
1265
|
+
* Creates a request object for changes.
|
|
1266
|
+
*
|
|
1267
|
+
* @param {string} sUrl The request URL
|
|
1268
|
+
* @return {object} The request object
|
|
1213
1269
|
*
|
|
1214
|
-
* @return {object} request object
|
|
1215
1270
|
* @private
|
|
1216
1271
|
*/
|
|
1217
1272
|
ODataMetadata.prototype._createRequest = function(sUrl) {
|
|
@@ -1254,16 +1309,14 @@ sap.ui.define([
|
|
|
1254
1309
|
|
|
1255
1310
|
oEntityType = this._getEntityTypeByPath(sEntityPath);
|
|
1256
1311
|
|
|
1257
|
-
|
|
1258
|
-
return this._entitySetMap[oEntityType.entityType];
|
|
1259
|
-
}
|
|
1312
|
+
return oEntityType && this._entitySetMap[oEntityType.entityType];
|
|
1260
1313
|
};
|
|
1261
1314
|
|
|
1262
1315
|
/**
|
|
1263
|
-
* Add metadata url: The response will be merged with the existing metadata object
|
|
1316
|
+
* Add metadata url: The response will be merged with the existing metadata object.
|
|
1264
1317
|
*
|
|
1265
|
-
* @param {string
|
|
1266
|
-
* @returns Promise The Promise for metadata loading
|
|
1318
|
+
* @param {string|string[]} vUrl Either one URL as string or an array of URI strings
|
|
1319
|
+
* @returns {Promise} The Promise for metadata loading
|
|
1267
1320
|
* @private
|
|
1268
1321
|
*/
|
|
1269
1322
|
ODataMetadata.prototype._addUrl = function(vUrl) {
|
|
@@ -1355,7 +1408,7 @@ sap.ui.define([
|
|
|
1355
1408
|
* Returns the first EntitySet from all EntityContainers that matches the namespace and name of the given EntityType
|
|
1356
1409
|
*
|
|
1357
1410
|
* @param {map} mEntityType - The EntityType object
|
|
1358
|
-
* @return {map|null}
|
|
1411
|
+
* @return {map|null} Returns the EntitySet object or null if not found
|
|
1359
1412
|
*/
|
|
1360
1413
|
ODataMetadata.prototype._getEntitySetByType = function(mEntityType) {
|
|
1361
1414
|
var sEntityType = mEntityType.namespace + "." + mEntityType.name;
|
|
@@ -1421,7 +1474,7 @@ sap.ui.define([
|
|
|
1421
1474
|
* Returns the first AssociationSet from all EntityContainers that matches the association name
|
|
1422
1475
|
*
|
|
1423
1476
|
* @param {string} sAssociation The full qualified association name
|
|
1424
|
-
* @return {map|null}
|
|
1477
|
+
* @return {map|null} Returns the AssociationSet object or null if not found
|
|
1425
1478
|
*/
|
|
1426
1479
|
ODataMetadata.prototype._getAssociationSetByAssociation = function(sAssociation) {
|
|
1427
1480
|
var aSchema = this.oMetadata.dataServices.schema;
|
|
@@ -1598,11 +1651,9 @@ sap.ui.define([
|
|
|
1598
1651
|
} else { // EntitySet or FunctionImport
|
|
1599
1652
|
oEntityType = this._getEntityTypeByPath(sPath);
|
|
1600
1653
|
}
|
|
1601
|
-
|
|
1602
|
-
return
|
|
1603
|
-
|
|
1604
|
-
});
|
|
1605
|
-
}
|
|
1654
|
+
return oEntityType && oEntityType.key.propertyRef.map(function (oKey) {
|
|
1655
|
+
return oKey.name;
|
|
1656
|
+
});
|
|
1606
1657
|
};
|
|
1607
1658
|
|
|
1608
1659
|
/**
|