@sapui5/sap.suite.ui.generic.template 1.120.48 → 1.120.49
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/package.json +1 -1
- package/src/sap/suite/ui/generic/template/.library +1 -1
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/Canvas/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/ListReport/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/ObjectPage/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/QuickCreate/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/QuickView/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/lib/AppComponent.js +3 -1
- package/src/sap/suite/ui/generic/template/lib/Application.js +15 -2
- package/src/sap/suite/ui/generic/template/lib/CommonEventHandlers.js +20 -2
- package/src/sap/suite/ui/generic/template/lib/CommonUtils.js +6 -1
- package/src/sap/suite/ui/generic/template/lib/navigation/NavigationController.js +1 -1
- package/src/sap/suite/ui/generic/template/library.js +1 -1
package/package.json
CHANGED
|
@@ -631,6 +631,7 @@ sap.ui.define([
|
|
|
631
631
|
|
|
632
632
|
function restore(){
|
|
633
633
|
oTemplateContract.oBusyHelper.setBusyReason("exiting", false);
|
|
634
|
+
oTemplateContract.oApplicationProxy.resetExternalNavigation();
|
|
634
635
|
for (var sComponentId in oTemplateContract.componentRegistry){
|
|
635
636
|
var oRegistryEntry = oTemplateContract.componentRegistry[sComponentId];
|
|
636
637
|
if (oRegistryEntry.methods.onRestore) {
|
|
@@ -926,6 +927,7 @@ sap.ui.define([
|
|
|
926
927
|
var fnNormalizePagesMapToArray = testableHelper.testable(fnNormalizePagesMapToArray, "fnNormalizePagesMapToArray");
|
|
927
928
|
getConfig = testableHelper.testable(getConfig, "getConfig");
|
|
928
929
|
testableHelper.testable(setLeaveAppPromise, "AppComponent_setLeaveAppPromise");
|
|
930
|
+
testableHelper.testable(restore, "AppComponent_restore");
|
|
929
931
|
/* eslint-enable */
|
|
930
932
|
|
|
931
933
|
return oMethods;
|
|
@@ -939,7 +941,7 @@ sap.ui.define([
|
|
|
939
941
|
* @extends sap.ui.core.UIComponent
|
|
940
942
|
* @abstract
|
|
941
943
|
* @author SAP SE
|
|
942
|
-
* @version 1.120.
|
|
944
|
+
* @version 1.120.49
|
|
943
945
|
* @name sap.suite.ui.generic.template.lib.AppComponent
|
|
944
946
|
*/
|
|
945
947
|
return UIComponent.extend("sap.suite.ui.generic.template.lib.AppComponent", {
|
|
@@ -84,6 +84,11 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
84
84
|
*/
|
|
85
85
|
function getMethods(oTemplateContract) {
|
|
86
86
|
|
|
87
|
+
// Set on first fnNavigateExternal call; blocks re-entry until reset. NavigationHandler.navigate() calls fnOnError
|
|
88
|
+
// on all failure paths and does not call it on the success path (app is leaving). The two valid reset points are
|
|
89
|
+
// therefore fnOnErrorWrapper (navigation failed) and AppComponent.restore() (FLP re-activated this app).
|
|
90
|
+
var bExternalNavigationTriggered = false;
|
|
91
|
+
|
|
87
92
|
var oFocusHelper = new FocusHelper(oTemplateContract);
|
|
88
93
|
var oContextBookkeeping = new ContextBookkeeping(oTemplateContract);
|
|
89
94
|
var mEntitySetToETagInfo = Object.create(null); // maps the name of the entity sets which have been already checked for eTag
|
|
@@ -673,8 +678,13 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
673
678
|
if (oCurrentNavigationHandler === GHOSTNAVIGATIONHANDLER){
|
|
674
679
|
return;
|
|
675
680
|
}
|
|
681
|
+
if (bExternalNavigationTriggered){
|
|
682
|
+
return;
|
|
683
|
+
}
|
|
684
|
+
bExternalNavigationTriggered = true;
|
|
676
685
|
oTemplateContract.oNavigationControllerProxy.leave();
|
|
677
|
-
var fnOnErrorWrapper = function(){
|
|
686
|
+
var fnOnErrorWrapper = function () {
|
|
687
|
+
bExternalNavigationTriggered = false;
|
|
678
688
|
oFocusHelper.setNextFocus(Function.prototype); // Do not change focus in case exiting the application fails
|
|
679
689
|
oTemplateContract.oBusyHelper.setBusyReason("exiting", false); // in error case we are not navigating away
|
|
680
690
|
if (fnOnError){
|
|
@@ -835,7 +845,10 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
835
845
|
removeTransientMessages: fnRemoveTransientMessages,
|
|
836
846
|
getTransientMessages: getTransientMessages,
|
|
837
847
|
setNextFocus: oFocusHelper.setNextFocus,
|
|
838
|
-
setStates: setStates
|
|
848
|
+
setStates: setStates,
|
|
849
|
+
resetExternalNavigation: function() {
|
|
850
|
+
bExternalNavigationTriggered = false;
|
|
851
|
+
}
|
|
839
852
|
};
|
|
840
853
|
|
|
841
854
|
return {
|
|
@@ -712,7 +712,16 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
712
712
|
}
|
|
713
713
|
|
|
714
714
|
// null object has to be passed as the fourth argument (i.e. for oInnerAppData) to the navigate method as an indicator that the state should not be overwritten
|
|
715
|
-
|
|
715
|
+
// Explace outbounds must bypass fnNavigateExternal to avoid setting the app busy and consuming the re-entry guard.
|
|
716
|
+
// getNavigationHandler() returns a ghost stub (no .navigate) when ghostapp=true — guard before calling.
|
|
717
|
+
if (oOutbound.parameters && oOutbound.parameters["sap-ushell-navmode"] === "explace") {
|
|
718
|
+
var oNavHandler = oServices.oApplication.getNavigationHandler();
|
|
719
|
+
if (oNavHandler.navigate) {
|
|
720
|
+
oNavHandler.navigate(oOutbound.semanticObject, oOutbound.action, oSelectionVariant.toJSONString(), null, oCommonUtils.handleError, null, "explace");
|
|
721
|
+
}
|
|
722
|
+
} else {
|
|
723
|
+
oServices.oApplication.navigateExternal(oOutbound.semanticObject, oOutbound.action, oSelectionVariant.toJSONString(), null, oCommonUtils.handleError);
|
|
724
|
+
}
|
|
716
725
|
}
|
|
717
726
|
|
|
718
727
|
function fnNavigateIntentSmartLink(oOutbound, oEventSource) {
|
|
@@ -2498,7 +2507,16 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
2498
2507
|
var oSelectionVariant = fnBuildSelectionVariantForNavigation(oOutbound, [], oContext);
|
|
2499
2508
|
oController.adaptNavigationParameterExtension(oSelectionVariant, oOutbound);
|
|
2500
2509
|
oCommonUtils.setComponentRefreshBehaviour(oOutbound);
|
|
2501
|
-
|
|
2510
|
+
// Explace outbounds must bypass fnNavigateExternal to avoid setting the app busy and consuming the re-entry guard.
|
|
2511
|
+
// getNavigationHandler() returns a ghost stub (no .navigate) when ghostapp=true — guard before calling.
|
|
2512
|
+
if (oOutbound.parameters && oOutbound.parameters["sap-ushell-navmode"] === "explace") {
|
|
2513
|
+
var oNavHandler = oServices.oApplication.getNavigationHandler();
|
|
2514
|
+
if (oNavHandler.navigate) {
|
|
2515
|
+
oNavHandler.navigate(oOutbound.semanticObject, oOutbound.action, oSelectionVariant.toJSONString(), null, oCommonUtils.handleError, null, "explace");
|
|
2516
|
+
}
|
|
2517
|
+
} else {
|
|
2518
|
+
oServices.oApplication.navigateExternal(oOutbound.semanticObject, oOutbound.action, oSelectionVariant.toJSONString(), null, oCommonUtils.handleError);
|
|
2519
|
+
}
|
|
2502
2520
|
}
|
|
2503
2521
|
|
|
2504
2522
|
function onSmartFieldInitialise(oEvent,sViewId){
|
|
@@ -811,7 +811,8 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
811
811
|
// oResponse is never going to have the value for oDatafield.name in the encoded format, hence the transformation into encodedURI.
|
|
812
812
|
// It may happen that the oResponse[oDatafield.name] contains some special characters (for ex: space) but in a decoded manner.
|
|
813
813
|
// but the route for Context Navigation requires the route string in the encoded way.
|
|
814
|
-
var
|
|
814
|
+
var sFieldValueFromODataResponse = oResponse[oDatafield.name];
|
|
815
|
+
var sEncodedFieldValueFromODataResponse = encodeURIComponent(sFieldValueFromODataResponse);
|
|
815
816
|
switch (oDatafield.type) {
|
|
816
817
|
case "Edm.Guid":
|
|
817
818
|
if (oResponse.DraftAdministrativeData && oResponse.DraftAdministrativeData.DraftIsCreatedByMe) {
|
|
@@ -838,6 +839,10 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
838
839
|
var sFormattedvalue = ODataUtils.formatValue(sEncodedFieldValueFromODataResponse, oDatafield.type);
|
|
839
840
|
sRoute += sKeySeparator + oDatafield.name + "=" + sFormattedvalue;
|
|
840
841
|
break;
|
|
842
|
+
case "Edm.DateTime":
|
|
843
|
+
var sFormattedvalue = ODataUtils.formatValue(sFieldValueFromODataResponse, oDatafield.type);
|
|
844
|
+
sRoute += sKeySeparator + oDatafield.name + "=" + encodeURIComponent(sFormattedvalue);
|
|
845
|
+
break;
|
|
841
846
|
default:
|
|
842
847
|
if (typeof sEncodedFieldValueFromODataResponse === "string") {
|
|
843
848
|
sRoute += sKeySeparator + oDatafield.name + "=" + "'" + sEncodedFieldValueFromODataResponse + "'";
|
|
@@ -3102,7 +3102,7 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
3102
3102
|
* @param {sap.suite.ui.generic.template.lib.AppComponent} oAppComponent The AppComponent instance
|
|
3103
3103
|
* @public
|
|
3104
3104
|
* @extends sap.ui.base.Object
|
|
3105
|
-
* @version 1.120.
|
|
3105
|
+
* @version 1.120.49
|
|
3106
3106
|
* @since 1.30.0
|
|
3107
3107
|
* @alias sap.suite.ui.generic.template.lib.NavigationController
|
|
3108
3108
|
*/
|