@openui5/sap.ui.core 1.107.1 → 1.108.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/.dtsgenrc +63 -0
- package/THIRDPARTY.txt +1 -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 +1 -1
- package/src/jquery.sap.script.js +1 -1
- package/src/jquery.sap.storage.js +3 -3
- package/src/sap/base/i18n/ResourceBundle.js +10 -0
- package/src/sap/base/security/URLListValidator.js +36 -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 +3 -3
- package/src/sap/ui/Global.js +4 -4
- 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 +2 -2
- 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 +1 -1
- package/src/sap/ui/base/ObjectPool.js +1 -1
- package/src/sap/ui/core/.library +50 -50
- package/src/sap/ui/core/BusyIndicator.js +1 -1
- package/src/sap/ui/core/BusyIndicatorUtils.js +22 -8
- package/src/sap/ui/core/Component.js +21 -4
- package/src/sap/ui/core/ComponentContainer.js +5 -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 +2 -15
- package/src/sap/ui/core/Control.js +20 -2
- package/src/sap/ui/core/Core.js +311 -413
- 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 +1 -1
- 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/FocusHandler.js +12 -14
- package/src/sap/ui/core/Fragment.js +5 -2
- 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 +1 -1
- package/src/sap/ui/core/IconPool.js +7 -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 +1 -1
- package/src/sap/ui/core/Manifest.js +16 -83
- package/src/sap/ui/core/Message.js +1 -1
- package/src/sap/ui/core/Popup.js +14 -4
- package/src/sap/ui/core/RenderManager.js +111 -109
- 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 +1 -1
- package/src/sap/ui/core/SeparatorItem.js +1 -1
- package/src/sap/ui/core/ShortcutHintsMixin.js +20 -0
- 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 +4 -2
- 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/_IconRegistry.js +11 -7
- package/src/sap/ui/core/_UrlResolver.js +139 -0
- package/src/sap/ui/core/date/CalendarUtils.js +87 -0
- package/src/sap/ui/core/date/CalendarWeekNumbering.js +73 -0
- package/src/sap/ui/core/date/UniversalDate.js +198 -74
- package/src/sap/ui/core/delegate/ItemNavigation.js +1 -1
- package/src/sap/ui/core/delegate/ScrollEnablement.js +1 -1
- package/src/sap/ui/core/dnd/DragDropBase.js +1 -1
- package/src/sap/ui/core/dnd/DragDropInfo.js +1 -1
- package/src/sap/ui/core/dnd/DragInfo.js +1 -1
- package/src/sap/ui/core/dnd/DropInfo.js +1 -1
- package/src/sap/ui/core/format/DateFormat.js +187 -57
- package/src/sap/ui/core/format/NumberFormat.js +64 -23
- package/src/sap/ui/core/format/TimezoneUtil.js +3 -1
- package/src/sap/ui/core/hyphenation/Hyphenation.js +1 -1
- package/src/sap/ui/core/library.js +19 -10
- package/src/sap/ui/core/message/ControlMessageProcessor.js +1 -1
- package/src/sap/ui/core/message/Message.js +5 -3
- 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 +1 -1
- package/src/sap/ui/core/messagebundle_fr.properties +1 -1
- package/src/sap/ui/core/mvc/HTMLView.js +10 -2
- 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 +21 -20
- 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/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 +1 -1
- package/src/sap/ui/core/support/Support.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 -1
- 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/themes/base/LocalBusyIndicator.less +3 -3
- package/src/sap/ui/core/themes/base/fonts/SAP-icons.woff2 +0 -0
- package/src/sap/ui/core/theming/Parameters.js +31 -12
- package/src/sap/ui/core/theming/ThemeHelper.js +56 -1
- package/src/sap/ui/core/theming/ThemeManager.js +817 -0
- package/src/sap/ui/core/tmpl/DOMAttribute.js +1 -1
- package/src/sap/ui/core/tmpl/DOMElement.js +1 -1
- package/src/sap/ui/core/tmpl/HandlebarsTemplate.js +1 -1
- package/src/sap/ui/core/tmpl/Template.js +1 -1
- package/src/sap/ui/core/tmpl/TemplateControl.js +1 -1
- package/src/sap/ui/core/util/AsyncHintsHelper.js +1 -1
- package/src/sap/ui/core/util/Export.js +1 -1
- package/src/sap/ui/core/util/ExportCell.js +1 -1
- package/src/sap/ui/core/util/ExportColumn.js +1 -1
- package/src/sap/ui/core/util/ExportRow.js +1 -1
- package/src/sap/ui/core/util/ExportType.js +1 -1
- package/src/sap/ui/core/util/ExportTypeCSV.js +1 -1
- package/src/sap/ui/core/util/File.js +1 -1
- package/src/sap/ui/core/util/LibraryInfo.js +1 -1
- package/src/sap/ui/core/util/MockServer.js +1 -1
- package/src/sap/ui/core/util/PasteHelper.js +1 -1
- package/src/sap/ui/core/util/serializer/HTMLViewSerializer.js +2 -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/getFirstEditableInput.js +25 -6
- package/src/sap/ui/dom/includeStylesheet.js +2 -2
- package/src/sap/ui/model/ClientListBinding.js +11 -4
- package/src/sap/ui/model/ClientModel.js +1 -1
- package/src/sap/ui/model/ClientTreeBinding.js +60 -5
- 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/Filter.js +6 -6
- package/src/sap/ui/model/MetaModel.js +1 -1
- package/src/sap/ui/model/Model.js +1 -1
- package/src/sap/ui/model/SelectionModel.js +1 -1
- package/src/sap/ui/model/SimpleType.js +1 -1
- package/src/sap/ui/model/Sorter.js +6 -4
- package/src/sap/ui/model/TreeAutoExpandMode.js +1 -1
- package/src/sap/ui/model/TreeBinding.js +18 -0
- package/src/sap/ui/model/TreeBindingCompatibilityAdapter.js +1 -1
- package/src/sap/ui/model/Type.js +1 -1
- package/src/sap/ui/model/analytics/AnalyticalTreeBindingAdapter.js +28 -34
- package/src/sap/ui/model/controlhelper/TreeBindingProxy.js +590 -0
- package/src/sap/ui/model/json/JSONModel.js +1 -1
- package/src/sap/ui/model/message/MessageModel.js +1 -1
- package/src/sap/ui/model/odata/ODataAnnotations.js +1 -1
- package/src/sap/ui/model/odata/ODataMessageParser.js +1 -1
- package/src/sap/ui/model/odata/ODataMetaModel.js +1 -1
- package/src/sap/ui/model/odata/ODataMetadata.js +1 -1
- package/src/sap/ui/model/odata/ODataModel.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/DateTimeWithTimezone.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/BatchMode.js +2 -2
- package/src/sap/ui/model/odata/v2/Context.js +169 -4
- package/src/sap/ui/model/odata/v2/ODataAnnotations.js +1 -1
- package/src/sap/ui/model/odata/v2/ODataListBinding.js +39 -17
- package/src/sap/ui/model/odata/v2/ODataModel.js +219 -82
- package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +1 -1
- package/src/sap/ui/model/odata/v4/Context.js +35 -22
- package/src/sap/ui/model/odata/v4/ODataBinding.js +28 -22
- package/src/sap/ui/model/odata/v4/ODataContextBinding.js +6 -6
- package/src/sap/ui/model/odata/v4/ODataListBinding.js +111 -89
- package/src/sap/ui/model/odata/v4/ODataMetaModel.js +5 -4
- package/src/sap/ui/model/odata/v4/ODataModel.js +84 -46
- package/src/sap/ui/model/odata/v4/ODataParentBinding.js +19 -20
- package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +3 -3
- package/src/sap/ui/model/odata/v4/_AnnotationHelperExpression.js +1 -1
- package/src/sap/ui/model/odata/v4/lib/_AggregationCache.js +12 -5
- package/src/sap/ui/model/odata/v4/lib/_Cache.js +130 -64
- package/src/sap/ui/model/odata/v4/lib/_Helper.js +1 -1
- package/src/sap/ui/model/odata/v4/lib/_Requestor.js +56 -15
- 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 +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/TestUtils.js +20 -0
- package/src/sap/ui/test/generic/TestBase.js +1 -1
- package/src/sap/ui/thirdparty/mobify-carousel.js +0 -4
- package/src/sap/ui/util/Storage.js +1 -1
- package/src/sap/ui/core/ThemeCheck.js +0 -389
|
@@ -132,7 +132,7 @@ sap.ui.define([
|
|
|
132
132
|
* @extends sap.ui.model.odata.type.ODataType
|
|
133
133
|
* @public
|
|
134
134
|
* @since 1.27.0
|
|
135
|
-
* @version 1.
|
|
135
|
+
* @version 1.108.0
|
|
136
136
|
*/
|
|
137
137
|
var DateTimeBase = ODataType.extend("sap.ui.model.odata.type.DateTimeBase", {
|
|
138
138
|
constructor : function (oFormatOptions, oConstraints) {
|
|
@@ -30,7 +30,7 @@ sap.ui.define([
|
|
|
30
30
|
* @extends sap.ui.model.odata.type.ODataType
|
|
31
31
|
* @public
|
|
32
32
|
* @since 1.37.0
|
|
33
|
-
* @version 1.
|
|
33
|
+
* @version 1.108.0
|
|
34
34
|
*/
|
|
35
35
|
var Raw = ODataType.extend("sap.ui.model.odata.type.Raw", {
|
|
36
36
|
constructor : function (oFormatOptions, oConstraints) {
|
|
@@ -60,7 +60,7 @@ sap.ui.define([
|
|
|
60
60
|
* @extends sap.ui.model.odata.type.ODataType
|
|
61
61
|
* @public
|
|
62
62
|
* @since 1.51.0
|
|
63
|
-
* @version 1.
|
|
63
|
+
* @version 1.108.0
|
|
64
64
|
*/
|
|
65
65
|
var Stream = ODataType.extend("sap.ui.model.odata.type.Stream", {
|
|
66
66
|
constructor : function (oFormatOptions, oConstraints) {
|
|
@@ -110,7 +110,7 @@ sap.ui.define([
|
|
|
110
110
|
* @extends sap.ui.model.odata.type.ODataType
|
|
111
111
|
* @public
|
|
112
112
|
* @since 1.37.0
|
|
113
|
-
* @version 1.
|
|
113
|
+
* @version 1.108.0
|
|
114
114
|
*/
|
|
115
115
|
var TimeOfDay = ODataType.extend("sap.ui.model.odata.type.TimeOfDay", {
|
|
116
116
|
constructor : function (oFormatOptions, oConstraints) {
|
|
@@ -63,7 +63,7 @@ sap.ui.define([
|
|
|
63
63
|
* @extends sap.ui.model.type.Unit
|
|
64
64
|
* @public
|
|
65
65
|
* @since 1.63.0
|
|
66
|
-
* @version 1.
|
|
66
|
+
* @version 1.108.0
|
|
67
67
|
*/
|
|
68
68
|
var Unit = BaseUnit.extend("sap.ui.model.odata.type.Unit", {
|
|
69
69
|
constructor : function (oFormatOptions, oConstraints, aDynamicFormatOptionNames) {
|
|
@@ -15,8 +15,8 @@ sap.ui.define(function() {
|
|
|
15
15
|
* @enum {string}
|
|
16
16
|
* @public
|
|
17
17
|
* @alias sap.ui.model.odata.v2.BatchMode
|
|
18
|
-
* @deprecated Use {@link sap.ui.model.odata.CountMode} to specify how the count of
|
|
19
|
-
|
|
18
|
+
* @deprecated since 1.74.0; Use {@link sap.ui.model.odata.CountMode} to specify how the count of
|
|
19
|
+
collections is retrieved. Use the <code>useBatch</code> parameter of the
|
|
20
20
|
* {@link sap.ui.model.odata.v2.ODataModel} constructor to specify whether requests are sent in
|
|
21
21
|
* $batch.
|
|
22
22
|
*/
|
|
@@ -26,7 +26,8 @@ sap.ui.define([
|
|
|
26
26
|
* @param {sap.ui.base.SyncPromise} [oCreatePromise]
|
|
27
27
|
* A sync promise that is given when this context has been created by
|
|
28
28
|
* {@link sap.ui.model.odata.v2.ODataModel#createEntry} or
|
|
29
|
-
* {@link sap.ui.model.odata.v2.ODataListBinding#create}
|
|
29
|
+
* {@link sap.ui.model.odata.v2.ODataListBinding#create}; ignored if the parameter
|
|
30
|
+
* <code>oTransientParent</code> is given.
|
|
30
31
|
*
|
|
31
32
|
* When the entity represented by this context has been successfully persisted in the back
|
|
32
33
|
* end, the given promise resolves.
|
|
@@ -38,6 +39,9 @@ sap.ui.define([
|
|
|
38
39
|
* <code>oError.aborted === true</code>.
|
|
39
40
|
* @param {boolean} [bInactive]
|
|
40
41
|
* Whether the created context is inactive
|
|
42
|
+
* @param {boolean} [oTransientParent]
|
|
43
|
+
* The transient parent context of this created context for the case of deep-create; if given,
|
|
44
|
+
* the created promise of the parent context is also used for this context.
|
|
41
45
|
* @alias sap.ui.model.odata.v2.Context
|
|
42
46
|
* @author SAP SE
|
|
43
47
|
* @class Implementation of an OData V2 model's context.
|
|
@@ -60,10 +64,11 @@ sap.ui.define([
|
|
|
60
64
|
* @hideconstructor
|
|
61
65
|
* @public
|
|
62
66
|
* @since 1.93.0
|
|
63
|
-
* @version 1.
|
|
67
|
+
* @version 1.108.0
|
|
64
68
|
*/
|
|
65
69
|
var Context = BaseContext.extend("sap.ui.model.odata.v2.Context", {
|
|
66
|
-
constructor : function (oModel, sPath, sDeepPath, oCreatePromise, bInactive
|
|
70
|
+
constructor : function (oModel, sPath, sDeepPath, oCreatePromise, bInactive,
|
|
71
|
+
oTransientParent) {
|
|
67
72
|
var that = this;
|
|
68
73
|
|
|
69
74
|
BaseContext.call(this, oModel, sPath);
|
|
@@ -82,7 +87,9 @@ sap.ui.define([
|
|
|
82
87
|
// SyncPromise for a context created via
|
|
83
88
|
// sap.ui.model.odata.v2.ODataModel#createEntry; used internally to detect
|
|
84
89
|
// synchronously whether the promise is already fulfilled
|
|
85
|
-
this.oSyncCreatePromise =
|
|
90
|
+
this.oSyncCreatePromise = oTransientParent
|
|
91
|
+
? oTransientParent.oSyncCreatePromise
|
|
92
|
+
: oCreatePromise;
|
|
86
93
|
// whether the context is updated, e.g. path changed from a preliminary path to the
|
|
87
94
|
// canonical one
|
|
88
95
|
this.bUpdated = false;
|
|
@@ -94,6 +101,10 @@ sap.ui.define([
|
|
|
94
101
|
this.oActivatedPromise = bInactive
|
|
95
102
|
? new SyncPromise(function (resolve) { that.fnActivate = resolve; })
|
|
96
103
|
: SyncPromise.resolve();
|
|
104
|
+
// for a transient context, maps navigation property name to (array of)
|
|
105
|
+
// sub-context(s) for deep create
|
|
106
|
+
this.mSubContexts = undefined;
|
|
107
|
+
this.oTransientParent = oTransientParent;
|
|
97
108
|
}
|
|
98
109
|
});
|
|
99
110
|
|
|
@@ -109,6 +120,26 @@ sap.ui.define([
|
|
|
109
120
|
}
|
|
110
121
|
};
|
|
111
122
|
|
|
123
|
+
/**
|
|
124
|
+
* Adds the given transient context as sub-context to this transient context under the given
|
|
125
|
+
* navigation property.
|
|
126
|
+
*
|
|
127
|
+
* @param {string} sNavProperty The name of the navigation property
|
|
128
|
+
* @param {sap.ui.model.odata.v2.Context} oSubContext The sub-context to be added
|
|
129
|
+
* @param {boolean} bIsCollection Whether the navigation property is a collection
|
|
130
|
+
*
|
|
131
|
+
* @private
|
|
132
|
+
*/
|
|
133
|
+
Context.prototype.addSubContext = function (sNavProperty, oSubContext, bIsCollection) {
|
|
134
|
+
this.mSubContexts = this.mSubContexts || {};
|
|
135
|
+
if (bIsCollection) {
|
|
136
|
+
this.mSubContexts[sNavProperty] = this.mSubContexts[sNavProperty] || [];
|
|
137
|
+
this.mSubContexts[sNavProperty].push(oSubContext);
|
|
138
|
+
} else {
|
|
139
|
+
this.mSubContexts[sNavProperty] = oSubContext;
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
|
|
112
143
|
/**
|
|
113
144
|
* Returns a promise on the creation state of this context if it has been created via
|
|
114
145
|
* {@link sap.ui.model.odata.v2.ODataModel#createEntry} or
|
|
@@ -244,6 +275,77 @@ sap.ui.define([
|
|
|
244
275
|
return this.sDeepPath;
|
|
245
276
|
};
|
|
246
277
|
|
|
278
|
+
/**
|
|
279
|
+
* Gets the map of sub-contexts for a deep create.
|
|
280
|
+
*
|
|
281
|
+
* @returns {Object<string,sap.ui.model.odata.v2.Context|sap.ui.model.odata.v2.Context[]>}
|
|
282
|
+
* The map of sub-contexts
|
|
283
|
+
*
|
|
284
|
+
* @private
|
|
285
|
+
*/
|
|
286
|
+
Context.prototype.getSubContexts = function () {
|
|
287
|
+
return this.mSubContexts;
|
|
288
|
+
};
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* Gets a flat array of the sub-contexts map for a deep create.
|
|
292
|
+
*
|
|
293
|
+
* @param {boolean} [bRecursive] Whether to recursively collect all deep sub-contexts
|
|
294
|
+
* @returns {sap.ui.model.odata.v2.Context[]} The array of sub-contexts
|
|
295
|
+
*
|
|
296
|
+
* @private
|
|
297
|
+
*/
|
|
298
|
+
Context.prototype.getSubContextsArray = function (bRecursive) {
|
|
299
|
+
var sNavProperty, vSubContexts,
|
|
300
|
+
aSubContexts = [];
|
|
301
|
+
|
|
302
|
+
function collectContexts(oSubContext) {
|
|
303
|
+
aSubContexts.push(oSubContext);
|
|
304
|
+
if (bRecursive) {
|
|
305
|
+
aSubContexts = aSubContexts.concat(oSubContext.getSubContextsArray(bRecursive));
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
for (sNavProperty in this.mSubContexts) {
|
|
310
|
+
vSubContexts = this.mSubContexts[sNavProperty];
|
|
311
|
+
if (Array.isArray(vSubContexts)) {
|
|
312
|
+
vSubContexts.forEach(collectContexts);
|
|
313
|
+
} else {
|
|
314
|
+
collectContexts(vSubContexts);
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
return aSubContexts;
|
|
319
|
+
};
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* Gets an array of keys to the sub-contexts for a deep create.
|
|
323
|
+
*
|
|
324
|
+
* @param {boolean} [bRecursive] Whether to recursively collect all deep sub-context keys
|
|
325
|
+
* @returns {string[]} The array of sub-context keys
|
|
326
|
+
*
|
|
327
|
+
* @private
|
|
328
|
+
*/
|
|
329
|
+
Context.prototype.getSubContextsAsKey = function (bRecursive) {
|
|
330
|
+
return this.getSubContextsArray(bRecursive).map(function (oContext) {
|
|
331
|
+
return oContext.getPath().slice(1);
|
|
332
|
+
});
|
|
333
|
+
};
|
|
334
|
+
|
|
335
|
+
/**
|
|
336
|
+
* Gets an array of paths to the sub-contexts for a deep create.
|
|
337
|
+
*
|
|
338
|
+
* @param {boolean} [bRecursive] Whether to recursively collect all deep sub-context paths
|
|
339
|
+
* @returns {string[]} The array of sub-context paths
|
|
340
|
+
*
|
|
341
|
+
* @private
|
|
342
|
+
*/
|
|
343
|
+
Context.prototype.getSubContextsAsPath = function (bRecursive) {
|
|
344
|
+
return this.getSubContextsArray(bRecursive).map(function (oContext) {
|
|
345
|
+
return oContext.getPath();
|
|
346
|
+
});
|
|
347
|
+
};
|
|
348
|
+
|
|
247
349
|
/**
|
|
248
350
|
* Whether this context has changed, which means it has been updated or a refresh of dependent
|
|
249
351
|
* bindings needs to be enforced.
|
|
@@ -257,6 +359,28 @@ sap.ui.define([
|
|
|
257
359
|
return this.bUpdated || this.bForceRefresh;
|
|
258
360
|
};
|
|
259
361
|
|
|
362
|
+
/**
|
|
363
|
+
* Returns whether this context has at least one sub-context.
|
|
364
|
+
*
|
|
365
|
+
* @return {boolean} Whether this context has at least one sub-context
|
|
366
|
+
*
|
|
367
|
+
* @private
|
|
368
|
+
*/
|
|
369
|
+
Context.prototype.hasSubContexts = function () {
|
|
370
|
+
return !!this.mSubContexts;
|
|
371
|
+
};
|
|
372
|
+
|
|
373
|
+
/**
|
|
374
|
+
* Returns whether this context has a transient parent context.
|
|
375
|
+
*
|
|
376
|
+
* @return {boolean} Whether this context has a transient parent context
|
|
377
|
+
*
|
|
378
|
+
* @private
|
|
379
|
+
*/
|
|
380
|
+
Context.prototype.hasTransientParent = function () {
|
|
381
|
+
return !!this.oTransientParent;
|
|
382
|
+
};
|
|
383
|
+
|
|
260
384
|
/**
|
|
261
385
|
* Returns whether this context is inactive. An inactive context will only be sent to the
|
|
262
386
|
* server after the first property update. From then on it behaves like any other created
|
|
@@ -339,6 +463,47 @@ sap.ui.define([
|
|
|
339
463
|
return this.bUpdated;
|
|
340
464
|
};
|
|
341
465
|
|
|
466
|
+
/**
|
|
467
|
+
* Removes this context from its transient parent.
|
|
468
|
+
*
|
|
469
|
+
* @private
|
|
470
|
+
*/
|
|
471
|
+
Context.prototype.removeFromTransientParent = function () {
|
|
472
|
+
if (this.oTransientParent) {
|
|
473
|
+
this.oTransientParent.removeSubContext(this);
|
|
474
|
+
delete this.oTransientParent;
|
|
475
|
+
}
|
|
476
|
+
};
|
|
477
|
+
|
|
478
|
+
/**
|
|
479
|
+
* Removes the given sub-context from this context.
|
|
480
|
+
*
|
|
481
|
+
* @param {sap.ui.model.odata.v2.Context} oSubContext The context to remove
|
|
482
|
+
*
|
|
483
|
+
* @private
|
|
484
|
+
*/
|
|
485
|
+
Context.prototype.removeSubContext = function (oSubContext) {
|
|
486
|
+
var iIndex, sNavProperty, vSubContexts;
|
|
487
|
+
|
|
488
|
+
for (sNavProperty in this.mSubContexts) {
|
|
489
|
+
vSubContexts = this.mSubContexts[sNavProperty];
|
|
490
|
+
if (Array.isArray(vSubContexts)) {
|
|
491
|
+
iIndex = vSubContexts.indexOf(oSubContext);
|
|
492
|
+
if (iIndex > -1) {
|
|
493
|
+
vSubContexts.splice(iIndex, 1);
|
|
494
|
+
}
|
|
495
|
+
if (!vSubContexts.length) {
|
|
496
|
+
delete this.mSubContexts[sNavProperty];
|
|
497
|
+
}
|
|
498
|
+
} else if (vSubContexts === oSubContext) {
|
|
499
|
+
delete this.mSubContexts[sNavProperty];
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
if (this.mSubContexts && !Object.keys(this.mSubContexts).length) {
|
|
503
|
+
this.mSubContexts = undefined;
|
|
504
|
+
}
|
|
505
|
+
};
|
|
506
|
+
|
|
342
507
|
/**
|
|
343
508
|
* Resets the created promise to indicate that the entity has been re-read from the back end.
|
|
344
509
|
*
|
|
@@ -294,7 +294,7 @@ sap.ui.define([
|
|
|
294
294
|
bKeepCurrent) {
|
|
295
295
|
var aContexts, aContextData, oSkipAndTop;
|
|
296
296
|
|
|
297
|
-
if (this.bInitial
|
|
297
|
+
if (this.bInitial) {
|
|
298
298
|
return [];
|
|
299
299
|
}
|
|
300
300
|
|
|
@@ -333,7 +333,9 @@ sap.ui.define([
|
|
|
333
333
|
}
|
|
334
334
|
}
|
|
335
335
|
aContexts = this._getContexts(iStartIndex, iLength);
|
|
336
|
-
if (this.
|
|
336
|
+
if (this._hasTransientParentContext()) {
|
|
337
|
+
// skip #loadData
|
|
338
|
+
} else if (this.useClientMode()) {
|
|
337
339
|
if (!this.aAllKeys && !this.bPendingRequest && this.oModel.getServiceMetadata()) {
|
|
338
340
|
this.loadData();
|
|
339
341
|
aContexts.dataRequested = true;
|
|
@@ -505,7 +507,8 @@ sap.ui.define([
|
|
|
505
507
|
return;
|
|
506
508
|
}
|
|
507
509
|
if (Context.hasChanged(this.oContext, oContext)) {
|
|
508
|
-
bHadNonTransientContext = this.isResolved()
|
|
510
|
+
bHadNonTransientContext = this.isResolved()
|
|
511
|
+
&& !this._hasTransientParentWithoutSubContexts();
|
|
509
512
|
this.oContext = oContext;
|
|
510
513
|
sResolvedPath = this.getResolvedPath(); // resolved path with the new context
|
|
511
514
|
this.sDeepPath = this.oModel.resolveDeep(this.sPath, this.oContext);
|
|
@@ -514,12 +517,12 @@ sap.ui.define([
|
|
|
514
517
|
}
|
|
515
518
|
// ensure that data state is updated with each change of the context
|
|
516
519
|
this.checkDataState();
|
|
517
|
-
|
|
518
|
-
if (!sResolvedPath || this._hasTransientParentContext()) {
|
|
520
|
+
if (!sResolvedPath || this._hasTransientParentWithoutSubContexts()) {
|
|
519
521
|
this.aAllKeys = null;
|
|
520
522
|
this.aKeys = [];
|
|
521
523
|
this.iLength = 0;
|
|
522
524
|
this.bLengthFinal = true;
|
|
525
|
+
this.abortPendingRequest();
|
|
523
526
|
if (bHadNonTransientContext) {
|
|
524
527
|
this._fireChange({reason : ChangeReason.Context});
|
|
525
528
|
}
|
|
@@ -1110,7 +1113,7 @@ sap.ui.define([
|
|
|
1110
1113
|
var oEntityType, sResolvedPath,
|
|
1111
1114
|
bChangeDetected = false;
|
|
1112
1115
|
|
|
1113
|
-
if (this.
|
|
1116
|
+
if (this._hasTransientParentWithoutSubContexts()) {
|
|
1114
1117
|
return;
|
|
1115
1118
|
}
|
|
1116
1119
|
if (!bForceUpdate) {
|
|
@@ -1229,7 +1232,7 @@ sap.ui.define([
|
|
|
1229
1232
|
*/
|
|
1230
1233
|
ODataListBinding.prototype.initialize = function() {
|
|
1231
1234
|
if (this.oModel.oMetadata && this.oModel.oMetadata.isLoaded() && this.bInitial
|
|
1232
|
-
&& !this.
|
|
1235
|
+
&& !this._hasTransientParentWithoutSubContexts()) {
|
|
1233
1236
|
if (!this._checkPathType()) {
|
|
1234
1237
|
Log.error("List Binding is not bound against a list for " + this.getResolvedPath());
|
|
1235
1238
|
}
|
|
@@ -1878,6 +1881,10 @@ sap.ui.define([
|
|
|
1878
1881
|
* Note: This method requires that the model metadata has been loaded; see
|
|
1879
1882
|
* {@link sap.ui.model.odata.v2.ODataModel#metadataLoaded}.
|
|
1880
1883
|
*
|
|
1884
|
+
* Since 1.108.0, this method supports deep create, which means it may be called if this
|
|
1885
|
+
* binding's context is transient. The restrictions specified for
|
|
1886
|
+
* {@link sap.ui.model.odata.v2.ODataModel#createEntry} regarding deep create apply.
|
|
1887
|
+
*
|
|
1881
1888
|
* @param {object} [oInitialData={}]
|
|
1882
1889
|
* The initial data for the created entity; see the <code>mParameters.properties</code>
|
|
1883
1890
|
* parameter of {@link sap.ui.model.odata.v2.ODataModel#createEntry}
|
|
@@ -1888,8 +1895,9 @@ sap.ui.define([
|
|
|
1888
1895
|
* the binding does not necessarily correspond to the order of the resulting back end creation
|
|
1889
1896
|
* requests.
|
|
1890
1897
|
* @param {object} mParameters
|
|
1891
|
-
* A map of parameters as specified for {@link sap.ui.model.odata.v2.ODataModel#createEntry}
|
|
1892
|
-
* where only the
|
|
1898
|
+
* A map of parameters as specified for {@link sap.ui.model.odata.v2.ODataModel#createEntry},
|
|
1899
|
+
* where only the subset given below is supported. In case of deep create, <b>none</b> of the
|
|
1900
|
+
* parameters in <code>mParameters</code> must be set.
|
|
1893
1901
|
* @param {string} [mParameters.changeSetId]
|
|
1894
1902
|
* The ID of the <code>ChangeSet</code> that this request should belong to
|
|
1895
1903
|
* @param {function} [mParameters.error]
|
|
@@ -1914,7 +1922,8 @@ sap.ui.define([
|
|
|
1914
1922
|
* If
|
|
1915
1923
|
* <ul>
|
|
1916
1924
|
* <li>a relative binding is unresolved,</li>
|
|
1917
|
-
* <li>the binding's context is transient
|
|
1925
|
+
* <li>the binding's context is transient and any parameter is set in
|
|
1926
|
+
* <code>mParameters</code>,</li>
|
|
1918
1927
|
* <li><code>bAtEnd</code> is truthy and the binding's length is not final,</li>
|
|
1919
1928
|
* <li>the collection data has been read via <code>$expand</code> together with the parent
|
|
1920
1929
|
* entity,</li>
|
|
@@ -1930,8 +1939,7 @@ sap.ui.define([
|
|
|
1930
1939
|
var oCreatedContext, oCreatedContextsCache, sResolvedPath,
|
|
1931
1940
|
mCreateParameters = {
|
|
1932
1941
|
context : this.oContext,
|
|
1933
|
-
properties : oInitialData
|
|
1934
|
-
refreshAfterChange : false
|
|
1942
|
+
properties : oInitialData
|
|
1935
1943
|
},
|
|
1936
1944
|
bCreationAreaAtEnd = this.isFirstCreateAtEnd(),
|
|
1937
1945
|
that = this;
|
|
@@ -1948,9 +1956,6 @@ sap.ui.define([
|
|
|
1948
1956
|
throw new Error("Parameter '" + sParameterKey + "' is not supported");
|
|
1949
1957
|
}
|
|
1950
1958
|
});
|
|
1951
|
-
if (this._hasTransientParentContext()) {
|
|
1952
|
-
throw new Error("Parent context is transient");
|
|
1953
|
-
}
|
|
1954
1959
|
if (this.bUseExpandedList) {
|
|
1955
1960
|
throw new Error("The collection has been read via $expand while reading the parent"
|
|
1956
1961
|
+ " entity");
|
|
@@ -1962,8 +1967,11 @@ sap.ui.define([
|
|
|
1962
1967
|
sResolvedPath = this.getResolvedPath();
|
|
1963
1968
|
oCreatedContextsCache = this.oModel._getCreatedContextsCache();
|
|
1964
1969
|
Object.assign(mCreateParameters, mParameters);
|
|
1965
|
-
if (!
|
|
1966
|
-
mCreateParameters.
|
|
1970
|
+
if (!this._hasTransientParentContext()) {
|
|
1971
|
+
mCreateParameters.refreshAfterChange = false;
|
|
1972
|
+
if (!("expand" in mCreateParameters) && this.mParameters) {
|
|
1973
|
+
mCreateParameters.expand = this.mParameters.expand;
|
|
1974
|
+
}
|
|
1967
1975
|
}
|
|
1968
1976
|
oCreatedContext = this.oModel.createEntry(this.sPath, mCreateParameters);
|
|
1969
1977
|
oCreatedContextsCache.addContext(oCreatedContext, sResolvedPath,
|
|
@@ -2155,6 +2163,20 @@ sap.ui.define([
|
|
|
2155
2163
|
&& !!(this.oContext && this.oContext.isTransient && this.oContext.isTransient());
|
|
2156
2164
|
};
|
|
2157
2165
|
|
|
2166
|
+
/**
|
|
2167
|
+
* Returns whether this binding is relative and has a transient parent context which has no
|
|
2168
|
+
* sub-contexts for this binding.
|
|
2169
|
+
*
|
|
2170
|
+
* @returns {boolean}
|
|
2171
|
+
* Whether this binding is relative and has a transient parent context which has no
|
|
2172
|
+
* sub-contexts for this binding
|
|
2173
|
+
*
|
|
2174
|
+
* @private
|
|
2175
|
+
*/
|
|
2176
|
+
ODataListBinding.prototype._hasTransientParentWithoutSubContexts = function () {
|
|
2177
|
+
return this._hasTransientParentContext() && !this._getCreatedContexts().length;
|
|
2178
|
+
};
|
|
2179
|
+
|
|
2158
2180
|
/**
|
|
2159
2181
|
* Returns whether this list binding uses the expanded list data.
|
|
2160
2182
|
*
|