@sapui5/sap.suite.ui.generic.template 1.148.9 → 1.148.11
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/genericUtilities/controlStateWrapperFactory/SmartTableChartCommon.js +7 -0
- package/src/sap/suite/ui/generic/template/lib/AppComponent.js +1 -1
- package/src/sap/suite/ui/generic/template/lib/Application.js +13 -0
- package/src/sap/suite/ui/generic/template/lib/CommonEventHandlers.js +25 -5
- package/src/sap/suite/ui/generic/template/lib/CommonUtils.js +4 -4
- package/src/sap/suite/ui/generic/template/lib/insights/InsightsCardHelper.js +24 -4
- package/src/sap/suite/ui/generic/template/lib/navigation/NavigationController.js +12 -3
- package/src/sap/suite/ui/generic/template/library.js +1 -1
package/package.json
CHANGED
|
@@ -156,6 +156,13 @@ sap.ui.define([
|
|
|
156
156
|
oState.variantId = oState.sVariantId;
|
|
157
157
|
}
|
|
158
158
|
|
|
159
|
+
// Compare current passed and control states. If states are same, setting state make no change, but trigger table refresh.
|
|
160
|
+
// For performance reason we compare object stringified versions. Object key order should not change as it only get applied at runtime.
|
|
161
|
+
var oControlState = bVariantManagementActive ? oVariantManagementStateWrapper.getState() : oSmartControlStateWrapper.getState();
|
|
162
|
+
if (JSON.stringify(oState) === JSON.stringify(oControlState)) {
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
165
|
+
|
|
159
166
|
if (bVariantManagementActive) {
|
|
160
167
|
// In case VariantManagement is configured
|
|
161
168
|
oVariantManagementStateWrapper.setState(oState);
|
|
@@ -961,7 +961,7 @@ sap.ui.define([
|
|
|
961
961
|
* @public
|
|
962
962
|
* @extends sap.ui.core.UIComponent
|
|
963
963
|
* @author SAP SE
|
|
964
|
-
* @version 1.148.
|
|
964
|
+
* @version 1.148.11
|
|
965
965
|
* @name sap.suite.ui.generic.template.lib.AppComponent
|
|
966
966
|
*/
|
|
967
967
|
var oAppComponent = UIComponent.extend("sap.suite.ui.generic.template.lib.AppComponent", {
|
|
@@ -810,6 +810,18 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
810
810
|
return oTemplateContract.oNavigationControllerProxy.preloadComponent(sRouteName);
|
|
811
811
|
}
|
|
812
812
|
|
|
813
|
+
// Returns true when a navigation call will open in a new tab rather than replacing the current app.
|
|
814
|
+
// sap-ushell-navmode (manifest-level) takes priority; sap-ushell-next-navmode (FLP startup parameter,
|
|
815
|
+
// system-level) is the fallback — mirroring how NavigationHandler itself determines explace.
|
|
816
|
+
function fnIsExplaceNavigation(oOutboundParameters) {
|
|
817
|
+
if (oOutboundParameters && oOutboundParameters["sap-ushell-navmode"] === "explace") {
|
|
818
|
+
return true;
|
|
819
|
+
}
|
|
820
|
+
var oComponentData = oTemplateContract.oAppComponent.getComponentData && oTemplateContract.oAppComponent.getComponentData();
|
|
821
|
+
var oStartupParams = oComponentData && oComponentData.startupParameters;
|
|
822
|
+
return !!(oStartupParams && oStartupParams["sap-ushell-next-navmode"] && oStartupParams["sap-ushell-next-navmode"][0] === "explace");
|
|
823
|
+
}
|
|
824
|
+
|
|
813
825
|
oTemplateContract.oApplicationProxy = { // inject own api for AppComponent into the Template Contract. Other classes (NavigationController, BusyHelper) will call these functions accordingly.
|
|
814
826
|
createDraftSiblingPromise: oContextBookkeeping.createDraftSiblingPromise,
|
|
815
827
|
getDraftSiblingPromise: oContextBookkeeping.getDraftSiblingPromise,
|
|
@@ -916,6 +928,7 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
916
928
|
mustRequireRequestsCanonical: mustRequireRequestsCanonical,
|
|
917
929
|
getNavigationHandler: getNavigationHandler,
|
|
918
930
|
navigateExternal: fnNavigateExternal,
|
|
931
|
+
isExplaceNavigation: fnIsExplaceNavigation,
|
|
919
932
|
getStatePreservationMode: getStatePreservationMode,
|
|
920
933
|
setObjectInEditMode: fnSetObjectInEditMode,
|
|
921
934
|
getObjectInEditMode: fnGetObjectInEditMode,
|
|
@@ -722,7 +722,7 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
722
722
|
// 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
|
|
723
723
|
// Explace outbounds must bypass fnNavigateExternal to avoid setting the app busy and consuming the re-entry guard.
|
|
724
724
|
// getNavigationHandler() returns a ghost stub (no .navigate) when ghostapp=true — guard before calling.
|
|
725
|
-
if (
|
|
725
|
+
if (oServices.oApplication.isExplaceNavigation(oOutbound.parameters)) {
|
|
726
726
|
var oNavHandler = oServices.oApplication.getNavigationHandler();
|
|
727
727
|
if (oNavHandler.navigate) {
|
|
728
728
|
oNavHandler.navigate(oOutbound.semanticObject, oOutbound.action, oSelectionVariant.toJSONString(), null, oCommonUtils.handleError, null, "explace");
|
|
@@ -742,7 +742,15 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
742
742
|
oCommonUtils.removePropertiesFromNavigationContext(oSelectionVariant, oEventSource);
|
|
743
743
|
oController.adaptNavigationParameterExtension(oSelectionVariant, oObjectInfo);
|
|
744
744
|
oCommonUtils.setComponentRefreshBehaviour(oOutbound);
|
|
745
|
-
|
|
745
|
+
// SmartLink outbounds have no manifest parameters so sap-ushell-navmode is never set.
|
|
746
|
+
// System-level sap-ushell-next-navmode can still force a new tab — bypass the re-entry guard in that case.
|
|
747
|
+
if (oServices.oApplication.isExplaceNavigation()) {
|
|
748
|
+
if (oNavigationHandler.navigate) {
|
|
749
|
+
oNavigationHandler.navigate(oOutbound.semanticObject, oOutbound.action, oSelectionVariant.toJSONString(), null, oCommonUtils.handleError, null, "explace");
|
|
750
|
+
}
|
|
751
|
+
} else {
|
|
752
|
+
oServices.oApplication.navigateExternal(oOutbound.semanticObject, oOutbound.action, oSelectionVariant.toJSONString(), null, oCommonUtils.handleError);
|
|
753
|
+
}
|
|
746
754
|
}
|
|
747
755
|
|
|
748
756
|
function fnHideTitleArea(oSmLiContent,aContactTitleArea) {
|
|
@@ -2731,7 +2739,7 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
2731
2739
|
oCommonUtils.setComponentRefreshBehaviour(oOutbound);
|
|
2732
2740
|
// Explace outbounds must bypass fnNavigateExternal to avoid setting the app busy and consuming the re-entry guard.
|
|
2733
2741
|
// getNavigationHandler() returns a ghost stub (no .navigate) when ghostapp=true — guard before calling.
|
|
2734
|
-
if (
|
|
2742
|
+
if (oServices.oApplication.isExplaceNavigation(oOutbound.parameters)) {
|
|
2735
2743
|
var oNavHandler = oServices.oApplication.getNavigationHandler();
|
|
2736
2744
|
if (oNavHandler.navigate) {
|
|
2737
2745
|
oNavHandler.navigate(oOutbound.semanticObject, oOutbound.action, oSelectionVariant.toJSONString(), null, oCommonUtils.handleError, null, "explace");
|
|
@@ -2813,7 +2821,17 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
2813
2821
|
* @param {*} aNavRestriction - list of 1:n navigation properties
|
|
2814
2822
|
*/
|
|
2815
2823
|
function modifyDataSourceUrl(oExportEvent, aNavRestriction) {
|
|
2816
|
-
let
|
|
2824
|
+
let sDataUrl = oExportEvent.mParameters.exportSettings.dataSource.dataUrl;
|
|
2825
|
+
// Extract non-$-prefixed query parameters (e.g. &search=NVT, &sap-client=100) before
|
|
2826
|
+
// splitting by "&$". Without this, such parameters remain appended to the preceding
|
|
2827
|
+
// $-parameter segment and their & / = characters get encoded by encodeURIComponent,
|
|
2828
|
+
// corrupting the OData URL sent to the backend.
|
|
2829
|
+
const aNonDollarParams = [];
|
|
2830
|
+
sDataUrl = sDataUrl.replace(/&(?!\$)([^&]+)/g, function(match) {
|
|
2831
|
+
aNonDollarParams.push(match);
|
|
2832
|
+
return "";
|
|
2833
|
+
});
|
|
2834
|
+
let aSplitDataUrl = sDataUrl.split("&$");
|
|
2817
2835
|
const idxSelect = aSplitDataUrl.findIndex(data => data.startsWith("select"));
|
|
2818
2836
|
const idxExpand = aSplitDataUrl.findIndex(data => data.startsWith("expand"));
|
|
2819
2837
|
// reconsturct select query from URL.
|
|
@@ -2832,7 +2850,8 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
2832
2850
|
aSplitDataUrl.splice(idxExpand, 1);
|
|
2833
2851
|
}
|
|
2834
2852
|
}
|
|
2835
|
-
|
|
2853
|
+
// Re-append the preserved non-$-prefixed parameters after the $-parameter reconstruction.
|
|
2854
|
+
oExportEvent.mParameters.exportSettings.dataSource.dataUrl = aSplitDataUrl.join("&$") + aNonDollarParams.join("");
|
|
2836
2855
|
}
|
|
2837
2856
|
|
|
2838
2857
|
/**
|
|
@@ -2983,6 +3002,7 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
2983
3002
|
var getPaginatorInfo = testableHelper.testable(getPaginatorInfo, "getPaginatorInfo");
|
|
2984
3003
|
var fnRenderTeamsContactCollabOptions = testableHelper.testable(fnRenderTeamsContactCollabOptions, "fnRenderTeamsContactCollabOptions");
|
|
2985
3004
|
var removeUnsupportedColumnsToExport = testableHelper.testable(removeUnsupportedColumnsToExport, "removeUnsupportedColumnsToExport");
|
|
3005
|
+
var modifyDataSourceUrl = testableHelper.testable(modifyDataSourceUrl, "modifyDataSourceUrl");
|
|
2986
3006
|
var fnAddMultiEditFieldGroupProperties = testableHelper.testable(fnAddMultiEditFieldGroupProperties,"fnAddMultiEditFieldGroupProperties");
|
|
2987
3007
|
var fnHideTableCells = testableHelper.testable(fnHideTableCells, "fnHideTableCells");
|
|
2988
3008
|
var fnApplyCellHiddenBindings = testableHelper.testable(fnApplyCellHiddenBindings, "fnApplyCellHiddenBindings");
|
|
@@ -835,10 +835,10 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
835
835
|
|
|
836
836
|
setComponentRefreshBehaviour(oOutbound);
|
|
837
837
|
|
|
838
|
-
// We now
|
|
839
|
-
//
|
|
840
|
-
if (oOutbound.parameters
|
|
841
|
-
oNavigationHandler.navigate(oOutbound.semanticObject, oOutbound.action, oSelectionVariant.toJSONString(), null, null, null,
|
|
838
|
+
// We now skip setting the app to busy mode when opening a new tab and bypass the re-entry guard (fnNavigateExternal) for explace navigations:
|
|
839
|
+
// the source app stays alive when a new tab is opened, so without the bypass AppComponent.restore() is never called and the guard is never reset.
|
|
840
|
+
if (oServices.oApplication.isExplaceNavigation(oOutbound.parameters)) {
|
|
841
|
+
oNavigationHandler.navigate(oOutbound.semanticObject, oOutbound.action, oSelectionVariant.toJSONString(), null, null, null, "explace");
|
|
842
842
|
} else {
|
|
843
843
|
oServices.oApplication.navigateExternal(oOutbound.semanticObject, oOutbound.action, oSelectionVariant.toJSONString(), null, fnHandleError);
|
|
844
844
|
//null object has to be passed to the NavigationHandler as an
|
|
@@ -50,6 +50,7 @@ sap.ui.define(["sap/suite/ui/generic/template/genericUtilities/metadataAnalyser"
|
|
|
50
50
|
var oAppComponent = oComponent.getAppComponent();
|
|
51
51
|
var oUIManifest = oAppComponent.getManifestEntry("sap.ui");
|
|
52
52
|
var oAppManifest = oAppComponent.getManifestEntry("sap.app");
|
|
53
|
+
var oOutbounds = oAppManifest && oAppManifest["crossNavigation"] && oAppManifest["crossNavigation"]["outbounds"];
|
|
53
54
|
if (oAppManifest && oAppManifest["crossNavigation"]) {
|
|
54
55
|
delete oAppManifest["crossNavigation"];
|
|
55
56
|
}
|
|
@@ -57,7 +58,7 @@ sap.ui.define(["sap/suite/ui/generic/template/genericUtilities/metadataAnalyser"
|
|
|
57
58
|
oAppManifest.id = InsightsCardHelper.getCardId(oAppComponent);
|
|
58
59
|
oManifest["sap.app"] = fnCreateManifestSapApp(oAppManifest);
|
|
59
60
|
oManifest["sap.ui"] = oUIManifest;
|
|
60
|
-
oManifest["sap.card"] = fnCreateManifestSapCard(oCardDefinition);
|
|
61
|
+
oManifest["sap.card"] = fnCreateManifestSapCard(oCardDefinition, oOutbounds);
|
|
61
62
|
oManifest["sap.insights"] = fnCreateManifestSapInsight(oCardDefinition);
|
|
62
63
|
oManifest["sap.ui5"] = fnCreateSapui5();
|
|
63
64
|
return oManifest;
|
|
@@ -91,7 +92,7 @@ sap.ui.define(["sap/suite/ui/generic/template/genericUtilities/metadataAnalyser"
|
|
|
91
92
|
return oManifestAppData;
|
|
92
93
|
};
|
|
93
94
|
|
|
94
|
-
var fnCreateManifestSapCard = function (oCardDefinition) {
|
|
95
|
+
var fnCreateManifestSapCard = function (oCardDefinition, oOutbounds) {
|
|
95
96
|
var oCardConfig = {};
|
|
96
97
|
var sComponentName = oCardDefinition['component'].getMetadata().getName();
|
|
97
98
|
oCardConfig["type"] = getCardType(sComponentName);
|
|
@@ -104,7 +105,7 @@ sap.ui.define(["sap/suite/ui/generic/template/genericUtilities/metadataAnalyser"
|
|
|
104
105
|
} else {
|
|
105
106
|
oCardConfig["content"] = InsightsCardHelper.fnCreateManifestSapTableCardContent(oCardDefinition, oCardConfig);
|
|
106
107
|
}
|
|
107
|
-
InsightsCardHelper.getCardActions(oCardDefinition, oCardConfig);
|
|
108
|
+
InsightsCardHelper.getCardActions(oCardDefinition, oCardConfig, oOutbounds);
|
|
108
109
|
return oCardConfig;
|
|
109
110
|
};
|
|
110
111
|
|
|
@@ -703,7 +704,7 @@ sap.ui.define(["sap/suite/ui/generic/template/genericUtilities/metadataAnalyser"
|
|
|
703
704
|
return aDimensions;
|
|
704
705
|
};
|
|
705
706
|
|
|
706
|
-
InsightsCardHelper.getCardActions = function (oCardDefinition, oSapCard) {
|
|
707
|
+
InsightsCardHelper.getCardActions = function (oCardDefinition, oSapCard, oOutbounds) {
|
|
707
708
|
var sHash = window.hasher.getHash(), aSemanticObjAction = sHash.split('&/')[0], sAppVarId;
|
|
708
709
|
|
|
709
710
|
if (aSemanticObjAction.includes('?')) {
|
|
@@ -735,6 +736,10 @@ sap.ui.define(["sap/suite/ui/generic/template/genericUtilities/metadataAnalyser"
|
|
|
735
736
|
}];
|
|
736
737
|
|
|
737
738
|
var oContentParams = JSON.parse(JSON.stringify(oHeaderParams));
|
|
739
|
+
var oRowOutbound = fnGetRowNavigationOutbound(oOutbounds, aSemanticObjAction[0]);
|
|
740
|
+
if (oRowOutbound) {
|
|
741
|
+
oContentParams.ibnTarget = oRowOutbound;
|
|
742
|
+
}
|
|
738
743
|
|
|
739
744
|
var oContentParameterValue = [{
|
|
740
745
|
"type": "Navigation",
|
|
@@ -757,6 +762,21 @@ sap.ui.define(["sap/suite/ui/generic/template/genericUtilities/metadataAnalyser"
|
|
|
757
762
|
}
|
|
758
763
|
};
|
|
759
764
|
|
|
765
|
+
var fnGetRowNavigationOutbound = function (oOutbounds, sSemanticObject) {
|
|
766
|
+
if (!oOutbounds || !sSemanticObject) {
|
|
767
|
+
return null;
|
|
768
|
+
}
|
|
769
|
+
var oResult = null;
|
|
770
|
+
Object.keys(oOutbounds).some(function (sKey) {
|
|
771
|
+
var oOutbound = oOutbounds[sKey];
|
|
772
|
+
if (oOutbound && oOutbound.semanticObject === sSemanticObject && oOutbound.action) {
|
|
773
|
+
oResult = { semanticObject: oOutbound.semanticObject, action: oOutbound.action };
|
|
774
|
+
return oOutbound.action === "displayFactSheet";
|
|
775
|
+
}
|
|
776
|
+
});
|
|
777
|
+
return oResult;
|
|
778
|
+
};
|
|
779
|
+
|
|
760
780
|
var fnGetLineItemAnnotation = function (oCardDefinition) {
|
|
761
781
|
var oEntityType = oCardDefinition['entityType'];
|
|
762
782
|
var aCustomData = oCardDefinition['currentControlHandler'].getControl().getCustomData();
|
|
@@ -2445,7 +2445,7 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
2445
2445
|
};
|
|
2446
2446
|
for (var oHistoricHash = oCurrentHash; oHistoricHash.iHashChangeCount > 0; oHistoricHash = aPreviousHashes[oHistoricHash.backTarget]){
|
|
2447
2447
|
var oIdentity = (oHistoricHash === oCurrentHash) ? oCurrentIdentity : oHistoricHash.identity;
|
|
2448
|
-
var oReducedIdentity = oIdentity.treeNode && {
|
|
2448
|
+
var oReducedIdentity = oIdentity && oIdentity.treeNode && {
|
|
2449
2449
|
sRouteName: oIdentity.treeNode.sRouteName,
|
|
2450
2450
|
keys: oIdentity.keys,
|
|
2451
2451
|
appStates: oIdentity.appStates
|
|
@@ -3125,6 +3125,7 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
3125
3125
|
var fnPrepareHostView = testableHelper.testable(fnPrepareHostView, "prepareHostView");
|
|
3126
3126
|
var fnPreloadComponent = testableHelper.testable(fnPreloadComponent, "preloadComponent");
|
|
3127
3127
|
var fnGetRouteInfoByHash = testableHelper.testable(fnGetRouteInfoByHash, "getRouteInfoByHash");
|
|
3128
|
+
var fnUpdateHistoryState = testableHelper.testable(fnUpdateHistoryState, "updateHistoryState");
|
|
3128
3129
|
|
|
3129
3130
|
// Note: Function createHostView will be added by routingHelper.
|
|
3130
3131
|
// Allow to mock this by unit tests
|
|
@@ -3135,8 +3136,16 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
3135
3136
|
testableHelper.testable(function(fnPrepareHostViewStub){
|
|
3136
3137
|
fnPrepareHostView = fnPrepareHostViewStub;
|
|
3137
3138
|
}, "setPrepareHostView");
|
|
3138
|
-
/* eslint-enable */
|
|
3139
3139
|
|
|
3140
|
+
testableHelper.testable(function(oCurrentHashParam, aPreviousHashesParam, oCurrentIdentityParam, oHistoryStateParam){
|
|
3141
|
+
oCurrentHash = oCurrentHashParam;
|
|
3142
|
+
aPreviousHashes = aPreviousHashesParam;
|
|
3143
|
+
oCurrentIdentity = oCurrentIdentityParam;
|
|
3144
|
+
if (oHistoryStateParam !== undefined){
|
|
3145
|
+
oHistoryState = oHistoryStateParam;
|
|
3146
|
+
}
|
|
3147
|
+
}, "setInternalNavigationState");
|
|
3148
|
+
/* eslint-enable */
|
|
3140
3149
|
|
|
3141
3150
|
oTemplateContract.oBusyHelper.setBusy((getParsedShellHashFromFLP() || Promise.resolve()).then(function(oResults){
|
|
3142
3151
|
var oParsedUrl = oResults && oResults.parseParameters(document.location.search);
|
|
@@ -3222,7 +3231,7 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
3222
3231
|
* @param {sap.suite.ui.generic.template.lib.AppComponent} oAppComponent The AppComponent instance
|
|
3223
3232
|
* @public
|
|
3224
3233
|
* @extends sap.ui.base.Object
|
|
3225
|
-
* @version 1.148.
|
|
3234
|
+
* @version 1.148.11
|
|
3226
3235
|
* @since 1.30.0
|
|
3227
3236
|
* @alias sap.suite.ui.generic.template.lib.NavigationController
|
|
3228
3237
|
*/
|