@openui5/sap.ui.core 1.100.0 → 1.101.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 +1 -0
- package/THIRDPARTY.txt +5 -5
- 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/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 +2 -2
- package/src/sap/ui/base/Interface.js +1 -1
- package/src/sap/ui/base/ManagedObject.js +1 -1
- package/src/sap/ui/base/ManagedObjectMetadata.js +1 -1
- package/src/sap/ui/base/ManagedObjectRegistry.js +10 -5
- 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 +1 -1
- package/src/sap/ui/core/BusyIndicator.js +1 -1
- package/src/sap/ui/core/Component.js +22 -18
- 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 +1 -1
- package/src/sap/ui/core/Core.js +25 -10
- 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/ExtensionPoint.js +5 -0
- package/src/sap/ui/core/Fragment.js +1 -1
- 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/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 +18 -5
- package/src/sap/ui/core/Manifest.js +5 -3
- package/src/sap/ui/core/Message.js +1 -1
- package/src/sap/ui/core/Patcher.js +3 -1
- package/src/sap/ui/core/RenderManager.js +1 -1
- 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/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 +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 +20 -20
- package/src/sap/ui/core/date/UniversalDateUtils.js +48 -48
- 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/DragAndDrop.js +8 -6
- package/src/sap/ui/core/dnd/DragDropBase.js +1 -2
- 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 +122 -67
- package/src/sap/ui/core/format/DateFormatTimezoneDisplay.js +3 -0
- package/src/sap/ui/core/format/TimezoneUtil.js +3 -3
- package/src/sap/ui/core/hyphenation/Hyphenation.js +1 -1
- package/src/sap/ui/core/library.js +135 -140
- 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 +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/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 +8 -4
- package/src/sap/ui/core/mvc/XMLViewRenderer.js +5 -2
- 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/App.support.js +6 -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 +29 -1
- package/src/sap/ui/core/support/Support.js +1 -1
- package/src/sap/ui/core/support/controls/InteractionSlider.js +395 -407
- package/src/sap/ui/core/support/plugins/Breakpoint.js +5 -5
- package/src/sap/ui/core/support/plugins/ControlTree.js +434 -347
- package/src/sap/ui/core/support/plugins/Debugging.js +153 -129
- package/src/sap/ui/core/support/plugins/Interaction.js +71 -85
- package/src/sap/ui/core/support/plugins/LocalStorage.js +1 -1
- package/src/sap/ui/core/support/plugins/Performance.js +10 -13
- package/src/sap/ui/core/support/plugins/Selector.js +1 -1
- package/src/sap/ui/core/support/plugins/TechInfo.js +5 -3
- package/src/sap/ui/core/support/plugins/Trace.js +7 -7
- package/src/sap/ui/core/support/plugins/ViewInfo.js +84 -22
- package/src/sap/ui/core/support/support.css +23 -23
- package/src/sap/ui/core/support/support.html +4 -6
- package/src/sap/ui/core/support/techinfo/TechnicalInfo.js +1 -1
- package/src/sap/ui/core/themes/base/DragAndDrop.less +3 -3
- package/src/sap/ui/core/themes/base/base.less +419 -22
- package/src/sap/ui/core/themes/base/global.less +11 -9
- package/src/sap/ui/core/themes/base/shared.less +1 -0
- package/src/sap/ui/core/themes/sap_hcb/global.less +7 -5
- package/src/sap/ui/core/theming/Parameters.js +1 -1
- 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 +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/ClientModel.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/MetaModel.js +1 -1
- package/src/sap/ui/model/Model.js +10 -7
- 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/Type.js +1 -1
- package/src/sap/ui/model/_Helper.js +7 -5
- package/src/sap/ui/model/analytics/AnalyticalBinding.js +1 -1
- package/src/sap/ui/model/analytics/ODataModelAdapter.js +2 -1
- 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/ODataTreeBindingFlat.js +4 -3
- package/src/sap/ui/model/odata/ODataUtils.js +7 -9
- 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 +39 -36
- 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 +63 -3
- package/src/sap/ui/model/odata/v2/ODataAnnotations.js +1 -1
- package/src/sap/ui/model/odata/v2/ODataListBinding.js +92 -44
- package/src/sap/ui/model/odata/v2/ODataModel.js +38 -31
- package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +4 -1
- package/src/sap/ui/model/odata/v4/Context.js +9 -4
- package/src/sap/ui/model/odata/v4/ODataBinding.js +12 -12
- package/src/sap/ui/model/odata/v4/ODataContextBinding.js +3 -2
- package/src/sap/ui/model/odata/v4/ODataListBinding.js +110 -84
- package/src/sap/ui/model/odata/v4/ODataMetaModel.js +1 -1
- package/src/sap/ui/model/odata/v4/ODataModel.js +8 -8
- package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +1 -1
- package/src/sap/ui/model/odata/v4/_AnnotationHelperExpression.js +59 -5
- package/src/sap/ui/model/odata/v4/lib/_AggregationCache.js +15 -0
- package/src/sap/ui/model/odata/v4/lib/_Cache.js +186 -82
- package/src/sap/ui/model/odata/v4/lib/_ConcatHelper.js +5 -13
- package/src/sap/ui/model/odata/v4/lib/_GroupLock.js +12 -0
- package/src/sap/ui/model/odata/v4/lib/_Helper.js +1 -1
- package/src/sap/ui/model/odata/v4/lib/_Requestor.js +91 -40
- 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/Opa5.js +9 -5
- package/src/sap/ui/test/TestUtils.js +2 -1
- package/src/sap/ui/test/generic/TestBase.js +1 -1
- package/src/sap/ui/test/gherkin/opa5TestHarness.js +14 -5
- package/src/sap/ui/test/opaQunit.js +11 -10
- package/src/sap/ui/util/Storage.js +1 -1
- package/src/ui5loader.js +8 -4
|
@@ -25,6 +25,20 @@ sap.ui.define([
|
|
|
25
25
|
rSystemQueryOptionWithPlaceholder = /(\$\w+)=~/g,
|
|
26
26
|
rTimeout = /^\d+$/;
|
|
27
27
|
|
|
28
|
+
/**
|
|
29
|
+
* Clones the given headers and deletes the X-CSRF-Token within the returned cloned headers.
|
|
30
|
+
*
|
|
31
|
+
* @param {object} mHeaders The headers to be cloned
|
|
32
|
+
* @returns {object} The cloned headers w/o X-CSRF-Token header
|
|
33
|
+
*/
|
|
34
|
+
function getHeadersWithoutCSRFToken(mHeaders) {
|
|
35
|
+
var oClone = Object.assign({}, mHeaders);
|
|
36
|
+
|
|
37
|
+
delete oClone["X-CSRF-Token"];
|
|
38
|
+
|
|
39
|
+
return oClone;
|
|
40
|
+
}
|
|
41
|
+
|
|
28
42
|
/**
|
|
29
43
|
* The getResponseHeader() method imitates the jqXHR.getResponseHeader() method for a $batch
|
|
30
44
|
* error response.
|
|
@@ -85,7 +99,7 @@ sap.ui.define([
|
|
|
85
99
|
*/
|
|
86
100
|
function _Requestor(sServiceUrl, mHeaders, mQueryParams, oModelInterface) {
|
|
87
101
|
this.mBatchQueue = {};
|
|
88
|
-
this.
|
|
102
|
+
this.bBatchSent = false;
|
|
89
103
|
this.mHeaders = mHeaders || {};
|
|
90
104
|
this.aLockedGroupLocks = [];
|
|
91
105
|
this.oModelInterface = oModelInterface;
|
|
@@ -872,17 +886,6 @@ sap.ui.define([
|
|
|
872
886
|
return this.oModelInterface;
|
|
873
887
|
};
|
|
874
888
|
|
|
875
|
-
/**
|
|
876
|
-
* Returns <code>true</code> if the first $batch request was already sent.
|
|
877
|
-
*
|
|
878
|
-
* @returns {boolean} Whether the first $batch was already sent
|
|
879
|
-
*
|
|
880
|
-
* @public
|
|
881
|
-
*/
|
|
882
|
-
_Requestor.prototype.isFirstBatchSent = function () {
|
|
883
|
-
return this.bFirstBatchSent;
|
|
884
|
-
};
|
|
885
|
-
|
|
886
889
|
/**
|
|
887
890
|
* Get the batch queue for the given group or create it if it does not exist yet.
|
|
888
891
|
*
|
|
@@ -987,6 +990,24 @@ sap.ui.define([
|
|
|
987
990
|
return this.sServiceUrl;
|
|
988
991
|
};
|
|
989
992
|
|
|
993
|
+
/**
|
|
994
|
+
* Returns an unlocked copy of the given group lock if the corresponding group ID has submit
|
|
995
|
+
* mode "Auto" (or "Direct"); else returns a new group lock for "$auto" with the same owner.
|
|
996
|
+
*
|
|
997
|
+
* @param {sap.ui.model.odata.v4.lib._GroupLock} oGroupLock - The original
|
|
998
|
+
* @returns {sap.ui.model.odata.v4.lib._GroupLock}
|
|
999
|
+
* An unlocked copy w/ submit mode "Auto", see above
|
|
1000
|
+
*
|
|
1001
|
+
* @public
|
|
1002
|
+
*/
|
|
1003
|
+
_Requestor.prototype.getUnlockedAutoCopy = function (oGroupLock) {
|
|
1004
|
+
if (this.getGroupSubmitMode(oGroupLock.getGroupId()) !== "API") {
|
|
1005
|
+
return oGroupLock.getUnlockedCopy();
|
|
1006
|
+
}
|
|
1007
|
+
|
|
1008
|
+
return this.lockGroup("$auto", oGroupLock.getOwner());
|
|
1009
|
+
};
|
|
1010
|
+
|
|
990
1011
|
/**
|
|
991
1012
|
* Tells whether there are changes (that is, updates via PATCH or bound actions via POST) for
|
|
992
1013
|
* the given group ID and given entity.
|
|
@@ -1068,6 +1089,17 @@ sap.ui.define([
|
|
|
1068
1089
|
return false;
|
|
1069
1090
|
};
|
|
1070
1091
|
|
|
1092
|
+
/**
|
|
1093
|
+
* Returns <code>true</code> if a non-optimistic batch request was already sent.
|
|
1094
|
+
*
|
|
1095
|
+
* @returns {boolean} Whether a non-optimistic batch was already sent
|
|
1096
|
+
*
|
|
1097
|
+
* @public
|
|
1098
|
+
*/
|
|
1099
|
+
_Requestor.prototype.isBatchSent = function () {
|
|
1100
|
+
return this.bBatchSent;
|
|
1101
|
+
};
|
|
1102
|
+
|
|
1071
1103
|
/**
|
|
1072
1104
|
* Tells whether change sets are optional. For OData V4, this is true.
|
|
1073
1105
|
*
|
|
@@ -1237,7 +1269,6 @@ sap.ui.define([
|
|
|
1237
1269
|
});
|
|
1238
1270
|
}
|
|
1239
1271
|
|
|
1240
|
-
this.bFirstBatchSent = true;
|
|
1241
1272
|
delete this.mBatchQueue[sGroupId];
|
|
1242
1273
|
onSubmit(aRequests);
|
|
1243
1274
|
bHasChanges = this.cleanUpChangeSets(aRequests);
|
|
@@ -1245,6 +1276,7 @@ sap.ui.define([
|
|
|
1245
1276
|
return Promise.resolve();
|
|
1246
1277
|
}
|
|
1247
1278
|
|
|
1279
|
+
this.bBatchSent = true;
|
|
1248
1280
|
aRequests = this.mergeGetRequests(aRequests);
|
|
1249
1281
|
this.batchRequestSent(sGroupId, aRequests, bHasChanges);
|
|
1250
1282
|
return this.sendBatch(aRequests, sGroupId)
|
|
@@ -1317,25 +1349,25 @@ sap.ui.define([
|
|
|
1317
1349
|
/**
|
|
1318
1350
|
* This function has two tasks:
|
|
1319
1351
|
* <ul>
|
|
1320
|
-
* <li>We are in the 1st app start, no optimistic batch payload stored so far. If
|
|
1321
|
-
*
|
|
1352
|
+
* <li>We are in the 1st app start, no optimistic batch payload stored so far. If optimistic
|
|
1353
|
+
* batch handling is enabled via
|
|
1322
1354
|
* {@link sap.ui.model.odata.v4.ODataModel#setOptimisticBatchEnabler}, this function
|
|
1323
1355
|
* stores the current batch requests in cache.
|
|
1324
|
-
* <li>If an optimistic batch was already sent, it returns its result.
|
|
1356
|
+
* <li>If an optimistic batch was already sent, it returns its result promise.
|
|
1325
1357
|
* </ul>
|
|
1326
1358
|
*
|
|
1327
|
-
* @param {object[]} aRequests The current batch
|
|
1359
|
+
* @param {object[]} aRequests The requests of the current batch
|
|
1328
1360
|
* @param {string} sGroupId The group ID
|
|
1329
1361
|
* @returns {Promise|undefined}
|
|
1330
|
-
* The optimistic batch result or <code>undefined</code> if the
|
|
1362
|
+
* The optimistic batch result or <code>undefined</code> if the batch should be sent
|
|
1331
1363
|
* normally. <code>undefined</code> can have the following reasons:
|
|
1332
1364
|
* <ul>
|
|
1333
1365
|
* <li>We are in the 1st app start, no optimistic batch payload stored so far, or
|
|
1334
1366
|
* <li>the optimistic batch was sent, but its payload did not match to the current one, or
|
|
1335
1367
|
* <li>we are not in the first #sendBatch call within the _Requestors lifecycle, or
|
|
1336
1368
|
* <li>#sendBatch was called before first batch payload could be read via CacheManager or
|
|
1337
|
-
* <li>we are in the first #sendBatch but the
|
|
1338
|
-
*
|
|
1369
|
+
* <li>we are in the first #sendBatch but the batch is modifying, means contains others than
|
|
1370
|
+
* GET requests.
|
|
1339
1371
|
* </ul>
|
|
1340
1372
|
*
|
|
1341
1373
|
* @private
|
|
@@ -1347,7 +1379,7 @@ sap.ui.define([
|
|
|
1347
1379
|
fnOptimisticBatchEnabler,
|
|
1348
1380
|
that = this;
|
|
1349
1381
|
|
|
1350
|
-
if (!
|
|
1382
|
+
if (!oOptimisticBatch) {
|
|
1351
1383
|
return;
|
|
1352
1384
|
}
|
|
1353
1385
|
|
|
@@ -1356,11 +1388,11 @@ sap.ui.define([
|
|
|
1356
1388
|
if (oOptimisticBatch.result) { // n+1 app start, consume optimistic batch result
|
|
1357
1389
|
if (_Requestor.matchesOptimisticBatch(aRequests, sGroupId,
|
|
1358
1390
|
oOptimisticBatch.firstBatch.requests, oOptimisticBatch.firstBatch.groupId)) {
|
|
1359
|
-
Log.info("optimistic
|
|
1391
|
+
Log.info("optimistic batch: success, response consumed", sKey, sClassName);
|
|
1360
1392
|
return oOptimisticBatch.result;
|
|
1361
1393
|
}
|
|
1362
1394
|
CacheManager.del(sCachePrefix + sKey).catch(this.oModelInterface.getReporter());
|
|
1363
|
-
Log.warning("optimistic
|
|
1395
|
+
Log.warning("optimistic batch: mismatch, response skipped", sKey, sClassName);
|
|
1364
1396
|
}
|
|
1365
1397
|
|
|
1366
1398
|
fnOptimisticBatchEnabler = this.oModelInterface.getOptimisticBatchEnabler();
|
|
@@ -1369,7 +1401,7 @@ sap.ui.define([
|
|
|
1369
1401
|
return Array.isArray(oRequest) || oRequest.method !== "GET";
|
|
1370
1402
|
});
|
|
1371
1403
|
if (bIsModifyingBatch) {
|
|
1372
|
-
Log.warning("optimistic
|
|
1404
|
+
Log.warning("optimistic batch: modifying batch not supported", sKey, sClassName);
|
|
1373
1405
|
return;
|
|
1374
1406
|
}
|
|
1375
1407
|
|
|
@@ -1379,18 +1411,17 @@ sap.ui.define([
|
|
|
1379
1411
|
groupId : sGroupId,
|
|
1380
1412
|
requests : aRequests.map(function (oRequest) {
|
|
1381
1413
|
return {
|
|
1382
|
-
headers : oRequest.headers,
|
|
1383
|
-
method :
|
|
1414
|
+
headers : getHeadersWithoutCSRFToken(oRequest.headers),
|
|
1415
|
+
method : "GET",
|
|
1384
1416
|
url : oRequest.url
|
|
1385
1417
|
};
|
|
1386
1418
|
})
|
|
1387
1419
|
}).then(function () {
|
|
1388
|
-
Log.info("optimistic
|
|
1420
|
+
Log.info("optimistic batch: enabled, batch payload saved", sKey,
|
|
1389
1421
|
sClassName);
|
|
1390
1422
|
});
|
|
1391
|
-
} else {
|
|
1392
|
-
Log.info("optimistic$batch: disabled", sKey, sClassName);
|
|
1393
1423
|
}
|
|
1424
|
+
Log.info("optimistic batch: disabled", sKey, sClassName);
|
|
1394
1425
|
}).catch(that.oModelInterface.getReporter());
|
|
1395
1426
|
}
|
|
1396
1427
|
};
|
|
@@ -1787,7 +1818,7 @@ sap.ui.define([
|
|
|
1787
1818
|
};
|
|
1788
1819
|
|
|
1789
1820
|
/**
|
|
1790
|
-
* Checks whether a first batch from
|
|
1821
|
+
* Checks whether a first batch from an earlier app start was recorded and sends it immediately
|
|
1791
1822
|
* out as optimistic batch in order to have its response at the earliest point in time.
|
|
1792
1823
|
*/
|
|
1793
1824
|
_Requestor.prototype.sendOptimisticBatch = function () {
|
|
@@ -1798,15 +1829,15 @@ sap.ui.define([
|
|
|
1798
1829
|
var oOptimisticBatch = {key : sKey};
|
|
1799
1830
|
|
|
1800
1831
|
if (oFirstBatch) {
|
|
1801
|
-
if (that.
|
|
1802
|
-
Log.error("optimistic
|
|
1832
|
+
if (that.isBatchSent()) {
|
|
1833
|
+
Log.error("optimistic batch: #sendBatch called before optimistic batch "
|
|
1803
1834
|
+ "payload could be read", undefined, sClassName);
|
|
1804
1835
|
return;
|
|
1805
1836
|
}
|
|
1806
1837
|
oOptimisticBatch.firstBatch = oFirstBatch;
|
|
1807
1838
|
oOptimisticBatch.result
|
|
1808
1839
|
= that.sendBatch(oFirstBatch.requests, oFirstBatch.groupId);
|
|
1809
|
-
Log.info("optimistic
|
|
1840
|
+
Log.info("optimistic batch: sent ", sKey, sClassName);
|
|
1810
1841
|
}
|
|
1811
1842
|
that.oOptimisticBatch = oOptimisticBatch; // this has to be done after #sendBatch call
|
|
1812
1843
|
}).catch(this.oModelInterface.getReporter());
|
|
@@ -2009,6 +2040,23 @@ sap.ui.define([
|
|
|
2009
2040
|
});
|
|
2010
2041
|
};
|
|
2011
2042
|
|
|
2043
|
+
/**
|
|
2044
|
+
* Waits until a batch response has been received for the given group ID.
|
|
2045
|
+
*
|
|
2046
|
+
* @param {string} sGroupId
|
|
2047
|
+
* The group ID
|
|
2048
|
+
* @returns {sap.ui.base.SyncPromise}
|
|
2049
|
+
* A promise that resolves without a defined result when a batch response has been received
|
|
2050
|
+
* for the given group ID, no matter if the batch succeeded or failed
|
|
2051
|
+
*
|
|
2052
|
+
* @public
|
|
2053
|
+
* @see #batchResponseReceived
|
|
2054
|
+
*/
|
|
2055
|
+
_Requestor.prototype.waitForBatchResponseReceived = function (sGroupId) {
|
|
2056
|
+
// Note: this currently works only in case there is at least one change request already
|
|
2057
|
+
return this.mBatchQueue[sGroupId][0][0].$promise;
|
|
2058
|
+
};
|
|
2059
|
+
|
|
2012
2060
|
/**
|
|
2013
2061
|
* Waits for all currently running change requests for the given group ID.
|
|
2014
2062
|
*
|
|
@@ -2034,14 +2082,14 @@ sap.ui.define([
|
|
|
2034
2082
|
|
|
2035
2083
|
/**
|
|
2036
2084
|
* Checks whether the actual payload and group ID of a batch request matches to the optimistic
|
|
2037
|
-
*
|
|
2085
|
+
* batch payload and group ID.
|
|
2038
2086
|
*
|
|
2039
|
-
* @param {object[]} aActualRequests The requests of the actual
|
|
2040
|
-
* @param {string} sActualGroupId The group ID of the actual
|
|
2041
|
-
* @param {object[]} aOptimisticRequests The requests of the optimistic
|
|
2042
|
-
* @param {string} sOptimisticGroupId The group ID of the optimistic
|
|
2087
|
+
* @param {object[]} aActualRequests The requests of the actual batch
|
|
2088
|
+
* @param {string} sActualGroupId The group ID of the actual batch
|
|
2089
|
+
* @param {object[]} aOptimisticRequests The requests of the optimistic batch
|
|
2090
|
+
* @param {string} sOptimisticGroupId The group ID of the optimistic batch
|
|
2043
2091
|
* @returns {boolean}
|
|
2044
|
-
* Whether the actual
|
|
2092
|
+
* Whether the actual batch requests and group ID matches the optimistic one
|
|
2045
2093
|
*/
|
|
2046
2094
|
_Requestor.matchesOptimisticBatch = function (aActualRequests, sActualGroupId,
|
|
2047
2095
|
aOptimisticRequests, sOptimisticGroupId) {
|
|
@@ -2051,7 +2099,10 @@ sap.ui.define([
|
|
|
2051
2099
|
&& aActualRequests.every(function (oActual, i) {
|
|
2052
2100
|
// the payload is ignored because only GET requests are expected
|
|
2053
2101
|
return oActual.url === aOptimisticRequests[i].url
|
|
2054
|
-
&& _Helper.deepEqual(
|
|
2102
|
+
&& _Helper.deepEqual(
|
|
2103
|
+
getHeadersWithoutCSRFToken(oActual.headers),
|
|
2104
|
+
aOptimisticRequests[i].headers
|
|
2105
|
+
);
|
|
2055
2106
|
});
|
|
2056
2107
|
};
|
|
2057
2108
|
|
|
@@ -228,7 +228,7 @@ sap.ui.define([
|
|
|
228
228
|
*
|
|
229
229
|
* @extends sap.ui.model.Model
|
|
230
230
|
* @public
|
|
231
|
-
* @version 1.
|
|
231
|
+
* @version 1.101.0
|
|
232
232
|
*/
|
|
233
233
|
var ResourceModel = Model.extend("sap.ui.model.resource.ResourceModel", /** @lends sap.ui.model.resource.ResourceModel.prototype */ {
|
|
234
234
|
|
|
@@ -26,7 +26,7 @@ sap.ui.define([
|
|
|
26
26
|
* @extends sap.ui.model.SimpleType
|
|
27
27
|
*
|
|
28
28
|
* @author SAP SE
|
|
29
|
-
* @version 1.
|
|
29
|
+
* @version 1.101.0
|
|
30
30
|
*
|
|
31
31
|
* @public
|
|
32
32
|
* @param {object} [oFormatOptions] Formatting options. For a list of all available options, see {@link sap.ui.core.format.DateFormat.getDateInstance DateFormat}.
|
|
@@ -33,7 +33,7 @@ sap.ui.define([
|
|
|
33
33
|
* @extends sap.ui.model.CompositeType
|
|
34
34
|
*
|
|
35
35
|
* @author SAP SE
|
|
36
|
-
* @version 1.
|
|
36
|
+
* @version 1.101.0
|
|
37
37
|
*
|
|
38
38
|
* @public
|
|
39
39
|
* @param {object} [oFormatOptions] Formatting options. For a list of all available options, see {@link sap.ui.core.format.DateFormat.getDateInstance DateFormat}.
|
|
@@ -19,7 +19,7 @@ sap.ui.define(['./Date', 'sap/ui/core/format/DateFormat'],
|
|
|
19
19
|
* @extends sap.ui.model.type.Date
|
|
20
20
|
*
|
|
21
21
|
* @author SAP SE
|
|
22
|
-
* @version 1.
|
|
22
|
+
* @version 1.101.0
|
|
23
23
|
*
|
|
24
24
|
* @public
|
|
25
25
|
* @param {object} [oFormatOptions] Formatting options. For a list of all available options, see {@link sap.ui.core.format.DateFormat.getDateTimeInstance DateFormat}.
|
|
@@ -19,7 +19,7 @@ sap.ui.define(['./DateInterval', 'sap/ui/core/format/DateFormat'],
|
|
|
19
19
|
* @extends sap.ui.model.type.DateInterval
|
|
20
20
|
*
|
|
21
21
|
* @author SAP SE
|
|
22
|
-
* @version 1.
|
|
22
|
+
* @version 1.101.0
|
|
23
23
|
*
|
|
24
24
|
* @public
|
|
25
25
|
* @param {object} [oFormatOptions] Formatting options. For a list of all available options, see {@link sap.ui.core.format.DateFormat.getDateTimeInstance DateFormat}.
|
|
@@ -24,7 +24,7 @@ sap.ui.define([
|
|
|
24
24
|
* @extends sap.ui.model.SimpleType
|
|
25
25
|
*
|
|
26
26
|
* @author SAP SE
|
|
27
|
-
* @version 1.
|
|
27
|
+
* @version 1.101.0
|
|
28
28
|
*
|
|
29
29
|
* @public
|
|
30
30
|
* @param {object} [oFormatOptions] formatting options. Supports the same options as {@link sap.ui.core.format.FileSizeFormat.getInstance FileSizeFormat.getInstance}
|
|
@@ -26,7 +26,7 @@ sap.ui.define([
|
|
|
26
26
|
* @extends sap.ui.model.SimpleType
|
|
27
27
|
*
|
|
28
28
|
* @author SAP SE
|
|
29
|
-
* @version 1.
|
|
29
|
+
* @version 1.101.0
|
|
30
30
|
*
|
|
31
31
|
* @public
|
|
32
32
|
* @param {object} [oFormatOptions] Formatting options. For a list of all available options, see {@link sap.ui.core.format.NumberFormat NumberFormat}.
|
|
@@ -26,7 +26,7 @@ sap.ui.define([
|
|
|
26
26
|
* @extends sap.ui.model.SimpleType
|
|
27
27
|
*
|
|
28
28
|
* @author SAP SE
|
|
29
|
-
* @version 1.
|
|
29
|
+
* @version 1.101.0
|
|
30
30
|
*
|
|
31
31
|
* @public
|
|
32
32
|
* @param {object} [oFormatOptions] Formatting options. For a list of all available options, see {@link sap.ui.core.format.NumberFormat NumberFormat}.
|
|
@@ -19,7 +19,7 @@ sap.ui.define(['./Date', 'sap/ui/core/format/DateFormat'],
|
|
|
19
19
|
* @extends sap.ui.model.type.Date
|
|
20
20
|
*
|
|
21
21
|
* @author SAP SE
|
|
22
|
-
* @version 1.
|
|
22
|
+
* @version 1.101.0
|
|
23
23
|
*
|
|
24
24
|
* @public
|
|
25
25
|
* @param {object} [oFormatOptions] Formatting options. For a list of all available options, see {@link sap.ui.core.format.DateFormat.getTimeInstance DateFormat}.
|
|
@@ -19,7 +19,7 @@ sap.ui.define(['./DateInterval', 'sap/ui/core/format/DateFormat'],
|
|
|
19
19
|
* @extends sap.ui.model.type.DateInterval
|
|
20
20
|
*
|
|
21
21
|
* @author SAP SE
|
|
22
|
-
* @version 1.
|
|
22
|
+
* @version 1.101.0
|
|
23
23
|
*
|
|
24
24
|
* @public
|
|
25
25
|
* @param {object} [oFormatOptions] Formatting options. For a list of all available options, see {@link sap.ui.core.format.DateFormat.getTimeInstance DateFormat}.
|
package/src/sap/ui/test/Opa5.js
CHANGED
|
@@ -25,7 +25,9 @@ sap.ui.define([
|
|
|
25
25
|
'sap/ui/dom/includeStylesheet',
|
|
26
26
|
'sap/ui/thirdparty/jquery',
|
|
27
27
|
'sap/ui/test/_OpaUriParameterParser',
|
|
28
|
-
|
|
28
|
+
'sap/ui/test/_ValidationParameters',
|
|
29
|
+
'sap/base/util/extend',
|
|
30
|
+
'sap/base/util/isPlainObject'
|
|
29
31
|
],
|
|
30
32
|
function (Opa,
|
|
31
33
|
OpaPlugin,
|
|
@@ -47,7 +49,9 @@ sap.ui.define([
|
|
|
47
49
|
includeStylesheet,
|
|
48
50
|
$,
|
|
49
51
|
_OpaUriParameterParser,
|
|
50
|
-
_ValidationParameters
|
|
52
|
+
_ValidationParameters,
|
|
53
|
+
extend,
|
|
54
|
+
isPlainObject) {
|
|
51
55
|
"use strict";
|
|
52
56
|
|
|
53
57
|
var oLogger = _OpaLogger.getLogger("sap.ui.test.Opa5"),
|
|
@@ -1390,9 +1394,9 @@ sap.ui.define([
|
|
|
1390
1394
|
function _getPathToExpansion(options) {
|
|
1391
1395
|
var aPath;
|
|
1392
1396
|
["ancestor", "descendant", "sibling"].forEach(function (sMatcher) {
|
|
1393
|
-
if (options[sMatcher] &&
|
|
1397
|
+
if (options[sMatcher] && isPlainObject(options[sMatcher])) {
|
|
1394
1398
|
aPath = [sMatcher];
|
|
1395
|
-
} else if (options.matchers && options.matchers[sMatcher] &&
|
|
1399
|
+
} else if (options.matchers && options.matchers[sMatcher] && isPlainObject(options.matchers[sMatcher])) {
|
|
1396
1400
|
aPath = ["matchers", sMatcher];
|
|
1397
1401
|
}
|
|
1398
1402
|
});
|
|
@@ -1416,7 +1420,7 @@ sap.ui.define([
|
|
|
1416
1420
|
// return a new object ("options" remains unchanged)
|
|
1417
1421
|
function _substituteExpansion(options, aPath, oControl) {
|
|
1418
1422
|
if (aPath) {
|
|
1419
|
-
var oResult =
|
|
1423
|
+
var oResult = extend({}, options);
|
|
1420
1424
|
var oPath = oResult;
|
|
1421
1425
|
var i = 0;
|
|
1422
1426
|
while (i < aPath.length - 1) {
|
|
@@ -803,7 +803,8 @@ sap.ui.define([
|
|
|
803
803
|
|
|
804
804
|
/**
|
|
805
805
|
* @returns {boolean|undefined}
|
|
806
|
-
* <code>true</code> if optimistic
|
|
806
|
+
* <code>true</code> if optimistic batch should be used, <code>undefined</code> if not
|
|
807
|
+
* specified.
|
|
807
808
|
*/
|
|
808
809
|
isOptimisticBatch : function () {
|
|
809
810
|
return bOptimisticBatch;
|
|
@@ -15,10 +15,19 @@ if (!window.QUnit || !window.QUnit.test) {
|
|
|
15
15
|
|
|
16
16
|
// put qunit-coverage last so library files don't get measured
|
|
17
17
|
sap.ui.define([
|
|
18
|
-
"jquery.sap.global",
|
|
19
|
-
"sap/
|
|
20
|
-
"sap/
|
|
21
|
-
"sap/ui/
|
|
18
|
+
"jquery.sap.global",
|
|
19
|
+
"sap/base/Log",
|
|
20
|
+
"sap/base/util/ObjectPath",
|
|
21
|
+
"sap/ui/test/opaQunit",
|
|
22
|
+
"sap/ui/test/Opa5",
|
|
23
|
+
"sap/ui/test/gherkin/GherkinTestGenerator",
|
|
24
|
+
"sap/ui/test/gherkin/dataTableUtils",
|
|
25
|
+
"sap/ui/test/gherkin/StepDefinitions",
|
|
26
|
+
"sap/ui/test/launchers/componentLauncher",
|
|
27
|
+
"sap/ui/test/launchers/iFrameLauncher",
|
|
28
|
+
"sap/ui/qunit/qunit-css",
|
|
29
|
+
"sap/ui/qunit/qunit-junit",
|
|
30
|
+
"sap/ui/qunit/qunit-coverage"
|
|
22
31
|
], function($, Log, ObjectPath, opaTest, Opa5, GherkinTestGenerator, dataTableUtils, StepDefinitions, componentLauncher,
|
|
23
32
|
iFrameLauncher) {
|
|
24
33
|
"use strict";
|
|
@@ -31,7 +40,7 @@ sap.ui.define([
|
|
|
31
40
|
});
|
|
32
41
|
|
|
33
42
|
QUnit.done(function() {
|
|
34
|
-
if (
|
|
43
|
+
if (new URLSearchParams(window.location.search).has("closeFrame")) {
|
|
35
44
|
Opa5.emptyQueue();
|
|
36
45
|
}
|
|
37
46
|
});
|
|
@@ -5,23 +5,24 @@
|
|
|
5
5
|
*/
|
|
6
6
|
/*global QUnit */
|
|
7
7
|
sap.ui.define([
|
|
8
|
-
'sap/
|
|
8
|
+
'sap/base/util/each',
|
|
9
9
|
'sap/ui/test/Opa',
|
|
10
10
|
'sap/ui/test/Opa5',
|
|
11
|
-
|
|
12
|
-
'sap/ui/
|
|
13
|
-
], function(
|
|
11
|
+
'sap/ui/test/qunitPause',
|
|
12
|
+
'sap/ui/thirdparty/jquery'
|
|
13
|
+
], function(each, Opa, Opa5, QUnitPause, jQuery) {
|
|
14
14
|
"use strict";
|
|
15
15
|
|
|
16
16
|
QUnitPause.setupAfterQUnit();
|
|
17
17
|
|
|
18
18
|
QUnit.begin(function (oDetails) {
|
|
19
19
|
// add ui5 version in the user agent string bar
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
var oQUnitUserAgent = document.getElementById("#qunit-userAgent");
|
|
21
|
+
if (sap && sap.ui && oQUnitUserAgent) {
|
|
22
|
+
oQUnitUserAgent.innerText += "; UI5: " + sap.ui.version;
|
|
22
23
|
}
|
|
23
24
|
|
|
24
|
-
Opa._usageReport.begin({uri:
|
|
25
|
+
Opa._usageReport.begin({uri: window.location.href, totalTests: oDetails.totalTests});
|
|
25
26
|
});
|
|
26
27
|
|
|
27
28
|
QUnit.moduleStart(function (oDetails) {
|
|
@@ -120,10 +121,10 @@ sap.ui.define([
|
|
|
120
121
|
QUnitPause.emitPause();
|
|
121
122
|
}
|
|
122
123
|
|
|
123
|
-
var oPauseDeferred =
|
|
124
|
+
var oPauseDeferred = jQuery.Deferred();
|
|
124
125
|
QUnitPause.onResume(function () {
|
|
125
126
|
// let OPA finish before QUnit starts executing the next test
|
|
126
|
-
// call
|
|
127
|
+
// call fnDone only if QUnit did not timeout
|
|
127
128
|
if (!oOptions.qunitTimeout) {
|
|
128
129
|
setTimeout(fnDone, 0);
|
|
129
130
|
}
|
|
@@ -284,7 +285,7 @@ sap.ui.define([
|
|
|
284
285
|
var oParams = oEvent.getParameters();
|
|
285
286
|
if (oParams.extension.getAssertions) {
|
|
286
287
|
var oAssertions = oParams.extension.getAssertions();
|
|
287
|
-
|
|
288
|
+
each(oAssertions, function(sName,fnAssertion) {
|
|
288
289
|
QUnit.assert[sName] = function() {
|
|
289
290
|
var qunitThis = this;
|
|
290
291
|
// call the assertion in the app window
|
package/src/ui5loader.js
CHANGED
|
@@ -1089,8 +1089,10 @@
|
|
|
1089
1089
|
* When loading modules via script tag, only the onload handler knows the relationship between executed sap.ui.define calls and
|
|
1090
1090
|
* module name. It then resolves the pending modules in the queue. Only one entry can get the name of the module
|
|
1091
1091
|
* if there are more entries, then this is an error
|
|
1092
|
+
*
|
|
1093
|
+
* @param {boolean} [nested] Whether this is a nested queue used during sync execution of a module
|
|
1092
1094
|
*/
|
|
1093
|
-
function ModuleDefinitionQueue() {
|
|
1095
|
+
function ModuleDefinitionQueue(nested) {
|
|
1094
1096
|
var aQueue = [],
|
|
1095
1097
|
iRun = 0,
|
|
1096
1098
|
vTimer;
|
|
@@ -1101,16 +1103,18 @@
|
|
|
1101
1103
|
+ (document.currentScript ? " from " + document.currentScript.src : "")
|
|
1102
1104
|
+ " to define queue #" + iRun);
|
|
1103
1105
|
}
|
|
1106
|
+
|
|
1107
|
+
var sModule = document.currentScript && document.currentScript.getAttribute('data-sap-ui-module');
|
|
1104
1108
|
aQueue.push({
|
|
1105
1109
|
name: name,
|
|
1106
1110
|
deps: deps,
|
|
1107
1111
|
factory: factory,
|
|
1108
1112
|
_export: _export,
|
|
1109
|
-
guess:
|
|
1113
|
+
guess: sModule
|
|
1110
1114
|
});
|
|
1111
1115
|
|
|
1112
1116
|
// trigger queue processing via a timer in case the currently executing script is not managed by the loader
|
|
1113
|
-
if ( !vTimer ) {
|
|
1117
|
+
if ( !vTimer && !nested && sModule == null ) {
|
|
1114
1118
|
vTimer = setTimeout(this.process.bind(this, null, "timer"));
|
|
1115
1119
|
}
|
|
1116
1120
|
};
|
|
@@ -1586,7 +1590,7 @@
|
|
|
1586
1590
|
try {
|
|
1587
1591
|
|
|
1588
1592
|
bForceSyncDefines = !bAsync;
|
|
1589
|
-
queue = new ModuleDefinitionQueue();
|
|
1593
|
+
queue = new ModuleDefinitionQueue(true);
|
|
1590
1594
|
|
|
1591
1595
|
if ( bLoggable ) {
|
|
1592
1596
|
if ( typeof oModule.data === "string" ) {
|