@sapui5/sap.suite.ui.generic.template 1.128.1 → 1.129.1
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/Component.js +0 -2
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/controller/ControllerImplementation.js +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/Component.js +0 -2
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n.properties +4 -4
- package/src/sap/suite/ui/generic/template/ListReport/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/ObjectPage/controller/ControllerImplementation.js +5 -7
- package/src/sap/suite/ui/generic/template/ObjectPage/controller/MessageSortingHandler.js +7 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/controller/PasteHandler.js +28 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/controller/inlineCreationRows/InlineCreationRowsHelper.js +1 -1
- package/src/sap/suite/ui/generic/template/ObjectPage/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/ObjectPage/templateSpecificPreparationHelper.js +0 -11
- package/src/sap/suite/ui/generic/template/ObjectPage/view/fragments/Actions.fragment.xml +6 -6
- 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/designtime/ObjectPage.designtime.js +11 -2
- package/src/sap/suite/ui/generic/template/fragments/ContactDetails.fragment.xml +0 -1
- package/src/sap/suite/ui/generic/template/fragments/SmartControlContextMenu.fragment.xml +6 -0
- package/src/sap/suite/ui/generic/template/genericUtilities/utils.js +48 -39
- package/src/sap/suite/ui/generic/template/js/AnnotationHelper.js +19 -3
- package/src/sap/suite/ui/generic/template/js/AnnotationHelperHiddenTermSupport.js +6 -12
- package/src/sap/suite/ui/generic/template/js/preparationHelper.js +3 -0
- package/src/sap/suite/ui/generic/template/lib/AppComponent.js +16 -26
- package/src/sap/suite/ui/generic/template/lib/CRUDManager.js +1 -3
- package/src/sap/suite/ui/generic/template/lib/CommonEventHandlers.js +78 -10
- package/src/sap/suite/ui/generic/template/lib/CommonUtils.js +6 -1
- package/src/sap/suite/ui/generic/template/lib/ComponentUtils.js +6 -8
- package/src/sap/suite/ui/generic/template/lib/ContextMenuHandler.js +23 -67
- package/src/sap/suite/ui/generic/template/lib/FlexibleColumnLayoutHandler.js +2 -1
- package/src/sap/suite/ui/generic/template/lib/ShareUtils.js +24 -5
- package/src/sap/suite/ui/generic/template/lib/insights/InsightsCardHelper.js +4 -5
- package/src/sap/suite/ui/generic/template/lib/insights/InsightsFECardProvider.js +30 -0
- package/src/sap/suite/ui/generic/template/lib/insights/InsightsHandler.js +38 -33
- package/src/sap/suite/ui/generic/template/lib/navigation/NavigationController.js +91 -13
- package/src/sap/suite/ui/generic/template/library.js +1 -1
- package/src/sap/suite/ui/generic/template/listTemplates/fragments/DetailSmartTable.fragment.xml +3 -1
- package/src/sap/suite/ui/generic/template/manifestMerger/ChangePageConfiguration.js +50 -6
- package/src/sap/suite/ui/generic/template/manifestMerger/MergerUtil.js +4 -3
- package/src/sap/suite/ui/generic/template/themes/base/ObjectPage.less +4 -0
|
@@ -5,17 +5,17 @@ sap.ui.define([
|
|
|
5
5
|
"sap/suite/ui/generic/template/lib/insights/InsightsCardHelper",
|
|
6
6
|
"sap/suite/ui/generic/template/lib/cards/DTCardHelper",
|
|
7
7
|
"sap/base/util/merge",
|
|
8
|
-
"sap/base/util/deepClone"
|
|
9
|
-
|
|
8
|
+
"sap/base/util/deepClone",
|
|
9
|
+
"sap/suite/ui/generic/template/genericUtilities/FeLogger"
|
|
10
|
+
], function(BaseObject, extend, MessageBox, InsightsCardHelper, DTCardHelper, merge, deepClone, FeLogger) {
|
|
10
11
|
'use strict';
|
|
11
12
|
function getMethods(oState, oController, oTemplateUtils) {
|
|
12
|
-
|
|
13
|
+
var oLogger = new FeLogger("lib.InsightsHandler").getLogger();
|
|
13
14
|
var oTemplatePrivateModel = oTemplateUtils.oComponentUtils.getTemplatePrivateModel();
|
|
14
15
|
var oTemplatePrivateGlobalModel = oTemplateUtils.oComponentUtils.getTemplatePrivateGlobalModel();
|
|
15
16
|
var oInsightsInstance = oTemplatePrivateGlobalModel.getProperty("/generic/insights/oInsightsInstance");
|
|
16
17
|
/**
|
|
17
18
|
* This function can be called by any InsightsHandler instance to add the card that the user wants to share
|
|
18
|
-
* @param {*} oInsightsCardProvider single insight instance which is shared across the application
|
|
19
19
|
* @param {string} sType card type that will be provided by the component (LR/ALP/OP)
|
|
20
20
|
* @param {*} oPresentationControlHandler
|
|
21
21
|
* @returns {Promise<Array<object>>}
|
|
@@ -60,37 +60,31 @@ sap.ui.define([
|
|
|
60
60
|
|
|
61
61
|
// updating the same card to the global model so that the additional details can be used when card detail is requested from a card consumer.
|
|
62
62
|
var oShareCardInfo = deepClone(oCardInfo);
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
oShareCardInfo.descriptorContent = merge(
|
|
73
|
-
oShareCardInfo.descriptorContent,
|
|
74
|
-
oCardManifest
|
|
75
|
-
);
|
|
76
|
-
fnResolve(oShareCardInfo);
|
|
77
|
-
})
|
|
78
|
-
.catch(function (oError) {
|
|
79
|
-
fnResolve(null);
|
|
80
|
-
});
|
|
81
|
-
} else {
|
|
82
|
-
fnResolve(oShareCardInfo);
|
|
83
|
-
}
|
|
84
|
-
});
|
|
85
|
-
return fnGetCardInfoPromise.then(function (oShareCardInfo) {
|
|
86
|
-
if (oShareCardInfo) {
|
|
63
|
+
let oGetCardInfoPromise = Promise.resolve(oCardInfo);
|
|
64
|
+
if (sType === InsightsCardHelper.CardTypes.DT_CARD) {
|
|
65
|
+
oGetCardInfoPromise = fnFetchDTCardManifest();
|
|
66
|
+
}
|
|
67
|
+
return oGetCardInfoPromise.then(function (oCardInfo) {
|
|
68
|
+
const aShareCardInfo = [];
|
|
69
|
+
if (oCardInfo) {
|
|
87
70
|
oShareCardInfo.cardType = sType;
|
|
88
71
|
oShareCardInfo.viewId = sViewId;
|
|
89
72
|
oTemplatePrivateGlobalModel.setProperty("/generic/insights/shareCards/" + iViewLevel, [oShareCardInfo]);
|
|
73
|
+
aShareCardInfo.push(oShareCardInfo);
|
|
90
74
|
}
|
|
91
|
-
return
|
|
75
|
+
return aShareCardInfo;
|
|
92
76
|
});
|
|
93
|
-
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
async function fnFetchDTCardManifest() {
|
|
80
|
+
let oCardManifest;
|
|
81
|
+
try {
|
|
82
|
+
oCardManifest = await oState.oDTCardHelper.getCardManifest(DTCardHelper.CardTypes.INTEGRATION) || null;
|
|
83
|
+
} catch (error) {
|
|
84
|
+
oLogger.error("Error while fetching the DT Card manifest", error);
|
|
85
|
+
} finally {
|
|
86
|
+
return oCardManifest;
|
|
87
|
+
}
|
|
94
88
|
}
|
|
95
89
|
|
|
96
90
|
function isCardCreationAllowed(oState) {
|
|
@@ -140,13 +134,24 @@ sap.ui.define([
|
|
|
140
134
|
oPresentationControlHandler = oTemplateUtils.oServices.oPresentationControlHandlerFactory.getPresentationControlHandler(oState.oSmartChart);
|
|
141
135
|
} else if (oCard.cardType === InsightsCardHelper.CardTypes.DT_CARD) {
|
|
142
136
|
var sEntitySet = oComponent.getEntitySet();
|
|
137
|
+
var oClonedCard = deepClone(oCard);
|
|
143
138
|
var oMetaModel = oComponent.getModel().getMetaModel();
|
|
144
|
-
|
|
145
139
|
|
|
146
140
|
var oInsightsCardProvider = oTemplateUtils.oServices.oInsightsFECardProvider.getCardProviderInsightsInstance();
|
|
147
|
-
|
|
141
|
+
|
|
142
|
+
// Fetch the DT Card manifest
|
|
143
|
+
fnFetchDTCardManifest()
|
|
144
|
+
.then(function (oCardManifest) {
|
|
145
|
+
if (!oCardManifest) {
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
oClonedCard.descriptorContent = merge(
|
|
149
|
+
oClonedCard.descriptorContent,
|
|
150
|
+
oCardManifest
|
|
151
|
+
);
|
|
152
|
+
oInsightsCardProvider.channel.publishCard(oInsightsCardProvider.id, oClonedCard, mAdditionalProperties.consumerId);
|
|
153
|
+
});
|
|
148
154
|
return;
|
|
149
|
-
|
|
150
155
|
} else {
|
|
151
156
|
oPresentationControlHandler = oPresentationControlHandler || oState.oPresentationControlHandler;
|
|
152
157
|
}
|
|
@@ -77,9 +77,10 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
77
77
|
"sap/suite/ui/generic/template/lib/navigation/startupParameterHelper",
|
|
78
78
|
"sap/suite/ui/generic/template/lib/TemplateComponent",
|
|
79
79
|
"sap/base/strings/whitespaceReplacer",
|
|
80
|
-
"sap/m/IllustratedMessageType"
|
|
80
|
+
"sap/m/IllustratedMessageType",
|
|
81
|
+
"sap/ui/util/openWindow"
|
|
81
82
|
], function(BaseObject, extend, isEmptyObject, HashChanger, History, coreLibrary, controlHelper, FeLogger, jsonHelper, oDataModelHelper, ProcessObserver, Queue, testableHelper, CRUDHelper, MessageUtils, routingHelper, startupParameterHelper,
|
|
82
|
-
TemplateComponent, whitespaceReplacer, IllustratedMessageType) {
|
|
83
|
+
TemplateComponent, whitespaceReplacer, IllustratedMessageType, openWindow) {
|
|
83
84
|
"use strict";
|
|
84
85
|
var sClassName = "lib.navigation.NavigationController";
|
|
85
86
|
var oLogger = new FeLogger(sClassName).getLogger();
|
|
@@ -356,6 +357,7 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
356
357
|
} else {
|
|
357
358
|
fnInitializeRouter();
|
|
358
359
|
}
|
|
360
|
+
|
|
359
361
|
return Promise.all(aStartupPromises);
|
|
360
362
|
}
|
|
361
363
|
|
|
@@ -1674,6 +1676,67 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
1674
1676
|
oTemplateContract.oBusyHelper.setBusy(oRet, undefined, undefined, oTargetIdentityInfo.willShowPlaceholder);
|
|
1675
1677
|
return oRet;
|
|
1676
1678
|
}
|
|
1679
|
+
|
|
1680
|
+
// Opens the context in new tab
|
|
1681
|
+
function fnOpenContextInNewTab(oSourceNode, oNavigationContext) {
|
|
1682
|
+
var oTargetIdentityInfo = getTargetIdentityInfoForContext({ treeNode: oSourceNode }, oNavigationContext, true, false);
|
|
1683
|
+
var oTargetIdentityPromise = oTargetIdentityInfo.promise;
|
|
1684
|
+
return oTargetIdentityPromise.then(function(oTargetIdentity){
|
|
1685
|
+
// Construct the query params
|
|
1686
|
+
var mQueryParameters = {};
|
|
1687
|
+
// In case FCL layout is supported by app, the target context should be opened in full screen mode.
|
|
1688
|
+
// So, calculate the full screen layout type and add it as a query param.
|
|
1689
|
+
var sFCLLayout = oTemplateContract.oFlexibleColumnLayoutHandler && oTemplateContract.oFlexibleColumnLayoutHandler.getFullscreenLayout(oTargetIdentity.treeNode.fCLLevel);
|
|
1690
|
+
if (sFCLLayout) {
|
|
1691
|
+
mQueryParameters["FCLLayout"] = sFCLLayout;
|
|
1692
|
+
}
|
|
1693
|
+
// Get the route information from target identity
|
|
1694
|
+
var oRouterInput = fnGetRouterInput(oTargetIdentity.treeNode, oTargetIdentity.keys, mQueryParameters);
|
|
1695
|
+
// Construct the app specific route URL from route name and parameters
|
|
1696
|
+
var sTargetAppSpecificRoute = oNavigationControllerProxy.oRouter.getURL(oRouterInput.route, oRouterInput.parameters);
|
|
1697
|
+
// Add the prefix
|
|
1698
|
+
var sRoutePrefix = sTargetAppSpecificRoute.startsWith("/") ? "&" : "&/";
|
|
1699
|
+
sTargetAppSpecificRoute = sRoutePrefix + sTargetAppSpecificRoute;
|
|
1700
|
+
// Construct the fully qualified URL updated with the target app route
|
|
1701
|
+
return fnConstructUrlFromRoute(sTargetAppSpecificRoute);
|
|
1702
|
+
}).then(function (sTargetUrl) {
|
|
1703
|
+
// Open the URL in new tab/window
|
|
1704
|
+
openWindow(sTargetUrl);
|
|
1705
|
+
}).catch(function (oError) {
|
|
1706
|
+
oLogger.error("Error while opening the context '" + oNavigationContext.getPath() + "' in a new tab: " + oError);
|
|
1707
|
+
});
|
|
1708
|
+
}
|
|
1709
|
+
|
|
1710
|
+
// Constructs the fully qualified URL with the given app specific route.
|
|
1711
|
+
function fnConstructUrlFromRoute(sTargetAppSpecificRoute) {
|
|
1712
|
+
var UShellContainer = sap.ui.require("sap/ushell/Container");
|
|
1713
|
+
|
|
1714
|
+
if (!UShellContainer) {
|
|
1715
|
+
return Promise.reject("Unable to proceed as 'sap/ushell/Container' is not found!");
|
|
1716
|
+
}
|
|
1717
|
+
//Encode the route
|
|
1718
|
+
sTargetAppSpecificRoute = encodeURI(sTargetAppSpecificRoute);
|
|
1719
|
+
|
|
1720
|
+
var oUrlParsingPromise = UShellContainer.getServiceAsync("URLParsing");
|
|
1721
|
+
var oFLPUrlPromise = UShellContainer.getFLPUrlAsync(true);
|
|
1722
|
+
return Promise.all([oUrlParsingPromise, oFLPUrlPromise]).then(function (aResults) {
|
|
1723
|
+
var oUrlParser = aResults[0];
|
|
1724
|
+
var sFLPUrl = aResults[1];
|
|
1725
|
+
|
|
1726
|
+
// Construct URL object from FLP URL
|
|
1727
|
+
var oFLPUrl = new URL(sFLPUrl);
|
|
1728
|
+
// Get the hash from URL object
|
|
1729
|
+
var sHash = oFLPUrl.hash;
|
|
1730
|
+
// Parse the hash and update "appSpecificRoute" with "sTargetAppSpecificRoute"
|
|
1731
|
+
var oHash = oUrlParser.parseShellHash(sHash);
|
|
1732
|
+
oHash.appSpecificRoute = sTargetAppSpecificRoute;
|
|
1733
|
+
// Then, reconstruct the hash with updated value.
|
|
1734
|
+
sHash = oUrlParser.constructShellHash(oHash);
|
|
1735
|
+
// Update the hash on the FLP URL and reconstruct the URL
|
|
1736
|
+
oFLPUrl.hash = sHash;
|
|
1737
|
+
return oFLPUrl.toString();
|
|
1738
|
+
});
|
|
1739
|
+
}
|
|
1677
1740
|
|
|
1678
1741
|
// This function is called when only tables could be found as focus target for the message oMessage.
|
|
1679
1742
|
// sFullTarget is one of the full targets defined for this message.
|
|
@@ -2117,6 +2180,25 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
2117
2180
|
}) : Promise.reject();
|
|
2118
2181
|
}
|
|
2119
2182
|
|
|
2183
|
+
/**
|
|
2184
|
+
* Calls state changer per each (template) component on url change.
|
|
2185
|
+
* @param {Array<sap.suite.ui.generic.template.lib.StatePreserver>} aStateChangers array of StatePreserver instances
|
|
2186
|
+
* @param {map} appStates map of appStates
|
|
2187
|
+
* @param {boolean} bIsFCLMode optional, defined only in FLC
|
|
2188
|
+
* @returns {boolean} returns true if url change can be handled by state changer,
|
|
2189
|
+
* returns false in FCL, so the route-matched logic will continue as normal.
|
|
2190
|
+
*/
|
|
2191
|
+
function fnGetIsStateChange(aStateChangers, appStates, bIsFCLMode) {
|
|
2192
|
+
var bIsStateChangeResult = false;
|
|
2193
|
+
for (var i = 0; i < aStateChangers.length; i++){
|
|
2194
|
+
var oStateChanger = aStateChangers[i];
|
|
2195
|
+
if (oStateChanger.isStateChange(appStates)){
|
|
2196
|
+
bIsStateChangeResult = bIsFCLMode ? false : true;
|
|
2197
|
+
}
|
|
2198
|
+
}
|
|
2199
|
+
return bIsStateChangeResult;
|
|
2200
|
+
}
|
|
2201
|
+
|
|
2120
2202
|
// Start: Handling url-changes
|
|
2121
2203
|
/*
|
|
2122
2204
|
* calls onActivate on the specified view, if it exists
|
|
@@ -2398,16 +2480,11 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
2398
2480
|
fnNavigate(sTargetHash, true);
|
|
2399
2481
|
return; // fnHandleRouteMatched will be called with the new url, so leave further processing to that call
|
|
2400
2482
|
}
|
|
2483
|
+
// State changers can interfere in FCL, for example between LR and OP when the search query is updated. In particular, it is necessary to skip the early return in FCL and display an error in case of 404.
|
|
2484
|
+
// The last parameter will still trigger state changers (with possible side effects), but will never return true as a result.
|
|
2485
|
+
var bIsStateChange = fnGetIsStateChange(oTemplateContract.aStateChangers, oCurrentIdentity.appStates, !!oTemplateContract.oFlexibleColumnLayoutHandler);
|
|
2401
2486
|
// State changers may identify the hash change as something which can be handled by them internally. In this case we do not need to run the whole mechanism.
|
|
2402
2487
|
// Since isStateChange is allowed to have side-effects we call all StateChangers.
|
|
2403
|
-
var bIsStateChange = false;
|
|
2404
|
-
for (var i = 0; i < oTemplateContract.aStateChangers.length; i++){
|
|
2405
|
-
var oStateChanger = oTemplateContract.aStateChangers[i];
|
|
2406
|
-
if (oStateChanger.isStateChange(oCurrentIdentity.appStates)){
|
|
2407
|
-
bIsStateChange = true;
|
|
2408
|
-
}
|
|
2409
|
-
}
|
|
2410
|
-
|
|
2411
2488
|
if (bIsStateChange){
|
|
2412
2489
|
oRoutingOptions = null;
|
|
2413
2490
|
oCurrentHash.hash = sHash;
|
|
@@ -2983,14 +3060,15 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
2983
3060
|
oNavigationControllerProxy.userHasAcceptedDataLoss = fnUserHasAcceptedDataLoss;
|
|
2984
3061
|
oNavigationControllerProxy.unwantedDataLossPossible = fnUnwantedDataLossPossible;
|
|
2985
3062
|
oNavigationControllerProxy.isBackLeavingTheEditScope = isBackLeavingTheEditScope;
|
|
2986
|
-
|
|
3063
|
+
oNavigationControllerProxy.openContextInNewTab = fnOpenContextInNewTab;
|
|
2987
3064
|
// Make private function accessible to unit tests
|
|
2988
3065
|
/* eslint-disable */
|
|
2989
3066
|
var fnCreateTemplateComponent = testableHelper.testable(fnCreateTemplateComponent, "createTemplateComponent");
|
|
2990
3067
|
var getParsedShellHashFromFLP = testableHelper.testable(getParsedShellHashFromFLP, "getParsedShellHashFromFLP");
|
|
2991
3068
|
var fnPreloadComponent = testableHelper.testable(fnPreloadComponent, "preloadComponent");
|
|
2992
3069
|
var fnGetRouteInfoByHash = testableHelper.testable(fnGetRouteInfoByHash, "getRouteInfoByHash");
|
|
2993
|
-
|
|
3070
|
+
var fnGetIsStateChange = testableHelper.testable(fnGetIsStateChange, "getIsStateChange");
|
|
3071
|
+
|
|
2994
3072
|
// Note: Function createHostView will be added by routingHelper.
|
|
2995
3073
|
// Allow to mock this by unit tests
|
|
2996
3074
|
testableHelper.testable(function(fnCreateHostView){
|
|
@@ -3087,7 +3165,7 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
3087
3165
|
* @param {sap.suite.ui.generic.template.lib.AppComponent} oAppComponent The AppComponent instance
|
|
3088
3166
|
* @public
|
|
3089
3167
|
* @extends sap.ui.base.Object
|
|
3090
|
-
* @version 1.
|
|
3168
|
+
* @version 1.129.1
|
|
3091
3169
|
* @since 1.30.0
|
|
3092
3170
|
* @alias sap.suite.ui.generic.template.lib.NavigationController
|
|
3093
3171
|
*/
|
package/src/sap/suite/ui/generic/template/listTemplates/fragments/DetailSmartTable.fragment.xml
CHANGED
|
@@ -256,7 +256,9 @@
|
|
|
256
256
|
</ColumnListItem>
|
|
257
257
|
</items>
|
|
258
258
|
<contextMenu>
|
|
259
|
-
<
|
|
259
|
+
<template:with path="entitySet>" var="listEntitySet">
|
|
260
|
+
<core:Fragment fragmentName="sap.suite.ui.generic.template.fragments.SmartControlContextMenu" type="XML"/>
|
|
261
|
+
</template:with>
|
|
260
262
|
</contextMenu>
|
|
261
263
|
<dependents>
|
|
262
264
|
<plugins.ContextMenuSetting scope="Selection"/>
|
|
@@ -13,13 +13,34 @@ sap.ui.define([
|
|
|
13
13
|
* @private
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
+
/**
|
|
17
|
+
* @typedef {Object} ChangeContent
|
|
18
|
+
*
|
|
19
|
+
* @property {object} parentPage - The parent page details
|
|
20
|
+
* @property {string} parentPage.component - The source page component where the new page will be added
|
|
21
|
+
* @property {string} parentPage.entitySet - The source page entityset name where the new page will be added
|
|
22
|
+
*
|
|
23
|
+
* @property {object} entityPropertyChange - The details of the configuration to be changed
|
|
24
|
+
* @property {string} entityPropertyChange.propertyPath - The property path where the change has to be added
|
|
25
|
+
* @property {string} entityPropertyChange.operation - The operation type
|
|
26
|
+
* @property {object} entityPropertyChange.propertyValue - The property details that has to be modified
|
|
27
|
+
*
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* @typedef {Object} Change
|
|
32
|
+
* @property {string} changeType - The app descriptor change type name
|
|
33
|
+
* @property {string} layer - The target layer, can have values "CUSTOMER", "CUSTOMER_BASE", "PARTNER" or "VENDOR"
|
|
34
|
+
* @property {() => ChangeContent} getContent - The content of the change
|
|
35
|
+
*/
|
|
36
|
+
var GLOBAL_MANIFEST_CHANGE_COMPONENT = "sap.suite.ui.generic.template";
|
|
16
37
|
var changePageConfiguration = {
|
|
17
38
|
/**
|
|
18
39
|
* @param {object} oManifest - Contains the existing Manifest of the application
|
|
19
|
-
* @param {
|
|
40
|
+
* @param {Change} oChange - Contains the setting changes that the user wants to add to the oManifest
|
|
20
41
|
* The oChange for changePageConfiguration should have the following structure:
|
|
21
|
-
*
|
|
22
|
-
*
|
|
42
|
+
* @example
|
|
43
|
+
* {
|
|
23
44
|
* "changeType": "appdescr_ui_generic_app_changePageConfiguration", // the app descriptor change type name
|
|
24
45
|
* "layer": Layer.CUSTOMER, // The target layer, can have values "CUSTOMER" , "CUSTOMER_BASE", "PARTNER" or "VENDOR"
|
|
25
46
|
* "content": {
|
|
@@ -28,7 +49,7 @@ sap.ui.define([
|
|
|
28
49
|
* "entitySet": "C_STTA_SalesOrder_WD_20" // source page entityset name where the new page will be added
|
|
29
50
|
* },
|
|
30
51
|
* "entityPropertyChange": { // details of the configuration to be changed
|
|
31
|
-
* "propertyPath": "component/settings", // property
|
|
52
|
+
* "propertyPath": "component/settings", // property path where the change has to be added
|
|
32
53
|
* "operation": "UPSERT", // operation type
|
|
33
54
|
* "propertyValue": { // contains the property details that has to be modified
|
|
34
55
|
* "tableType": "ResponsiveTable"
|
|
@@ -36,6 +57,25 @@ sap.ui.define([
|
|
|
36
57
|
* }
|
|
37
58
|
* }
|
|
38
59
|
* }
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* {
|
|
63
|
+
* "changeType": "appdescr_ui_generic_app_changePageConfiguration", // the app descriptor change type name
|
|
64
|
+
* "layer": Layer.VENDOR, // The target layer, can have values "CUSTOMER" , "CUSTOMER_BASE", "PARTNER" or "VENDOR"
|
|
65
|
+
* "content": {
|
|
66
|
+
* "parentPage" : { // source page details
|
|
67
|
+
* "component": "sap.suite.ui.generic.template", // This is the global manifest change
|
|
68
|
+
* },
|
|
69
|
+
* "entityPropertyChange": { // details of the configuration to be changed
|
|
70
|
+
* "propertyPath": "settings", // property path where the change has to be added
|
|
71
|
+
* "operation": "UPSERT", // operation type
|
|
72
|
+
* "propertyValue": { // contains the property details that has to be modified
|
|
73
|
+
* "statePreservationMode": "persistence"
|
|
74
|
+
* }
|
|
75
|
+
* }
|
|
76
|
+
* }
|
|
77
|
+
* }
|
|
78
|
+
*
|
|
39
79
|
* @returns {object} the updated oManifest containing the oChange settings
|
|
40
80
|
* @protected
|
|
41
81
|
*/
|
|
@@ -45,9 +85,13 @@ sap.ui.define([
|
|
|
45
85
|
MergerUtil.consistencyCheck(oChangeContent, "MODIFY");
|
|
46
86
|
var sParentEntitySet = oChangeContent.parentPage.entitySet;
|
|
47
87
|
var sParentComponent = oChangeContent.parentPage.component;
|
|
48
|
-
var oPageStructure
|
|
88
|
+
var oPageStructure;
|
|
89
|
+
if (sParentComponent === GLOBAL_MANIFEST_CHANGE_COMPONENT) {
|
|
90
|
+
oPageStructure = oManifest["sap.ui.generic.app"];
|
|
91
|
+
} else {
|
|
92
|
+
oPageStructure = MergerUtil.iterateAndFind(oManifest["sap.ui.generic.app"], sParentEntitySet, sParentComponent);
|
|
93
|
+
}
|
|
49
94
|
var oPropertyChange = oChangeContent.entityPropertyChange;
|
|
50
|
-
|
|
51
95
|
var aPropertyKeys = Object.keys(oPropertyChange.propertyValue);
|
|
52
96
|
aPropertyKeys.forEach(function(sCurrentKey) {
|
|
53
97
|
var aPropertyPath = oPropertyChange.propertyPath.split("/");
|
|
@@ -9,6 +9,7 @@ sap.ui.define([
|
|
|
9
9
|
* This class holds the helper functions that are invoked from the manifestMergers
|
|
10
10
|
* @private
|
|
11
11
|
*/
|
|
12
|
+
var GLOBAL_MANIFEST_CHANGE_COMPONENT = "sap.suite.ui.generic.template";
|
|
12
13
|
var mergerUtil = {
|
|
13
14
|
|
|
14
15
|
/**
|
|
@@ -74,12 +75,12 @@ sap.ui.define([
|
|
|
74
75
|
if (!oChangeContent["parentPage"]) {
|
|
75
76
|
throw new Error("Mandatory 'parentPage' parameter is not provided.");
|
|
76
77
|
}
|
|
77
|
-
if (!oChangeContent.parentPage.entitySet) {
|
|
78
|
-
throw new Error("Mandatory 'parentPage.entitySet' parameter is not provided.");
|
|
79
|
-
}
|
|
80
78
|
if (!oChangeContent.parentPage.component) {
|
|
81
79
|
throw new Error("Mandatory 'parentPage.component' parameter is not provided.");
|
|
82
80
|
}
|
|
81
|
+
if (!oChangeContent.parentPage.entitySet && oChangeContent.parentPage.component !== GLOBAL_MANIFEST_CHANGE_COMPONENT) {
|
|
82
|
+
throw new Error("Mandatory 'parentPage.entitySet' parameter is not provided.");
|
|
83
|
+
}
|
|
83
84
|
if (sMergerType === "ADD") {
|
|
84
85
|
|
|
85
86
|
if (!oChangeContent.childPage.id) {
|
|
@@ -389,3 +389,7 @@ html[dir="rtl"] .sapSmartTemplatesObjectPage .sapSmartTemplatesObjectPageSubSect
|
|
|
389
389
|
.sapSmartTemplatesObjectPageHeaderFormObjectStatus{
|
|
390
390
|
line-height: 1.320rem !important;
|
|
391
391
|
}
|
|
392
|
+
|
|
393
|
+
.sapSmartTemplatesObjectPageHeaderFormField .sapMObjStatusText {
|
|
394
|
+
line-height: 1.320rem !important;
|
|
395
|
+
}
|