@sapui5/sap.fe.core 1.93.3 → 1.96.2
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 +2 -2
- package/src/sap/fe/core/.library +1 -1
- package/src/sap/fe/core/AppComponent.js +9 -40
- package/src/sap/fe/core/BusyLocker.js +12 -0
- package/src/sap/fe/core/CommonUtils.js +430 -27
- package/src/sap/fe/core/ExtensionAPI.js +1 -1
- package/src/sap/fe/core/PageController.js +13 -2
- package/src/sap/fe/core/TemplateComponent.js +6 -0
- package/src/sap/fe/core/TransactionHelper.js +248 -170
- package/src/sap/fe/core/actions/draft.js +13 -1
- package/src/sap/fe/core/actions/operations.js +165 -45
- package/src/sap/fe/core/controllerextensions/EditFlow.js +56 -37
- package/src/sap/fe/core/controllerextensions/InternalEditFlow.js +13 -6
- package/src/sap/fe/core/controllerextensions/InternalIntentBasedNavigation.js +127 -24
- package/src/sap/fe/core/controllerextensions/InternalRouting.js +183 -164
- package/src/sap/fe/core/controllerextensions/KPIManagement.js +834 -170
- package/src/sap/fe/core/controllerextensions/KPIManagement.ts +890 -189
- package/src/sap/fe/core/controllerextensions/PageReady.js +48 -33
- package/src/sap/fe/core/controllerextensions/PageReady.ts +49 -14
- package/src/sap/fe/core/controllerextensions/Paginator.js +150 -0
- package/src/sap/fe/core/controllerextensions/Placeholder.js +133 -270
- package/src/sap/fe/core/controllerextensions/Share.js +31 -13
- package/src/sap/fe/core/controllerextensions/SideEffects.js +5 -6
- package/src/sap/fe/core/controllerextensions/SideEffects.ts +13 -12
- package/src/sap/fe/core/controllerextensions/ViewState.js +173 -6
- package/src/sap/fe/core/controls/ActionParameterDialog.fragment.xml +39 -34
- package/src/sap/fe/core/controls/ActionParameterDialogValueHelp.fragment.xml +35 -0
- package/src/sap/fe/core/controls/ActionPartial.fragment.xml +1 -1
- package/src/sap/fe/core/controls/CustomQuickViewPage.js +3 -0
- package/src/sap/fe/core/controls/MultiValueParameterDelegate.js +45 -0
- package/src/sap/fe/core/controls/filterbar/FilterContainer.js +15 -4
- package/src/sap/fe/core/controls/filterbar/VisualFilter.js +250 -94
- package/src/sap/fe/core/controls/filterbar/VisualFilterContainer.js +129 -135
- package/src/sap/fe/core/controls/filterbar/utils/VisualFilterUtils.js +325 -0
- package/src/sap/fe/core/converters/ConverterContext.js +19 -5
- package/src/sap/fe/core/converters/ConverterContext.ts +13 -3
- package/src/sap/fe/core/converters/ManifestSettings.js +1 -1
- package/src/sap/fe/core/converters/ManifestSettings.ts +9 -2
- package/src/sap/fe/core/converters/ManifestWrapper.js +9 -9
- package/src/sap/fe/core/converters/MetaModelConverter.js +858 -871
- package/src/sap/fe/core/converters/MetaModelConverter.ts +763 -826
- package/src/sap/fe/core/converters/TemplateConverter.js +4 -4
- package/src/sap/fe/core/converters/annotations/DataField.js +57 -7
- package/src/sap/fe/core/converters/annotations/DataField.ts +52 -2
- package/src/sap/fe/core/converters/common/AnnotationConverter.js +80 -46
- package/src/sap/fe/core/converters/controls/Common/Action.js +56 -54
- package/src/sap/fe/core/converters/controls/Common/Action.ts +48 -36
- package/src/sap/fe/core/converters/controls/Common/Chart.js +101 -9
- package/src/sap/fe/core/converters/controls/Common/Chart.ts +100 -5
- package/src/sap/fe/core/converters/controls/Common/Criticality.js +1 -1
- package/src/sap/fe/core/converters/controls/Common/DataVisualization.js +15 -16
- package/src/sap/fe/core/converters/controls/Common/DataVisualization.ts +16 -30
- package/src/sap/fe/core/converters/controls/Common/Form.js +21 -12
- package/src/sap/fe/core/converters/controls/Common/Form.ts +28 -8
- package/src/sap/fe/core/converters/controls/Common/KPI.js +287 -109
- package/src/sap/fe/core/converters/controls/Common/KPI.ts +314 -139
- package/src/sap/fe/core/converters/controls/Common/Table.js +414 -171
- package/src/sap/fe/core/converters/controls/Common/Table.ts +412 -130
- package/src/sap/fe/core/converters/controls/ListReport/FilterBar.js +487 -0
- package/src/sap/fe/core/converters/controls/ListReport/FilterBar.ts +541 -0
- package/src/sap/fe/core/converters/controls/ListReport/VisualFilters.js +364 -0
- package/src/sap/fe/core/converters/controls/ListReport/VisualFilters.ts +338 -0
- package/src/sap/fe/core/converters/controls/ObjectPage/Avatar.js +74 -0
- package/src/sap/fe/core/converters/controls/ObjectPage/Avatar.ts +50 -0
- package/src/sap/fe/core/converters/controls/ObjectPage/HeaderFacet.js +11 -11
- package/src/sap/fe/core/converters/controls/ObjectPage/SubSection.js +47 -35
- package/src/sap/fe/core/converters/controls/ObjectPage/SubSection.ts +45 -29
- package/src/sap/fe/core/converters/helpers/Aggregation.js +31 -32
- package/src/sap/fe/core/converters/helpers/Aggregation.ts +26 -27
- package/src/sap/fe/core/converters/helpers/BindingHelper.js +27 -2
- package/src/sap/fe/core/converters/helpers/BindingHelper.ts +22 -2
- package/src/sap/fe/core/converters/helpers/ConfigurableObject.js +1 -1
- package/src/sap/fe/core/converters/helpers/ID.js +1 -3
- package/src/sap/fe/core/converters/helpers/ID.ts +2 -3
- package/src/sap/fe/core/converters/helpers/IssueManager.js +5 -4
- package/src/sap/fe/core/converters/helpers/IssueManager.ts +4 -3
- package/src/sap/fe/core/converters/helpers/Key.js +3 -3
- package/src/sap/fe/core/converters/helpers/SelectionVariantHelper.js +11 -6
- package/src/sap/fe/core/converters/helpers/SelectionVariantHelper.ts +9 -5
- package/src/sap/fe/core/converters/objectPage/FormMenuActions.js +18 -5
- package/src/sap/fe/core/converters/objectPage/FormMenuActions.ts +14 -14
- package/src/sap/fe/core/converters/objectPage/HeaderAndFooterAction.js +91 -20
- package/src/sap/fe/core/converters/objectPage/HeaderAndFooterAction.ts +77 -5
- package/src/sap/fe/core/converters/templates/ListReportConverter.js +76 -714
- package/src/sap/fe/core/converters/templates/ListReportConverter.ts +75 -807
- package/src/sap/fe/core/converters/templates/ObjectPageConverter.js +106 -17
- package/src/sap/fe/core/converters/templates/ObjectPageConverter.ts +121 -16
- package/src/sap/fe/core/formatters/CriticalityFormatter.js +1 -1
- package/src/sap/fe/core/formatters/FPMFormatter.js +1 -1
- package/src/sap/fe/core/formatters/FPMFormatter.ts +8 -3
- package/src/sap/fe/core/formatters/KPIFormatter.js +1 -1
- package/src/sap/fe/core/formatters/TableFormatter.js +1 -1
- package/src/sap/fe/core/formatters/TableFormatterTypes.js +1 -1
- package/src/sap/fe/core/formatters/ValueFormatter.js +1 -1
- package/src/sap/fe/core/fpm/Component.js +1 -1
- package/src/sap/fe/core/helpers/AnnotationEnum.js +3 -3
- package/src/sap/fe/core/helpers/BindingExpression.js +6 -6
- package/src/sap/fe/core/helpers/ClassSupport.js +4 -4
- package/src/sap/fe/core/helpers/ExcelFormatHelper.js +0 -2
- package/src/sap/fe/core/helpers/ModelHelper.js +27 -0
- package/src/sap/fe/core/helpers/PasteHelper.js +6 -0
- package/src/sap/fe/core/helpers/SemanticKeyHelper.js +2 -2
- package/src/sap/fe/core/helpers/StableIdHelper.js +1 -1
- package/src/sap/fe/core/helpers/StableIdHelper.ts +1 -1
- package/src/sap/fe/core/jsx-runtime/jsx.js +2 -2
- package/src/sap/fe/core/jsx-runtime/jsxs.js +1 -1
- package/src/sap/fe/core/library.js +1 -1
- package/src/sap/fe/core/messagebundle.properties +30 -1
- package/src/sap/fe/core/messagebundle_ar.properties +43 -1
- package/src/sap/fe/core/messagebundle_bg.properties +42 -0
- package/src/sap/fe/core/messagebundle_ca.properties +44 -2
- package/src/sap/fe/core/messagebundle_cs.properties +42 -0
- package/src/sap/fe/core/messagebundle_cy.properties +42 -0
- package/src/sap/fe/core/messagebundle_da.properties +43 -1
- package/src/sap/fe/core/messagebundle_de.properties +45 -3
- package/src/sap/fe/core/messagebundle_el.properties +43 -1
- package/src/sap/fe/core/messagebundle_en.properties +42 -0
- package/src/sap/fe/core/messagebundle_en_GB.properties +43 -1
- package/src/sap/fe/core/messagebundle_en_US_sappsd.properties +43 -1
- package/src/sap/fe/core/messagebundle_en_US_saprigi.properties +48 -0
- package/src/sap/fe/core/messagebundle_en_US_saptrc.properties +42 -0
- package/src/sap/fe/core/messagebundle_es.properties +50 -8
- package/src/sap/fe/core/messagebundle_es_MX.properties +45 -3
- package/src/sap/fe/core/messagebundle_et.properties +42 -0
- package/src/sap/fe/core/messagebundle_fi.properties +42 -0
- package/src/sap/fe/core/messagebundle_fr.properties +51 -9
- package/src/sap/fe/core/messagebundle_fr_CA.properties +42 -0
- package/src/sap/fe/core/messagebundle_hi.properties +43 -1
- package/src/sap/fe/core/messagebundle_hr.properties +43 -1
- package/src/sap/fe/core/messagebundle_hu.properties +42 -0
- package/src/sap/fe/core/messagebundle_id.properties +43 -1
- package/src/sap/fe/core/messagebundle_it.properties +43 -1
- package/src/sap/fe/core/messagebundle_iw.properties +44 -2
- package/src/sap/fe/core/messagebundle_ja.properties +43 -1
- package/src/sap/fe/core/messagebundle_kk.properties +43 -1
- package/src/sap/fe/core/messagebundle_ko.properties +43 -1
- package/src/sap/fe/core/messagebundle_lt.properties +43 -1
- package/src/sap/fe/core/messagebundle_lv.properties +43 -1
- package/src/sap/fe/core/messagebundle_ms.properties +43 -1
- package/src/sap/fe/core/messagebundle_nl.properties +47 -5
- package/src/sap/fe/core/messagebundle_no.properties +44 -2
- package/src/sap/fe/core/messagebundle_pl.properties +43 -1
- package/src/sap/fe/core/messagebundle_pt.properties +43 -1
- package/src/sap/fe/core/messagebundle_pt_PT.properties +43 -1
- package/src/sap/fe/core/messagebundle_ro.properties +43 -1
- package/src/sap/fe/core/messagebundle_ru.properties +43 -1
- package/src/sap/fe/core/messagebundle_sh.properties +43 -1
- package/src/sap/fe/core/messagebundle_sk.properties +42 -0
- package/src/sap/fe/core/messagebundle_sl.properties +43 -1
- package/src/sap/fe/core/messagebundle_sv.properties +43 -1
- package/src/sap/fe/core/messagebundle_th.properties +42 -0
- package/src/sap/fe/core/messagebundle_tr.properties +42 -0
- package/src/sap/fe/core/messagebundle_uk.properties +42 -0
- package/src/sap/fe/core/messagebundle_vi.properties +43 -1
- package/src/sap/fe/core/messagebundle_zh_CN.properties +43 -1
- package/src/sap/fe/core/messagebundle_zh_TW.properties +43 -1
- package/src/sap/fe/core/services/AsyncComponentServiceFactory.js +5 -5
- package/src/sap/fe/core/services/EnvironmentServiceFactory.js +5 -5
- package/src/sap/fe/core/services/RoutingServiceFactory.js +155 -76
- package/src/sap/fe/core/services/ShellServicesFactory.js +9 -9
- package/src/sap/fe/core/services/SideEffectsServiceFactory.js +11 -12
- package/src/sap/fe/core/services/TemplatedViewServiceFactory.js +11 -1
- package/src/sap/fe/core/support/AnnotationIssue.support.js +2 -4
- package/src/sap/fe/core/support/CollectionFacetMissingID.support.js +2 -4
- package/src/sap/fe/core/support/CollectionFacetUnsupportedLevel.support.js +2 -4
- package/src/sap/fe/core/support/CommonHelper.js +2 -4
- package/src/sap/fe/core/support/Diagnostics.js +1 -1
- package/src/sap/fe/core/templating/CriticalityFormatters.js +4 -4
- package/src/sap/fe/core/templating/DataFieldFormatters.js +1 -1
- package/src/sap/fe/core/templating/DataModelPathHelper.js +54 -6
- package/src/sap/fe/core/templating/DataModelPathHelper.ts +54 -4
- package/src/sap/fe/core/templating/EntitySetHelper.js +13 -3
- package/src/sap/fe/core/templating/EntitySetHelper.ts +4 -0
- package/src/sap/fe/core/templating/FieldControlHelper.js +1 -1
- package/src/sap/fe/core/templating/FilterHelper.js +23 -5
- package/src/sap/fe/core/templating/FilterHelper.ts +15 -1
- package/src/sap/fe/core/templating/FilterTemplating.js +1 -1
- package/src/sap/fe/core/templating/PropertyFormatters.js +1 -1
- package/src/sap/fe/core/templating/PropertyHelper.js +8 -8
- package/src/sap/fe/core/templating/UIFormatters.js +72 -4
- package/src/sap/fe/core/templating/UIFormatters.ts +98 -3
- package/src/sap/fe/core/type/Email.js +1 -1
|
@@ -13,7 +13,8 @@ sap.ui.define(
|
|
|
13
13
|
"sap/ui/core/Fragment",
|
|
14
14
|
"sap/ui/model/json/JSONModel",
|
|
15
15
|
"sap/base/Log",
|
|
16
|
-
"sap/fe/core/CommonUtils"
|
|
16
|
+
"sap/fe/core/CommonUtils",
|
|
17
|
+
"sap/base/util/merge"
|
|
17
18
|
],
|
|
18
19
|
function(
|
|
19
20
|
ControllerExtension,
|
|
@@ -25,7 +26,8 @@ sap.ui.define(
|
|
|
25
26
|
Fragment,
|
|
26
27
|
JSONModel,
|
|
27
28
|
Log,
|
|
28
|
-
CommonUtils
|
|
29
|
+
CommonUtils,
|
|
30
|
+
mergeObjects
|
|
29
31
|
) {
|
|
30
32
|
"use strict";
|
|
31
33
|
|
|
@@ -73,20 +75,27 @@ sap.ui.define(
|
|
|
73
75
|
prepareFiltersForExternalNavigation: {
|
|
74
76
|
"final": true,
|
|
75
77
|
"public": true
|
|
78
|
+
},
|
|
79
|
+
getOutboundParams: {
|
|
80
|
+
"final": true,
|
|
81
|
+
"public": true
|
|
76
82
|
}
|
|
77
83
|
}
|
|
78
84
|
},
|
|
79
85
|
/**
|
|
80
|
-
*
|
|
81
|
-
* If
|
|
86
|
+
* Enables intent-based navigation (SemanticObject-Action) with the provided context.
|
|
87
|
+
* If semantic object mapping is provided, this is also applied to the selection variant after the adaptation by a consumer.
|
|
82
88
|
* This takes care of removing any technical parameters and determines if an explace or inplace navigation should take place.
|
|
83
89
|
*
|
|
84
|
-
* @param {string} sSemanticObject Semantic
|
|
90
|
+
* @param {string} sSemanticObject Semantic object for the target app
|
|
85
91
|
* @param {string} sAction Action for the target app
|
|
86
92
|
* @param {object} [mNavigationParameters] Optional parameters to be passed to the external navigation
|
|
87
|
-
* @param {Array|object} [mNavigationParameters.navigationContexts]
|
|
88
|
-
*
|
|
89
|
-
*
|
|
93
|
+
* @param {Array|object} [mNavigationParameters.navigationContexts] Uses one of the following to be passed to the intent:
|
|
94
|
+
* a single instance of {@link sap.ui.model.odata.v4.Context}
|
|
95
|
+
* multiple instances of {@link sap.ui.model.odata.v4.Context}
|
|
96
|
+
* an object or an array of objects
|
|
97
|
+
* If an array of objects is passed, the context is used to determine the metaPath and to remove any sensitive data
|
|
98
|
+
* If an array of objects is passed, the following format ix expected:
|
|
90
99
|
* {
|
|
91
100
|
* data: {
|
|
92
101
|
* ProductID: 7634,
|
|
@@ -94,8 +103,9 @@ sap.ui.define(
|
|
|
94
103
|
* },
|
|
95
104
|
* metaPath: "/SalesOrderManage"
|
|
96
105
|
* }
|
|
97
|
-
* The metaPath is used to remove any sensitive data.
|
|
98
106
|
* @param {string | object} [mNavigationParameters.semanticObjectMapping] String representation of the SemanticObjectMapping or SemanticObjectMapping that applies to this navigation
|
|
107
|
+
* @param {object} [mNavigationParameters.defaultRefreshStrategy] Default refresh strategy to be used in case no refresh strategy is specified for the intent in the view.
|
|
108
|
+
* @param {object} [mNavigationParameters.additionalNavigationParameters] Additional navigation parameters configured in the crossAppNavigation outbound parameters.
|
|
99
109
|
**/
|
|
100
110
|
navigate: function(sSemanticObject, sAction, mNavigationParameters) {
|
|
101
111
|
var that = this;
|
|
@@ -104,10 +114,13 @@ sap.ui.define(
|
|
|
104
114
|
aNavigationContexts =
|
|
105
115
|
vNavigationContexts && !Array.isArray(vNavigationContexts) ? [vNavigationContexts] : vNavigationContexts,
|
|
106
116
|
vSemanticObjectMapping = mNavigationParameters && mNavigationParameters.semanticObjectMapping,
|
|
117
|
+
vOutboundParams = mNavigationParameters && mNavigationParameters.additionalNavigationParameters,
|
|
107
118
|
oTargetInfo = {
|
|
108
119
|
semanticObject: sSemanticObject,
|
|
109
120
|
action: sAction
|
|
110
|
-
}
|
|
121
|
+
},
|
|
122
|
+
oView = that.base.getView(),
|
|
123
|
+
oController = oView.getController();
|
|
111
124
|
|
|
112
125
|
if (oContext) {
|
|
113
126
|
that._oView.setBindingContext(oContext);
|
|
@@ -161,27 +174,40 @@ sap.ui.define(
|
|
|
161
174
|
oSelectionVariant.setFilterContextUrl(sContextUrl);
|
|
162
175
|
}
|
|
163
176
|
|
|
177
|
+
// Apply Outbound Parameters to the SV
|
|
178
|
+
if (vOutboundParams) {
|
|
179
|
+
that._applyOutboundParams(oSelectionVariant, vOutboundParams);
|
|
180
|
+
}
|
|
181
|
+
|
|
164
182
|
// 4. give an opportunity for the application to influence the SelectionVariant
|
|
165
|
-
|
|
166
|
-
.getView()
|
|
167
|
-
.getController()
|
|
168
|
-
.intentBasedNavigation.adaptNavigationContext(oSelectionVariant, oTargetInfo);
|
|
183
|
+
oController.intentBasedNavigation.adaptNavigationContext(oSelectionVariant, oTargetInfo);
|
|
169
184
|
|
|
170
185
|
// 5. Apply semantic object mappings to the SV
|
|
171
186
|
if (vSemanticObjectMapping) {
|
|
172
187
|
that._applySemanticObjectMappings(oSelectionVariant, vSemanticObjectMapping);
|
|
173
188
|
}
|
|
174
189
|
|
|
175
|
-
// 6. remove
|
|
190
|
+
// 6. remove technical parameters from Selection Variant
|
|
176
191
|
that._removeTechnicalParameters(oSelectionVariant);
|
|
177
192
|
|
|
178
193
|
// 7. check if programming model is sticky and page is editable
|
|
179
|
-
var sNavMode =
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
194
|
+
var sNavMode = oController._intentBasedNavigation.getNavigationMode();
|
|
195
|
+
|
|
196
|
+
// 8. Updating refresh strategy in internal model
|
|
197
|
+
var mRefreshStrategies = (mNavigationParameters && mNavigationParameters.refreshStrategies) || {},
|
|
198
|
+
oInternalModel = oView.getModel("internal");
|
|
199
|
+
if (oInternalModel) {
|
|
200
|
+
if (oView && oView.getViewData().refreshStrategyOnAppRestore) {
|
|
201
|
+
var mViewRefreshStrategies = oView.getViewData().refreshStrategyOnAppRestore || {};
|
|
202
|
+
mergeObjects(mRefreshStrategies, mViewRefreshStrategies);
|
|
203
|
+
}
|
|
204
|
+
var mRefreshStrategy = CommonUtils.getRefreshStrategyForIntent(mRefreshStrategies, sSemanticObject, sAction);
|
|
205
|
+
if (mRefreshStrategy) {
|
|
206
|
+
oInternalModel.setProperty("/refreshStrategyOnAppRestore", mRefreshStrategy);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
183
209
|
|
|
184
|
-
//
|
|
210
|
+
// 9. Navigate via NavigationHandler
|
|
185
211
|
var onError = function() {
|
|
186
212
|
sap.ui.require(["sap/m/MessageBox"], function(MessageBox) {
|
|
187
213
|
var oResourceBundle = sap.ui.getCore().getLibraryResourceBundle("sap.fe.core");
|
|
@@ -425,7 +451,7 @@ sap.ui.define(
|
|
|
425
451
|
* @returns {string}
|
|
426
452
|
*/
|
|
427
453
|
getNavigationMode: function() {
|
|
428
|
-
return
|
|
454
|
+
return undefined;
|
|
429
455
|
},
|
|
430
456
|
/**
|
|
431
457
|
* Allows for Navigation to a given Intent(SemanticObject-Action) with the provided context with a dialog showing the contexts which cannot be passed
|
|
@@ -640,7 +666,7 @@ sap.ui.define(
|
|
|
640
666
|
}
|
|
641
667
|
var sSemanticObject = oOutbound.semanticObject,
|
|
642
668
|
sAction = oOutbound.action,
|
|
643
|
-
outboundParams = oOutbound.parameters && this.
|
|
669
|
+
outboundParams = oOutbound.parameters && this.getOutboundParams(oOutbound.parameters);
|
|
644
670
|
|
|
645
671
|
if (mNavigationParameters) {
|
|
646
672
|
var aNavParams = [];
|
|
@@ -670,13 +696,29 @@ sap.ui.define(
|
|
|
670
696
|
},
|
|
671
697
|
|
|
672
698
|
/**
|
|
673
|
-
*
|
|
699
|
+
* Method to apply outbound parameters defined in the manifest.
|
|
700
|
+
* @param {object} oSelectionVariant SelectionVariant consisting of a filter bar, a table, and a page context
|
|
701
|
+
* @param {object} vOutboundParams Outbound Properties defined in the manifest
|
|
702
|
+
* @returns {object} - The modified SelectionVariant with outbound parameters.
|
|
703
|
+
*/
|
|
704
|
+
_applyOutboundParams: function(oSelectionVariant, vOutboundParams) {
|
|
705
|
+
var aParameters = Object.keys(vOutboundParams);
|
|
706
|
+
var aSelectProperties = oSelectionVariant.getSelectOptionsPropertyNames();
|
|
707
|
+
aParameters.forEach(function(key) {
|
|
708
|
+
if (!aSelectProperties.includes(key)) {
|
|
709
|
+
oSelectionVariant.addSelectOption(key, "I", "EQ", vOutboundParams[key]);
|
|
710
|
+
}
|
|
711
|
+
});
|
|
712
|
+
return oSelectionVariant;
|
|
713
|
+
},
|
|
714
|
+
/**
|
|
715
|
+
* Method to get the outbound parameters defined in the manifest.
|
|
674
716
|
*
|
|
675
717
|
* @function
|
|
676
718
|
* @param {object} [oOutboundParams] Parameters defined in the outbounds. Only "plain" is supported
|
|
677
719
|
* @returns {Array} Parameters with the key-Value pair
|
|
678
720
|
**/
|
|
679
|
-
|
|
721
|
+
getOutboundParams: function(oOutboundParams) {
|
|
680
722
|
var oParamsMapping = {};
|
|
681
723
|
if (oOutboundParams) {
|
|
682
724
|
var aParameters = Object.keys(oOutboundParams) || [];
|
|
@@ -693,6 +735,67 @@ sap.ui.define(
|
|
|
693
735
|
}
|
|
694
736
|
return oParamsMapping;
|
|
695
737
|
},
|
|
738
|
+
|
|
739
|
+
/**
|
|
740
|
+
* Triggers an outbound navigation when a user chooses the chevron.
|
|
741
|
+
*
|
|
742
|
+
* @param {object} oController
|
|
743
|
+
* @param {string} sOutboundTarget Name of the outbound target (needs to be defined in the manifest)
|
|
744
|
+
* @param {sap.ui.model.odata.v4.Context} oContext The context that contains the data for the target app
|
|
745
|
+
* @param {string} sCreatePath Create path when the chevron is created.
|
|
746
|
+
* @returns {Promise} Promise which is resolved once the navigation is triggered
|
|
747
|
+
*/
|
|
748
|
+
|
|
749
|
+
onChevronPressNavigateOutBound: function(oController, sOutboundTarget, oContext, sCreatePath) {
|
|
750
|
+
var oOutbounds = oController
|
|
751
|
+
.getAppComponent()
|
|
752
|
+
.getRoutingService()
|
|
753
|
+
.getOutbounds(),
|
|
754
|
+
oDisplayOutbound = oOutbounds[sOutboundTarget],
|
|
755
|
+
additionalNavigationParameters;
|
|
756
|
+
if (oDisplayOutbound && oDisplayOutbound.semanticObject && oDisplayOutbound.action) {
|
|
757
|
+
var oRefreshStrategies = {
|
|
758
|
+
intents: {}
|
|
759
|
+
},
|
|
760
|
+
oDefaultRefreshStrategy = {},
|
|
761
|
+
sMetaPath;
|
|
762
|
+
|
|
763
|
+
if (oContext) {
|
|
764
|
+
if (oContext.isA && oContext.isA("sap.ui.model.odata.v4.Context")) {
|
|
765
|
+
sMetaPath = CommonUtils.getMetaPathForContext(oContext);
|
|
766
|
+
oContext = [oContext];
|
|
767
|
+
} else {
|
|
768
|
+
sMetaPath = CommonUtils.getMetaPathForContext(oContext[0]);
|
|
769
|
+
}
|
|
770
|
+
oDefaultRefreshStrategy[sMetaPath] = "self";
|
|
771
|
+
oRefreshStrategies["_feDefault"] = oDefaultRefreshStrategy;
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
if (sCreatePath) {
|
|
775
|
+
var sKey = oDisplayOutbound.semanticObject + "-" + oDisplayOutbound.action;
|
|
776
|
+
oRefreshStrategies.intents[sKey] = {};
|
|
777
|
+
oRefreshStrategies.intents[sKey][sCreatePath] = "self";
|
|
778
|
+
}
|
|
779
|
+
if (oDisplayOutbound && oDisplayOutbound.parameters) {
|
|
780
|
+
var oParams = oDisplayOutbound.parameters && this.getOutboundParams(oDisplayOutbound.parameters);
|
|
781
|
+
if (Object.keys(oParams).length > 0) {
|
|
782
|
+
additionalNavigationParameters = oParams;
|
|
783
|
+
}
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
oController._intentBasedNavigation.navigate(oDisplayOutbound.semanticObject, oDisplayOutbound.action, {
|
|
787
|
+
navigationContexts: oContext,
|
|
788
|
+
refreshStrategies: oRefreshStrategies,
|
|
789
|
+
additionalNavigationParameters: additionalNavigationParameters
|
|
790
|
+
});
|
|
791
|
+
|
|
792
|
+
//TODO: check why returning a promise is required
|
|
793
|
+
return Promise.resolve();
|
|
794
|
+
} else {
|
|
795
|
+
throw new Error("outbound target " + sOutboundTarget + " not found in cross navigation definition of manifest");
|
|
796
|
+
}
|
|
797
|
+
},
|
|
798
|
+
|
|
696
799
|
override: {
|
|
697
800
|
onInit: function() {
|
|
698
801
|
this._oAppComponent = this.base.getAppComponent();
|