@sapui5/sap.suite.ui.generic.template 1.148.8 → 1.148.10
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 +33 -6
- 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 +1 -1
- 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.10
|
|
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) {
|
|
@@ -1115,8 +1123,15 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
1115
1123
|
// The value "sEntitySet" holds the entity set of an object page or a table.
|
|
1116
1124
|
//
|
|
1117
1125
|
// Sometimes, the SmartLink is located on a field group which belongs to the child entity set of object page.
|
|
1118
|
-
// So, we
|
|
1126
|
+
// So, we try to derive the entity type from the SmartLink's binding context.
|
|
1119
1127
|
var oEntityType = ModelUtil.getEntityTypeFromContext(oControl.getBindingContext());
|
|
1128
|
+
// CS20260013063140: ModelUtil.getEntityTypeFromContext returns null when the SmartLink
|
|
1129
|
+
// is resolved via SmartLinkDelegate, because the binding context is not yet resolvable
|
|
1130
|
+
// to an entity type at that point.
|
|
1131
|
+
// Fall back to deriving the entity type from the enclosing entity set instead.
|
|
1132
|
+
if (!oEntityType) {
|
|
1133
|
+
oEntityType = oMetaModel.getODataEntityType(oEntitySet.entityType);
|
|
1134
|
+
}
|
|
1120
1135
|
var oField = oEntityType.property.find(function (oProperty) { return oProperty.name === sSourceClickedField; });
|
|
1121
1136
|
var sTextArrangement = "descriptionAndId";
|
|
1122
1137
|
if (oField) { // TODO: Need to provide the correct field Object using the entityType and corresponding association (should be handled by a BLI)
|
|
@@ -2724,7 +2739,7 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
2724
2739
|
oCommonUtils.setComponentRefreshBehaviour(oOutbound);
|
|
2725
2740
|
// Explace outbounds must bypass fnNavigateExternal to avoid setting the app busy and consuming the re-entry guard.
|
|
2726
2741
|
// getNavigationHandler() returns a ghost stub (no .navigate) when ghostapp=true — guard before calling.
|
|
2727
|
-
if (
|
|
2742
|
+
if (oServices.oApplication.isExplaceNavigation(oOutbound.parameters)) {
|
|
2728
2743
|
var oNavHandler = oServices.oApplication.getNavigationHandler();
|
|
2729
2744
|
if (oNavHandler.navigate) {
|
|
2730
2745
|
oNavHandler.navigate(oOutbound.semanticObject, oOutbound.action, oSelectionVariant.toJSONString(), null, oCommonUtils.handleError, null, "explace");
|
|
@@ -2806,7 +2821,17 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
2806
2821
|
* @param {*} aNavRestriction - list of 1:n navigation properties
|
|
2807
2822
|
*/
|
|
2808
2823
|
function modifyDataSourceUrl(oExportEvent, aNavRestriction) {
|
|
2809
|
-
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("&$");
|
|
2810
2835
|
const idxSelect = aSplitDataUrl.findIndex(data => data.startsWith("select"));
|
|
2811
2836
|
const idxExpand = aSplitDataUrl.findIndex(data => data.startsWith("expand"));
|
|
2812
2837
|
// reconsturct select query from URL.
|
|
@@ -2825,7 +2850,8 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
2825
2850
|
aSplitDataUrl.splice(idxExpand, 1);
|
|
2826
2851
|
}
|
|
2827
2852
|
}
|
|
2828
|
-
|
|
2853
|
+
// Re-append the preserved non-$-prefixed parameters after the $-parameter reconstruction.
|
|
2854
|
+
oExportEvent.mParameters.exportSettings.dataSource.dataUrl = aSplitDataUrl.join("&$") + aNonDollarParams.join("");
|
|
2829
2855
|
}
|
|
2830
2856
|
|
|
2831
2857
|
/**
|
|
@@ -2976,6 +3002,7 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
2976
3002
|
var getPaginatorInfo = testableHelper.testable(getPaginatorInfo, "getPaginatorInfo");
|
|
2977
3003
|
var fnRenderTeamsContactCollabOptions = testableHelper.testable(fnRenderTeamsContactCollabOptions, "fnRenderTeamsContactCollabOptions");
|
|
2978
3004
|
var removeUnsupportedColumnsToExport = testableHelper.testable(removeUnsupportedColumnsToExport, "removeUnsupportedColumnsToExport");
|
|
3005
|
+
var modifyDataSourceUrl = testableHelper.testable(modifyDataSourceUrl, "modifyDataSourceUrl");
|
|
2979
3006
|
var fnAddMultiEditFieldGroupProperties = testableHelper.testable(fnAddMultiEditFieldGroupProperties,"fnAddMultiEditFieldGroupProperties");
|
|
2980
3007
|
var fnHideTableCells = testableHelper.testable(fnHideTableCells, "fnHideTableCells");
|
|
2981
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();
|
|
@@ -3222,7 +3222,7 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
3222
3222
|
* @param {sap.suite.ui.generic.template.lib.AppComponent} oAppComponent The AppComponent instance
|
|
3223
3223
|
* @public
|
|
3224
3224
|
* @extends sap.ui.base.Object
|
|
3225
|
-
* @version 1.148.
|
|
3225
|
+
* @version 1.148.10
|
|
3226
3226
|
* @since 1.30.0
|
|
3227
3227
|
* @alias sap.suite.ui.generic.template.lib.NavigationController
|
|
3228
3228
|
*/
|