@sapui5/sap.suite.ui.generic.template 1.150.1 → 1.151.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/control/visualfilterbar/SmartVisualFilterBar.js +1 -1
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_en_US_sappsd.properties +17 -9
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_en_US_saptrc.properties +113 -105
- 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/AnnotationHelperSmartList.js +1 -1
- package/src/sap/suite/ui/generic/template/ListReport/controller/ControllerImplementation.js +0 -6
- package/src/sap/suite/ui/generic/template/ListReport/controller/IappStateHandler.js +9 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_en_US_sappsd.properties +8 -5
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_en_US_saptrc.properties +61 -58
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_fr.properties +1 -1
- package/src/sap/suite/ui/generic/template/ListReport/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/ObjectPage/controller/ControllerImplementation.js +3 -1
- package/src/sap/suite/ui/generic/template/ObjectPage/controller/RelatedAppsHandler.js +1 -1
- package/src/sap/suite/ui/generic/template/ObjectPage/controller/inlineCreationRows/InlineCreationRowsHelper.js +10 -7
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_de.properties +4 -4
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_en.properties +1 -1
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_en_US_sappsd.properties +53 -9
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_en_US_saprigi.properties +1 -1
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_en_US_saptrc.properties +143 -95
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_fr.properties +3 -3
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_no.properties +1 -1
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_ro.properties +1 -1
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_ru.properties +1 -1
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_sl.properties +1 -1
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_sv.properties +1 -1
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_uk.properties +1 -1
- package/src/sap/suite/ui/generic/template/ObjectPage/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/QuickCreate/i18n/i18n_en_US_saptrc.properties +14 -14
- package/src/sap/suite/ui/generic/template/QuickCreate/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/QuickView/i18n/i18n_en_US_saptrc.properties +2 -2
- package/src/sap/suite/ui/generic/template/QuickView/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/detailTemplates/i18n/i18n_en_US_saptrc.properties +6 -6
- package/src/sap/suite/ui/generic/template/fragments/AnalyticalTableColumns.fragment.xml +0 -10
- package/src/sap/suite/ui/generic/template/fragments/EasyFilter.fragment.xml +0 -2
- package/src/sap/suite/ui/generic/template/fragments/GridTableColumns.fragment.xml +5 -2
- package/src/sap/suite/ui/generic/template/fragments/TreeTableColumns.fragment.xml +5 -2
- package/src/sap/suite/ui/generic/template/genericUtilities/controlHelper.js +10 -1
- package/src/sap/suite/ui/generic/template/genericUtilities/controlStateWrapperFactory/SmartFilterBarWrapper.js +40 -28
- package/src/sap/suite/ui/generic/template/genericUtilities/controlStateWrapperFactory/SmartTableChartCommon.js +10 -0
- package/src/sap/suite/ui/generic/template/lib/AppComponent.js +3 -1
- package/src/sap/suite/ui/generic/template/lib/Application.js +28 -2
- package/src/sap/suite/ui/generic/template/lib/CRUDManager.js +5 -24
- package/src/sap/suite/ui/generic/template/lib/CommonEventHandlers.js +47 -10
- package/src/sap/suite/ui/generic/template/lib/CommonUtils.js +17 -9
- package/src/sap/suite/ui/generic/template/lib/PageLeaveHandler.js +19 -14
- package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/fragments/EasyFillDialog.fragment.xml +0 -1
- package/src/sap/suite/ui/generic/template/lib/ai/EasyFilterBarHandler.js +148 -51
- package/src/sap/suite/ui/generic/template/lib/ai/EasyFilterDataFetcherHelper.js +1 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_en_US_sappsd.properties +275 -14
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_en_US_saptrc.properties +392 -163
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sl.properties +6 -6
- package/src/sap/suite/ui/generic/template/lib/navigation/NavigationController.js +1 -1
- package/src/sap/suite/ui/generic/template/lib/presentationControl/SmartTableHandler.js +13 -13
- package/src/sap/suite/ui/generic/template/library.js +1 -1
- package/src/sap/suite/ui/generic/template/listTemplates/controller/IappStateHandler.js +12 -3
- package/src/sap/suite/ui/generic/template/listTemplates/i18n/i18n_en_US_saptrc.properties +1 -1
|
@@ -28,6 +28,12 @@ sap.ui.define([
|
|
|
28
28
|
var oSmartFilterBar = oControl;
|
|
29
29
|
var oEasyFilterCallbacks = null;
|
|
30
30
|
var oPendingEasyFilterState = null;
|
|
31
|
+
// Holds SVM callbacks once setSVMWrapperCallbacks is called. The afterVariantLoad handler
|
|
32
|
+
// is attached eagerly (in fnInitialize) so it fires even when setSVMWrapperCallbacks has
|
|
33
|
+
// not yet been called (race condition on second navigation: bAllControlsInitialized=true
|
|
34
|
+
// causes fnApplyVariantState to run synchronously, triggering afterVariantLoad before the
|
|
35
|
+
// Promise.all in SmartVariantManagementWrapper resolves and calls setSVMWrapperCallbacks).
|
|
36
|
+
var oSVMWrapperCallbacks = null;
|
|
31
37
|
|
|
32
38
|
var oVariantManagementInitializedPromise;
|
|
33
39
|
|
|
@@ -42,34 +48,11 @@ sap.ui.define([
|
|
|
42
48
|
|
|
43
49
|
// Initialize variant management promise
|
|
44
50
|
oVariantManagementInitializedPromise = oSmartFilterBar.getInitializedPromise();
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
// Attach to variantFetch and variantLoad events to be able to store and restore also custom filters and state of other controls (in case of page VM) with variant.
|
|
48
|
-
// Events for storing/restoring are provided by SFB, data to be stored/restored can come from 3 sources:
|
|
49
|
-
// - standard filters: handled directly by SFB
|
|
50
|
-
// - extension filters: provided from mParams.oCustomFiltersWrapper
|
|
51
|
-
// - other controls being part of VM: provided by oSVMWrapperCallbacks (controls with direct connection to VM are skipped in SVM wrapper)
|
|
52
|
-
function setSVMWrapperCallbacks(oSVMWrapperCallbacks){
|
|
53
|
-
// Before saving the current state as a new variant, we need to provide all state data of controls controlled by VM, but not known to it with setCustomFilterData. From a
|
|
54
|
-
// logical point of view, the event (beforeVariantFetch) as well as the method to store the extension data (setCustomFilterData) belong to SVM, but both are implemented
|
|
55
|
-
// in SFB. Additionally, beforeVariantSave would actually be the name more logical to the consumer, however that name had been used earlier and was deprecated and
|
|
56
|
-
// replaced by the given one. Fetch actually does not mean to fetch variant content from the place variants are stored, but to get the current state from the controls!
|
|
57
|
-
oSmartFilterBar.attachBeforeVariantFetch(function(){
|
|
58
|
-
var oCustomData = Object.create(null);
|
|
59
|
-
oCustomData[dataPropertyNameGeneric] = oSVMWrapperCallbacks.getManagedControlStates();
|
|
60
|
-
oCustomData[dataPropertyNameGeneric].customFilters = mParams.oCustomFiltersWrapper.getState();
|
|
61
|
-
if (oEasyFilterCallbacks) {
|
|
62
|
-
var oEFState = oEasyFilterCallbacks.getState();
|
|
63
|
-
oCustomData[dataPropertyNameGeneric].filterMode = oEFState.filterMode;
|
|
64
|
-
oCustomData[dataPropertyNameGeneric].easyFilter = oEFState.easyFilter;
|
|
65
|
-
}
|
|
66
|
-
oSmartFilterBar.setCustomFilterData(oCustomData);
|
|
67
|
-
});
|
|
68
51
|
|
|
69
|
-
//
|
|
70
|
-
//
|
|
71
|
-
//
|
|
72
|
-
//
|
|
52
|
+
// Attach afterVariantLoad eagerly so custom filter state is restored regardless of
|
|
53
|
+
// when setSVMWrapperCallbacks is called. setManagedControlStates is only called if
|
|
54
|
+
// SVM callbacks are already available; otherwise those controls are restored via the
|
|
55
|
+
// iAppState path (SmartVariantManagementWrapper.fnSetManagedControlStates).
|
|
73
56
|
oSmartFilterBar.attachAfterVariantLoad(function(){
|
|
74
57
|
var oCustomData = oSmartFilterBar.getCustomFilterData();
|
|
75
58
|
var oGenericData;
|
|
@@ -102,7 +85,9 @@ sap.ui.define([
|
|
|
102
85
|
};
|
|
103
86
|
aBasicFilters = oSmartFilterBar.getAllFilterItems(true);
|
|
104
87
|
mParams.oCustomFiltersWrapper.setState(oCustomFiltersState);
|
|
105
|
-
oSVMWrapperCallbacks
|
|
88
|
+
if (oSVMWrapperCallbacks) {
|
|
89
|
+
oSVMWrapperCallbacks.setManagedControlStates(oGenericData);
|
|
90
|
+
}
|
|
106
91
|
if (oEasyFilterCallbacks) {
|
|
107
92
|
oEasyFilterCallbacks.setState({
|
|
108
93
|
filterMode: oGenericData.filterMode,
|
|
@@ -115,7 +100,34 @@ sap.ui.define([
|
|
|
115
100
|
};
|
|
116
101
|
}
|
|
117
102
|
});
|
|
103
|
+
}
|
|
118
104
|
|
|
105
|
+
// When a variant is loaded, correspondingly we have to get the customData and apply the states to the controls not known to SVM. Again, event and method are implemented
|
|
106
|
+
// in SFB instead of SVM where it would make more sense.
|
|
107
|
+
// Here the event is afterVariantLoad, as the variant content known to SVM/SFB has first to be applied to the SFB, which will also pass the custom data accordingly. Only
|
|
108
|
+
// after this has happened, we can get the custom data from SFB.
|
|
109
|
+
// Attach to variantFetch and variantLoad events to be able to store and restore also custom filters and state of other controls (in case of page VM) with variant.
|
|
110
|
+
// Events for storing/restoring are provided by SFB, data to be stored/restored can come from 3 sources:
|
|
111
|
+
// - standard filters: handled directly by SFB
|
|
112
|
+
// - extension filters: provided from mParams.oCustomFiltersWrapper
|
|
113
|
+
// - other controls being part of VM: provided by oSVMWrapperCallbacks (controls with direct connection to VM are skipped in SVM wrapper)
|
|
114
|
+
function setSVMWrapperCallbacks(oCallbacks){
|
|
115
|
+
oSVMWrapperCallbacks = oCallbacks;
|
|
116
|
+
// Before saving the current state as a new variant, we need to provide all state data of controls controlled by VM, but not known to it with setCustomFilterData. From a
|
|
117
|
+
// logical point of view, the event (beforeVariantFetch) as well as the method to store the extension data (setCustomFilterData) belong to SVM, but both are implemented
|
|
118
|
+
// in SFB. Additionally, beforeVariantSave would actually be the name more logical to the consumer, however that name had been used earlier and was deprecated and
|
|
119
|
+
// replaced by the given one. Fetch actually does not mean to fetch variant content from the place variants are stored, but to get the current state from the controls!
|
|
120
|
+
oSmartFilterBar.attachBeforeVariantFetch(function(){
|
|
121
|
+
var oCustomData = Object.create(null);
|
|
122
|
+
oCustomData[dataPropertyNameGeneric] = oSVMWrapperCallbacks.getManagedControlStates();
|
|
123
|
+
oCustomData[dataPropertyNameGeneric].customFilters = mParams.oCustomFiltersWrapper.getState();
|
|
124
|
+
if (oEasyFilterCallbacks) {
|
|
125
|
+
var oEFState = oEasyFilterCallbacks.getState();
|
|
126
|
+
oCustomData[dataPropertyNameGeneric].filterMode = oEFState.filterMode;
|
|
127
|
+
oCustomData[dataPropertyNameGeneric].easyFilter = oEFState.easyFilter;
|
|
128
|
+
}
|
|
129
|
+
oSmartFilterBar.setCustomFilterData(oCustomData);
|
|
130
|
+
});
|
|
119
131
|
}
|
|
120
132
|
|
|
121
133
|
function fnGetState() {
|
|
@@ -49,6 +49,12 @@ sap.ui.define([
|
|
|
49
49
|
function getControlWrapper(oControl) {
|
|
50
50
|
var bIsApplying = false; // avoid forwarding change event when caused by us applying a state
|
|
51
51
|
function fnGetState() {
|
|
52
|
+
// getCurrentState can iterate a managed control whose view was already torn down (e.g. navigation
|
|
53
|
+
// while an appState write is in flight). Reading state from a destroyed control crashes in
|
|
54
|
+
// getUiState() because its inner aggregation is gone, so skip it.
|
|
55
|
+
if (oControl.isDestroyed()) {
|
|
56
|
+
return undefined;
|
|
57
|
+
}
|
|
52
58
|
var oControlUiState = oControl.getUiState(); // unfortunately not serializable, but a managed object
|
|
53
59
|
var oStateUiState = {
|
|
54
60
|
oPresentationVariant: oControlUiState.getPresentationVariant(),
|
|
@@ -66,6 +72,10 @@ sap.ui.define([
|
|
|
66
72
|
}
|
|
67
73
|
|
|
68
74
|
function fnSetState(oState) {
|
|
75
|
+
// Symmetric to fnGetState: never apply state to a destroyed control.
|
|
76
|
+
if (oControl.isDestroyed()) {
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
69
79
|
if (oState) {
|
|
70
80
|
if (!oState.oUiState) {
|
|
71
81
|
// Legacy handling for state without additional level oUiState (created with 1.99.0 - 1.99.3). Could be relevant on LR and OP, and independent of VM
|
|
@@ -661,6 +661,7 @@ sap.ui.define([
|
|
|
661
661
|
|
|
662
662
|
function restore(){
|
|
663
663
|
oTemplateContract.oBusyHelper.setBusyReason("exiting", false);
|
|
664
|
+
oTemplateContract.oApplicationProxy.resetExternalNavigation();
|
|
664
665
|
for (var sComponentId in oTemplateContract.componentRegistry){
|
|
665
666
|
var oRegistryEntry = oTemplateContract.componentRegistry[sComponentId];
|
|
666
667
|
if (oRegistryEntry.methods.onRestore) {
|
|
@@ -942,6 +943,7 @@ sap.ui.define([
|
|
|
942
943
|
var fnNormalizePagesMapToArray = testableHelper.testable(fnNormalizePagesMapToArray, "fnNormalizePagesMapToArray");
|
|
943
944
|
getConfig = testableHelper.testable(getConfig, "getConfig");
|
|
944
945
|
testableHelper.testable(setLeaveAppPromise, "AppComponent_setLeaveAppPromise");
|
|
946
|
+
testableHelper.testable(restore, "AppComponent_restore");
|
|
945
947
|
/* eslint-enable */
|
|
946
948
|
|
|
947
949
|
return oMethods;
|
|
@@ -959,7 +961,7 @@ sap.ui.define([
|
|
|
959
961
|
* @public
|
|
960
962
|
* @extends sap.ui.core.UIComponent
|
|
961
963
|
* @author SAP SE
|
|
962
|
-
* @version 1.
|
|
964
|
+
* @version 1.151.1
|
|
963
965
|
* @name sap.suite.ui.generic.template.lib.AppComponent
|
|
964
966
|
*/
|
|
965
967
|
var oAppComponent = UIComponent.extend("sap.suite.ui.generic.template.lib.AppComponent", {
|
|
@@ -82,6 +82,11 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
82
82
|
*/
|
|
83
83
|
function getMethods(oTemplateContract) {
|
|
84
84
|
|
|
85
|
+
// Set on first fnNavigateExternal call; blocks re-entry until reset. NavigationHandler.navigate() calls fnOnError
|
|
86
|
+
// on all failure paths and does not call it on the success path (app is leaving). The two valid reset points are
|
|
87
|
+
// therefore fnOnErrorWrapper (navigation failed) and AppComponent.restore() (FLP re-activated this app).
|
|
88
|
+
var bExternalNavigationTriggered = false;
|
|
89
|
+
|
|
85
90
|
var oFocusHelper = new FocusHelper(oTemplateContract);
|
|
86
91
|
var oContextBookkeeping = new ContextBookkeeping(oTemplateContract);
|
|
87
92
|
var mEntitySetToETagInfo = Object.create(null); // maps the name of the entity sets which have been already checked for eTag
|
|
@@ -671,8 +676,13 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
671
676
|
if (oCurrentNavigationHandler === GHOSTNAVIGATIONHANDLER){
|
|
672
677
|
return;
|
|
673
678
|
}
|
|
679
|
+
if (bExternalNavigationTriggered){
|
|
680
|
+
return;
|
|
681
|
+
}
|
|
682
|
+
bExternalNavigationTriggered = true;
|
|
674
683
|
oTemplateContract.oNavigationControllerProxy.leave();
|
|
675
|
-
var fnOnErrorWrapper = function(){
|
|
684
|
+
var fnOnErrorWrapper = function () {
|
|
685
|
+
bExternalNavigationTriggered = false;
|
|
676
686
|
oFocusHelper.setNextFocus(Function.prototype); // Do not change focus in case exiting the application fails
|
|
677
687
|
oTemplateContract.oBusyHelper.setBusyReason("exiting", false); // in error case we are not navigating away
|
|
678
688
|
if (fnOnError){
|
|
@@ -800,6 +810,18 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
800
810
|
return oTemplateContract.oNavigationControllerProxy.preloadComponent(sRouteName);
|
|
801
811
|
}
|
|
802
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
|
+
|
|
803
825
|
oTemplateContract.oApplicationProxy = { // inject own api for AppComponent into the Template Contract. Other classes (NavigationController, BusyHelper) will call these functions accordingly.
|
|
804
826
|
createDraftSiblingPromise: oContextBookkeeping.createDraftSiblingPromise,
|
|
805
827
|
getDraftSiblingPromise: oContextBookkeeping.getDraftSiblingPromise,
|
|
@@ -834,7 +856,10 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
834
856
|
removeTransientMessages: fnRemoveTransientMessages,
|
|
835
857
|
getTransientMessages: getTransientMessages,
|
|
836
858
|
setNextFocus: oFocusHelper.setNextFocus,
|
|
837
|
-
setStates: setStates
|
|
859
|
+
setStates: setStates,
|
|
860
|
+
resetExternalNavigation: function() {
|
|
861
|
+
bExternalNavigationTriggered = false;
|
|
862
|
+
}
|
|
838
863
|
};
|
|
839
864
|
|
|
840
865
|
return {
|
|
@@ -903,6 +928,7 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
903
928
|
mustRequireRequestsCanonical: mustRequireRequestsCanonical,
|
|
904
929
|
getNavigationHandler: getNavigationHandler,
|
|
905
930
|
navigateExternal: fnNavigateExternal,
|
|
931
|
+
isExplaceNavigation: fnIsExplaceNavigation,
|
|
906
932
|
getStatePreservationMode: getStatePreservationMode,
|
|
907
933
|
setObjectInEditMode: fnSetObjectInEditMode,
|
|
908
934
|
getObjectInEditMode: fnGetObjectInEditMode,
|
|
@@ -541,13 +541,7 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
541
541
|
var aMessagesBeforeSave = CRUDHelper.fnGetMessagesFromContextFilter(oContextFilter, oMessageManager, true);
|
|
542
542
|
var mMessagesBeforeSave = Object.create(null);
|
|
543
543
|
aMessagesBeforeSave.forEach(function(oMessage){
|
|
544
|
-
|
|
545
|
-
// Including them causes false-positive deduplication on retry: the new 412 produces
|
|
546
|
-
// the same message IDs, they are filtered out of aNewMessages, and fnHandleWarning
|
|
547
|
-
// is never called.
|
|
548
|
-
if (oMessage.persistent !== false) {
|
|
549
|
-
mMessagesBeforeSave[oMessage.getId()] = oMessage;
|
|
550
|
-
}
|
|
544
|
+
mMessagesBeforeSave[oMessage.getId()] = oMessage;
|
|
551
545
|
});
|
|
552
546
|
|
|
553
547
|
// Handles the 412 Warning case.
|
|
@@ -570,23 +564,10 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
570
564
|
var aMessagesAfterSave = CRUDHelper.fnGetMessagesFromContextFilter(oContextFilter, oMessageManager, true);
|
|
571
565
|
var aAllMessages = aMessagesAfterSave.map(function(oMessage){
|
|
572
566
|
if (!mMessagesBeforeSave[oMessage.getId()]) { // if this is a new message
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
var oNewMessage = new Message({
|
|
578
|
-
message: oMessage.getMessage(),
|
|
579
|
-
type: oMessage.getType(),
|
|
580
|
-
target: oMessage.getTargets ? oMessage.getTargets() : [oMessage.getTarget()],
|
|
581
|
-
processor: oMessage.getMessageProcessor(),
|
|
582
|
-
persistent: false,
|
|
583
|
-
technical: false,
|
|
584
|
-
code: oMessage.getCode(),
|
|
585
|
-
description: oMessage.getDescription(),
|
|
586
|
-
technicalDetails: oMessage.getTechnicalDetails()
|
|
587
|
-
});
|
|
588
|
-
bWarningOccured = bWarningOccured || oNewMessage.technicalDetails.statusCode === "412" && oNewMessage.technicalDetails.headers["preference-applied"] === "handling=strict";
|
|
589
|
-
aNewMessages.push(oNewMessage);
|
|
567
|
+
oMessage.persistent = false;
|
|
568
|
+
oMessage.technical = false;
|
|
569
|
+
bWarningOccured = bWarningOccured || oMessage.technicalDetails.statusCode === "412" && oMessage.technicalDetails.headers["preference-applied"] === "handling=strict";
|
|
570
|
+
aNewMessages.push(oMessage);
|
|
590
571
|
}
|
|
591
572
|
return oMessage;
|
|
592
573
|
});
|
|
@@ -720,7 +720,16 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
720
720
|
}
|
|
721
721
|
|
|
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
|
+
// getNavigationHandler() returns a ghost stub (no .navigate) when ghostapp=true — guard before calling.
|
|
725
|
+
if (oServices.oApplication.isExplaceNavigation(oOutbound.parameters)) {
|
|
726
|
+
var oNavHandler = oServices.oApplication.getNavigationHandler();
|
|
727
|
+
if (oNavHandler.navigate) {
|
|
728
|
+
oNavHandler.navigate(oOutbound.semanticObject, oOutbound.action, oSelectionVariant.toJSONString(), null, oCommonUtils.handleError, null, "explace");
|
|
729
|
+
}
|
|
730
|
+
} else {
|
|
731
|
+
oServices.oApplication.navigateExternal(oOutbound.semanticObject, oOutbound.action, oSelectionVariant.toJSONString(), null, oCommonUtils.handleError);
|
|
732
|
+
}
|
|
724
733
|
}
|
|
725
734
|
|
|
726
735
|
function fnNavigateIntentSmartLink(oOutbound, oEventSource) {
|
|
@@ -733,7 +742,15 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
733
742
|
oCommonUtils.removePropertiesFromNavigationContext(oSelectionVariant, oEventSource);
|
|
734
743
|
oController.adaptNavigationParameterExtension(oSelectionVariant, oObjectInfo);
|
|
735
744
|
oCommonUtils.setComponentRefreshBehaviour(oOutbound);
|
|
736
|
-
|
|
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
|
+
}
|
|
737
754
|
}
|
|
738
755
|
|
|
739
756
|
function fnHideTitleArea(oSmLiContent,aContactTitleArea) {
|
|
@@ -803,9 +820,10 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
803
820
|
|
|
804
821
|
function fnOnSemanticObjectLinkNavigationPressed(oEventSource, oEventParameters){
|
|
805
822
|
var oEventObject = deepExtend({}, oEventSource);
|
|
823
|
+
var sSemanticObject = oEventObject.data('SemanticObject');
|
|
824
|
+
var sAction = oEventObject.data('Action');
|
|
825
|
+
var oTarget = (sSemanticObject && sAction) ? { semanticObject: sSemanticObject, action: sAction } : undefined;
|
|
806
826
|
oCommonUtils.fnProcessDataLossOrDraftDiscardConfirmation(function() {
|
|
807
|
-
var sSemanticObject = oEventObject.data('SemanticObject');
|
|
808
|
-
var sAction = oEventObject.data('Action');
|
|
809
827
|
var sSemanticAttributes = oEventObject.data('SemanticAttributes');
|
|
810
828
|
if (sSemanticObject && sAction){
|
|
811
829
|
var oOutbound = {
|
|
@@ -818,7 +836,7 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
818
836
|
}
|
|
819
837
|
fnNavigateIntentSmartLink(oOutbound, oEventObject);
|
|
820
838
|
}
|
|
821
|
-
}, Function.prototype, "LeaveApp");
|
|
839
|
+
}, Function.prototype, "LeaveApp", false, oTarget);
|
|
822
840
|
}
|
|
823
841
|
|
|
824
842
|
function fnOnSemanticObjectLinkNavigationTargetObtained(sEntitySet, mFieldSemanticObjects, oEventParameters, oState, sTitle) {
|
|
@@ -1105,8 +1123,15 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
1105
1123
|
// The value "sEntitySet" holds the entity set of an object page or a table.
|
|
1106
1124
|
//
|
|
1107
1125
|
// Sometimes, the SmartLink is located on a field group which belongs to the child entity set of object page.
|
|
1108
|
-
// So, we
|
|
1126
|
+
// So, we try to derive the entity type from the SmartLink's binding context.
|
|
1109
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
|
+
}
|
|
1110
1135
|
var oField = oEntityType.property.find(function (oProperty) { return oProperty.name === sSourceClickedField; });
|
|
1111
1136
|
var sTextArrangement = "descriptionAndId";
|
|
1112
1137
|
if (oField) { // TODO: Need to provide the correct field Object using the entityType and corresponding association (should be handled by a BLI)
|
|
@@ -1988,6 +2013,7 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
1988
2013
|
var oContext = oEventSource.getParent().getBindingContext();
|
|
1989
2014
|
var sSemanticObject = oEventSource.data("SemanticObject");
|
|
1990
2015
|
var sAction = oEventSource.data("Action");
|
|
2016
|
+
var oTarget = { semanticObject: sSemanticObject, action: sAction };
|
|
1991
2017
|
|
|
1992
2018
|
oCommonUtils.fnProcessDataLossOrDraftDiscardConfirmation(function() {
|
|
1993
2019
|
var oOutbound = {
|
|
@@ -1995,7 +2021,7 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
1995
2021
|
semanticObject: sSemanticObject
|
|
1996
2022
|
};
|
|
1997
2023
|
fnNavigateIntent(oOutbound, [oContext], oState.oSmartFilterbar || undefined);
|
|
1998
|
-
}, Function.prototype, "LeaveApp");
|
|
2024
|
+
}, Function.prototype, "LeaveApp", false, oTarget);
|
|
1999
2025
|
}
|
|
2000
2026
|
|
|
2001
2027
|
/*
|
|
@@ -2025,13 +2051,15 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
2025
2051
|
if (bRequiresContext && !aSelectedContexts.length) { // not consistent, since contexts missing
|
|
2026
2052
|
fnShowMessageForInvalidNumberOfSelects(aSelectedContexts.length);
|
|
2027
2053
|
} else {
|
|
2054
|
+
var oTarget = { semanticObject: oCustomData.SemanticObject, action: oCustomData.Action };
|
|
2028
2055
|
oCommonUtils.fnProcessDataLossOrDraftDiscardConfirmation(function () {
|
|
2029
2056
|
onDataFieldForIntentBasedNavigationSelectedContext(oCustomData, aSelectedContexts, oSmartFilterbar);
|
|
2030
|
-
}, Function.prototype, "LeaveApp");
|
|
2057
|
+
}, Function.prototype, "LeaveApp", false, oTarget);
|
|
2031
2058
|
}
|
|
2032
2059
|
}
|
|
2033
2060
|
|
|
2034
2061
|
function onInlineDataFieldForIntentBasedNavigation(oEventSource, oState){
|
|
2062
|
+
var oTarget = { semanticObject: oEventSource.data("SemanticObject"), action: oEventSource.data("Action") };
|
|
2035
2063
|
oCommonUtils.fnProcessDataLossOrDraftDiscardConfirmation(function() {
|
|
2036
2064
|
var oOutbound = {
|
|
2037
2065
|
semanticObject: oEventSource.data("SemanticObject"),
|
|
@@ -2039,7 +2067,7 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
2039
2067
|
};
|
|
2040
2068
|
var oContext = oEventSource.getParent().getBindingContext();
|
|
2041
2069
|
fnNavigateIntent(oOutbound, [oContext], oState.oSmartFilterbar);
|
|
2042
|
-
}, Function.prototype, "LeaveApp");
|
|
2070
|
+
}, Function.prototype, "LeaveApp", false, oTarget);
|
|
2043
2071
|
}
|
|
2044
2072
|
|
|
2045
2073
|
function onInlineDataFieldForAction(oEvent) {
|
|
@@ -2709,7 +2737,16 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
2709
2737
|
var oSelectionVariant = fnBuildSelectionVariantForNavigation(oOutbound, [], oContext);
|
|
2710
2738
|
oController.adaptNavigationParameterExtension(oSelectionVariant, oOutbound);
|
|
2711
2739
|
oCommonUtils.setComponentRefreshBehaviour(oOutbound);
|
|
2712
|
-
|
|
2740
|
+
// Explace outbounds must bypass fnNavigateExternal to avoid setting the app busy and consuming the re-entry guard.
|
|
2741
|
+
// getNavigationHandler() returns a ghost stub (no .navigate) when ghostapp=true — guard before calling.
|
|
2742
|
+
if (oServices.oApplication.isExplaceNavigation(oOutbound.parameters)) {
|
|
2743
|
+
var oNavHandler = oServices.oApplication.getNavigationHandler();
|
|
2744
|
+
if (oNavHandler.navigate) {
|
|
2745
|
+
oNavHandler.navigate(oOutbound.semanticObject, oOutbound.action, oSelectionVariant.toJSONString(), null, oCommonUtils.handleError, null, "explace");
|
|
2746
|
+
}
|
|
2747
|
+
} else {
|
|
2748
|
+
oServices.oApplication.navigateExternal(oOutbound.semanticObject, oOutbound.action, oSelectionVariant.toJSONString(), null, oCommonUtils.handleError);
|
|
2749
|
+
}
|
|
2713
2750
|
}
|
|
2714
2751
|
|
|
2715
2752
|
function onSmartFieldInitialise(oEvent,sViewId){
|
|
@@ -835,17 +835,17 @@ 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
|
|
845
845
|
//indicator that the state should not be overwritten
|
|
846
846
|
//if draft enabled then passing NavigateExternal else on back button passing LeavePage
|
|
847
847
|
}
|
|
848
|
-
}, Function.prototype, "LeaveApp");
|
|
848
|
+
}, Function.prototype, "LeaveApp", false, { semanticObject: oOutbound.semanticObject, action: oOutbound.action });
|
|
849
849
|
}
|
|
850
850
|
|
|
851
851
|
function fnGetNavigationKeyProperties(sTargetEntitySet) {
|
|
@@ -1020,7 +1020,6 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
1020
1020
|
var oSelectionVariant, sSelectionVariantPrepared, sParameter, sSemanticObject, aSelVariantPropertyNames, aSelOptionPropertyNames, aParameterNames;
|
|
1021
1021
|
var oEventParameters = oEvent.getParameters();
|
|
1022
1022
|
var oNavigationHandler = oServices.oApplication.getNavigationHandler();
|
|
1023
|
-
var SuppressionBehavior = FENavLibrary.SuppressionBehavior;
|
|
1024
1023
|
// fill oSelectionVariant with the selectOptions from sSelectionVariant
|
|
1025
1024
|
oSelectionVariant = oNavigationHandler.mixAttributesAndSelectionVariant({}, sSelectionVariant);
|
|
1026
1025
|
//Invoke the "beforeSmartLinkPopoverOpensExtension" method to determine whether FE can process the event.
|
|
@@ -1068,7 +1067,16 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
1068
1067
|
}
|
|
1069
1068
|
});
|
|
1070
1069
|
// add the resulting selectOptions and parameters (if any!) in oSelectionVariant with the ones of the semanticObject in oEventParameters as selectOptions to oSelectionVariant
|
|
1071
|
-
|
|
1070
|
+
// Only suppress empty-string properties that are not present in the empty-string semantic object bucket.
|
|
1071
|
+
// Properties in oSemObjEmpty are genuine entity key fields (e.g. MaintenanceOrderSubOperation:"") and must be kept.
|
|
1072
|
+
// Properties absent from oSemObjEmpty but present with "" in the event semantic object are spurious cache-inflated values and must be dropped.
|
|
1073
|
+
var mSemanticAttrsFiltered = Object.assign({}, mSemanticAttributesOfEventSemanticObject);
|
|
1074
|
+
Object.keys(mSemanticAttrsFiltered).forEach(function(sKey) {
|
|
1075
|
+
if (mSemanticAttrsFiltered[sKey] === "" && !(sKey in oSemObjEmpty)) {
|
|
1076
|
+
delete mSemanticAttrsFiltered[sKey];
|
|
1077
|
+
}
|
|
1078
|
+
});
|
|
1079
|
+
oSelectionVariant = oNavigationHandler.mixAttributesAndSelectionVariant(mSemanticAttrsFiltered, oSelectionVariant.toJSONString());
|
|
1072
1080
|
// Remove sensitive data from the context
|
|
1073
1081
|
oSelectionVariant = fnRemovePropertiesFromNavigationContext(oSelectionVariant, oEvent.getSource(), oState);
|
|
1074
1082
|
var oObjectInfo = {
|
|
@@ -1361,10 +1369,10 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
1361
1369
|
// "LeaveApp": leave the app via a forward navigation
|
|
1362
1370
|
// "LeavePage": leave the page via an internal navigation or a backward navigation (which may or may not be internal)
|
|
1363
1371
|
// Note: if sMode is faulty it will be considered as "LeavePage"
|
|
1364
|
-
function fnProcessDataLossOrDraftDiscardConfirmation(fnProcessFunction, fnCancelFunction, sMode, bNoBusyCheck){
|
|
1372
|
+
function fnProcessDataLossOrDraftDiscardConfirmation(fnProcessFunction, fnCancelFunction, sMode, bNoBusyCheck, oTarget){
|
|
1365
1373
|
sMode = sMode || "LeavePage";
|
|
1366
1374
|
if (oComponentUtils.isDraftEnabled()){
|
|
1367
|
-
return oServices.oPageLeaveHandler.performAfterDiscardOrKeepDraft(fnProcessFunction, fnCancelFunction, sMode, bNoBusyCheck, false);
|
|
1375
|
+
return oServices.oPageLeaveHandler.performAfterDiscardOrKeepDraft(fnProcessFunction, fnCancelFunction, sMode, bNoBusyCheck, false, oTarget);
|
|
1368
1376
|
} else {
|
|
1369
1377
|
return oServices.oDataLossHandler.performIfNoDataLoss(fnProcessFunction, fnCancelFunction, sMode, bNoBusyCheck, false);
|
|
1370
1378
|
}
|
|
@@ -22,19 +22,24 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
22
22
|
firstListItemOption.focus();
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
function checkIfNavigationIsExplace() {
|
|
25
|
+
function checkIfNavigationIsExplace(oTarget) {
|
|
26
26
|
var UShellContainer = sap.ui.require("sap/ushell/Container");
|
|
27
27
|
if (!UShellContainer) {
|
|
28
|
-
return Promise.resolve(false);
|
|
28
|
+
return Promise.resolve(false);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
return
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
31
|
+
return new Promise(function(resolve) {
|
|
32
|
+
sap.ui.require(["sap/ushell/api/FioriElements"], function(FioriElements) {
|
|
33
|
+
FioriElements.isExplaceNavigation(oTarget ? { target: oTarget } : undefined)
|
|
34
|
+
.then(function(bExplace) {
|
|
35
|
+
resolve(bExplace);
|
|
36
|
+
})
|
|
37
|
+
.catch(function() {
|
|
38
|
+
resolve(false);
|
|
39
|
+
});
|
|
40
|
+
}, function() {
|
|
41
|
+
resolve(false);
|
|
42
|
+
});
|
|
38
43
|
});
|
|
39
44
|
}
|
|
40
45
|
|
|
@@ -147,7 +152,7 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
147
152
|
return oDiscardPromise;
|
|
148
153
|
}
|
|
149
154
|
|
|
150
|
-
function fnPerformAfterDiscardOrKeepDraftImpl(fnPositive, fnNegative, sMode, bIsTechnical) {
|
|
155
|
+
function fnPerformAfterDiscardOrKeepDraftImpl(fnPositive, fnNegative, sMode, bIsTechnical, oTarget) {
|
|
151
156
|
var sEnableDiscardDraftConfirmation = oTemplateContract.oNavigationControllerProxy.isDiscardDraftConfirmationNeeded();
|
|
152
157
|
var bNeedsPopup = ((sEnableDiscardDraftConfirmation === "always" && sMode.startsWith("Leave")) || (sEnableDiscardDraftConfirmation === "restricted" && sMode === "LeavePage")) && isObjectEditable();
|
|
153
158
|
|
|
@@ -157,7 +162,7 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
157
162
|
}
|
|
158
163
|
|
|
159
164
|
// Check if navigation will be explace and skip popup if so
|
|
160
|
-
checkIfNavigationIsExplace().then(function(bIsExplace) {
|
|
165
|
+
checkIfNavigationIsExplace(oTarget).then(function(bIsExplace) {
|
|
161
166
|
if (bIsExplace) {
|
|
162
167
|
fnPositive(); // Skip popup for explace navigation
|
|
163
168
|
} else {
|
|
@@ -195,7 +200,7 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
195
200
|
}
|
|
196
201
|
|
|
197
202
|
// Parameter sMode has same possible values as fnProcessDataLossOrDraftDiscardConfirmation in CommonUtils
|
|
198
|
-
function fnPerformAfterDiscardOrKeepDraft(fnProcessFunction, fnCancelFunction, sMode, bNoBusyCheck, bIsTechnical) {
|
|
203
|
+
function fnPerformAfterDiscardOrKeepDraft(fnProcessFunction, fnCancelFunction, sMode, bNoBusyCheck, bIsTechnical, oTarget) {
|
|
199
204
|
var oRet = new Promise(function (fnResolve, fnReject) {
|
|
200
205
|
var fnPositive = function () {
|
|
201
206
|
var oRet = fnProcessFunction();
|
|
@@ -206,9 +211,9 @@ sap.ui.define(["sap/ui/base/Object",
|
|
|
206
211
|
fnReject();
|
|
207
212
|
};
|
|
208
213
|
if (bNoBusyCheck) {
|
|
209
|
-
fnPerformAfterDiscardOrKeepDraftImpl(fnPositive, fnNegative, sMode, bIsTechnical);
|
|
214
|
+
fnPerformAfterDiscardOrKeepDraftImpl(fnPositive, fnNegative, sMode, bIsTechnical, oTarget);
|
|
210
215
|
} else {
|
|
211
|
-
oTemplateContract.oApplicationProxy.performAfterSideEffectExecution(fnPerformAfterDiscardOrKeepDraftImpl.bind(null, fnPositive, fnNegative, sMode, bIsTechnical), true);
|
|
216
|
+
oTemplateContract.oApplicationProxy.performAfterSideEffectExecution(fnPerformAfterDiscardOrKeepDraftImpl.bind(null, fnPositive, fnNegative, sMode, bIsTechnical, oTarget), true);
|
|
212
217
|
}
|
|
213
218
|
});
|
|
214
219
|
return oRet;
|