@sapui5/sap.fe.core 1.95.0 → 1.98.0
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 +5 -5
- package/src/sap/fe/core/.library +1 -1
- package/src/sap/fe/core/AnnotationHelper.js +3 -3
- package/src/sap/fe/core/AppComponent.js +9 -44
- package/src/sap/fe/core/AppStateHandler.js +2 -2
- package/src/sap/fe/core/BaseController.js +1 -1
- package/src/sap/fe/core/BusyLocker.js +13 -1
- package/src/sap/fe/core/CommonUtils.js +129 -219
- package/src/sap/fe/core/ExtensionAPI.js +14 -6
- package/src/sap/fe/core/PageController.js +9 -35
- package/src/sap/fe/core/RouterProxy.js +79 -75
- package/src/sap/fe/core/Synchronization.js +1 -1
- package/src/sap/fe/core/TemplateComponent.js +16 -7
- package/src/sap/fe/core/TemplateModel.js +1 -1
- package/src/sap/fe/core/TransactionHelper.js +183 -65
- package/src/sap/fe/core/actions/draft.js +50 -23
- package/src/sap/fe/core/actions/messageHandling.js +86 -7
- package/src/sap/fe/core/actions/nonDraft.js +1 -1
- package/src/sap/fe/core/actions/operations.js +75 -33
- package/src/sap/fe/core/actions/sticky.js +1 -1
- package/src/sap/fe/core/controllerextensions/ControllerExtensionMetadata.js +1 -1
- package/src/sap/fe/core/controllerextensions/EditFlow.js +276 -122
- package/src/sap/fe/core/controllerextensions/IntentBasedNavigation.js +1 -1
- package/src/sap/fe/core/controllerextensions/InternalEditFlow.js +14 -6
- package/src/sap/fe/core/controllerextensions/InternalIntentBasedNavigation.js +90 -46
- package/src/sap/fe/core/controllerextensions/InternalRouting.js +234 -232
- package/src/sap/fe/core/controllerextensions/KPIManagement.js +539 -209
- package/src/sap/fe/core/controllerextensions/KPIManagement.ts +550 -213
- package/src/sap/fe/core/controllerextensions/MassEdit.js +79 -0
- package/src/sap/fe/core/controllerextensions/MessageHandler.js +227 -103
- package/src/sap/fe/core/controllerextensions/PageReady.js +2 -2
- package/src/sap/fe/core/controllerextensions/PageReady.ts +3 -7
- package/src/sap/fe/core/controllerextensions/Paginator.js +38 -12
- package/src/sap/fe/core/controllerextensions/Placeholder.js +16 -19
- package/src/sap/fe/core/controllerextensions/Routing.js +17 -2
- package/src/sap/fe/core/controllerextensions/RoutingListener.js +1 -1
- package/src/sap/fe/core/controllerextensions/Share.js +20 -7
- package/src/sap/fe/core/controllerextensions/SideEffects.js +8 -9
- package/src/sap/fe/core/controllerextensions/SideEffects.ts +19 -17
- package/src/sap/fe/core/controllerextensions/ViewState.js +54 -9
- package/src/sap/fe/core/controls/ActionParameterDialog.fragment.xml +40 -34
- package/src/sap/fe/core/controls/ActionParameterDialogValueHelp.fragment.xml +35 -0
- package/src/sap/fe/core/controls/CommandExecution.js +1 -1
- package/src/sap/fe/core/controls/ConditionalWrapper.js +1 -1
- package/src/sap/fe/core/controls/CustomQuickViewPage.js +110 -109
- package/src/sap/fe/core/controls/DataLossOrDraftDiscard/DataLossOrDraftDiscardHandler.js +7 -4
- package/src/sap/fe/core/controls/FieldWrapper.js +10 -4
- package/src/sap/fe/core/controls/FilterBar.js +1 -1
- package/src/sap/fe/core/controls/FormElementWrapper.js +1 -6
- package/src/sap/fe/core/controls/MultiValueParameterDelegate.js +45 -0
- package/src/sap/fe/core/controls/NonComputedVisibleKeyFieldsDialog.fragment.xml +1 -1
- package/src/sap/fe/core/controls/filterbar/FilterContainer.js +1 -1
- package/src/sap/fe/core/controls/filterbar/VisualFilter.js +1 -1
- package/src/sap/fe/core/controls/filterbar/VisualFilterContainer.js +1 -1
- package/src/sap/fe/core/controls/filterbar/utils/VisualFilterUtils.js +1 -1
- package/src/sap/fe/core/controls/massEdit/MassEditDialog.fragment.xml +106 -0
- package/src/sap/fe/core/controls/massEdit/MassEditHandlers.js +78 -0
- package/src/sap/fe/core/converters/ConverterContext.js +13 -1
- package/src/sap/fe/core/converters/ConverterContext.ts +10 -0
- package/src/sap/fe/core/converters/ManifestSettings.js +2 -1
- package/src/sap/fe/core/converters/ManifestSettings.ts +7 -1
- package/src/sap/fe/core/converters/ManifestWrapper.js +18 -7
- package/src/sap/fe/core/converters/ManifestWrapper.ts +15 -6
- package/src/sap/fe/core/converters/MetaModelConverter.js +920 -882
- package/src/sap/fe/core/converters/MetaModelConverter.ts +829 -853
- package/src/sap/fe/core/converters/annotations/DataField.js +54 -4
- package/src/sap/fe/core/converters/annotations/DataField.ts +53 -3
- package/src/sap/fe/core/converters/common/AnnotationConverter.js +83 -48
- package/src/sap/fe/core/converters/controls/Common/Action.js +15 -3
- package/src/sap/fe/core/converters/controls/Common/Action.ts +12 -3
- package/src/sap/fe/core/converters/controls/Common/Chart.js +1 -3
- package/src/sap/fe/core/converters/controls/Common/Chart.ts +0 -2
- package/src/sap/fe/core/converters/controls/Common/Form.js +68 -21
- package/src/sap/fe/core/converters/controls/Common/Form.ts +60 -16
- package/src/sap/fe/core/converters/controls/Common/KPI.js +331 -248
- package/src/sap/fe/core/converters/controls/Common/KPI.ts +355 -287
- package/src/sap/fe/core/converters/controls/Common/Table.js +426 -332
- package/src/sap/fe/core/converters/controls/Common/Table.ts +516 -383
- package/src/sap/fe/core/converters/controls/Common/table/StandardActions.js +468 -0
- package/src/sap/fe/core/converters/controls/Common/table/StandardActions.ts +609 -0
- package/src/sap/fe/core/converters/controls/ListReport/FilterBar.js +30 -13
- package/src/sap/fe/core/converters/controls/ListReport/FilterBar.ts +31 -12
- package/src/sap/fe/core/converters/controls/ListReport/VisualFilters.js +2 -2
- package/src/sap/fe/core/converters/controls/ListReport/VisualFilters.ts +1 -1
- package/src/sap/fe/core/converters/controls/ObjectPage/SubSection.js +15 -7
- package/src/sap/fe/core/converters/controls/ObjectPage/SubSection.ts +27 -6
- package/src/sap/fe/core/converters/helpers/Aggregation.js +8 -1
- package/src/sap/fe/core/converters/helpers/Aggregation.ts +9 -1
- package/src/sap/fe/core/converters/helpers/BindingHelper.js +3 -2
- package/src/sap/fe/core/converters/helpers/BindingHelper.ts +2 -2
- package/src/sap/fe/core/converters/helpers/ID.js +9 -1
- package/src/sap/fe/core/converters/helpers/ID.ts +6 -2
- package/src/sap/fe/core/converters/helpers/IssueManager.js +7 -5
- package/src/sap/fe/core/converters/helpers/IssueManager.ts +6 -4
- package/src/sap/fe/core/converters/objectPage/HeaderAndFooterAction.js +2 -2
- package/src/sap/fe/core/converters/objectPage/HeaderAndFooterAction.ts +1 -1
- package/src/sap/fe/core/converters/templates/ListReportConverter.js +34 -4
- package/src/sap/fe/core/converters/templates/ListReportConverter.ts +36 -7
- package/src/sap/fe/core/converters/templates/ObjectPageConverter.js +2 -5
- package/src/sap/fe/core/converters/templates/ObjectPageConverter.ts +1 -2
- package/src/sap/fe/core/designtime/AppComponent.designtime.js +11 -2
- 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/TableFormatter.js +27 -4
- package/src/sap/fe/core/formatters/TableFormatter.ts +20 -3
- package/src/sap/fe/core/formatters/ValueFormatter.js +30 -5
- package/src/sap/fe/core/formatters/ValueFormatter.ts +25 -3
- package/src/sap/fe/core/fpm/Component.js +2 -2
- package/src/sap/fe/core/helpers/AppStartupHelper.js +359 -0
- package/src/sap/fe/core/helpers/AppStartupHelper.ts +388 -0
- package/src/sap/fe/core/helpers/BindingExpression.js +199 -111
- package/src/sap/fe/core/helpers/BindingExpression.ts +193 -102
- package/src/sap/fe/core/helpers/DynamicAnnotationPathHelper.js +1 -1
- package/src/sap/fe/core/helpers/EditState.js +1 -1
- package/src/sap/fe/core/helpers/ExcelFormatHelper.js +1 -3
- package/src/sap/fe/core/helpers/FPMHelper.js +1 -1
- package/src/sap/fe/core/helpers/KeepAliveHelper.js +211 -0
- package/src/sap/fe/core/helpers/KeepAliveHelper.ts +202 -0
- package/src/sap/fe/core/helpers/KeepAliveRefreshTypes.js +32 -0
- package/src/sap/fe/core/helpers/KeepAliveRefreshTypes.ts +36 -0
- package/src/sap/fe/core/helpers/MassEditHelper.js +678 -0
- package/src/sap/fe/core/helpers/ModelHelper.js +64 -1
- package/src/sap/fe/core/helpers/PasteHelper.js +7 -1
- package/src/sap/fe/core/helpers/SemanticDateOperators.js +1 -1
- package/src/sap/fe/core/helpers/SemanticKeyHelper.js +1 -1
- package/src/sap/fe/core/helpers/StableIdHelper.js +2 -2
- package/src/sap/fe/core/helpers/StableIdHelper.ts +1 -1
- package/src/sap/fe/core/library.js +28 -2
- package/src/sap/fe/core/library.support.js +10 -4
- package/src/sap/fe/core/manifestMerger/ChangePageConfiguration.js +62 -0
- package/src/sap/fe/core/manifestMerger/ChangePageConfiguration.ts +66 -0
- package/src/sap/fe/core/messagebundle.properties +67 -3
- package/src/sap/fe/core/messagebundle_ar.properties +40 -3
- package/src/sap/fe/core/messagebundle_bg.properties +40 -3
- package/src/sap/fe/core/messagebundle_ca.properties +41 -4
- package/src/sap/fe/core/messagebundle_cs.properties +41 -4
- package/src/sap/fe/core/messagebundle_cy.properties +40 -3
- package/src/sap/fe/core/messagebundle_da.properties +40 -3
- package/src/sap/fe/core/messagebundle_de.properties +40 -3
- package/src/sap/fe/core/messagebundle_el.properties +40 -3
- package/src/sap/fe/core/messagebundle_en.properties +37 -0
- package/src/sap/fe/core/messagebundle_en_GB.properties +37 -0
- package/src/sap/fe/core/messagebundle_en_US_sappsd.properties +37 -0
- package/src/sap/fe/core/messagebundle_en_US_saprigi.properties +46 -2
- package/src/sap/fe/core/messagebundle_en_US_saptrc.properties +44 -0
- package/src/sap/fe/core/messagebundle_es.properties +40 -3
- package/src/sap/fe/core/messagebundle_es_MX.properties +41 -4
- package/src/sap/fe/core/messagebundle_et.properties +40 -3
- package/src/sap/fe/core/messagebundle_fi.properties +40 -3
- package/src/sap/fe/core/messagebundle_fr.properties +41 -4
- package/src/sap/fe/core/messagebundle_fr_CA.properties +40 -3
- package/src/sap/fe/core/messagebundle_hi.properties +40 -3
- package/src/sap/fe/core/messagebundle_hr.properties +40 -3
- package/src/sap/fe/core/messagebundle_hu.properties +41 -4
- package/src/sap/fe/core/messagebundle_id.properties +42 -5
- package/src/sap/fe/core/messagebundle_it.properties +40 -3
- package/src/sap/fe/core/messagebundle_iw.properties +40 -3
- package/src/sap/fe/core/messagebundle_ja.properties +49 -12
- package/src/sap/fe/core/messagebundle_kk.properties +40 -3
- package/src/sap/fe/core/messagebundle_ko.properties +40 -3
- package/src/sap/fe/core/messagebundle_lt.properties +40 -3
- package/src/sap/fe/core/messagebundle_lv.properties +40 -3
- package/src/sap/fe/core/messagebundle_ms.properties +40 -3
- package/src/sap/fe/core/messagebundle_nl.properties +40 -3
- package/src/sap/fe/core/messagebundle_no.properties +40 -3
- package/src/sap/fe/core/messagebundle_pl.properties +40 -3
- package/src/sap/fe/core/messagebundle_pt.properties +42 -5
- package/src/sap/fe/core/messagebundle_pt_PT.properties +40 -3
- package/src/sap/fe/core/messagebundle_ro.properties +40 -3
- package/src/sap/fe/core/messagebundle_ru.properties +40 -3
- package/src/sap/fe/core/messagebundle_sh.properties +40 -3
- package/src/sap/fe/core/messagebundle_sk.properties +40 -3
- package/src/sap/fe/core/messagebundle_sl.properties +40 -3
- package/src/sap/fe/core/messagebundle_sv.properties +41 -4
- package/src/sap/fe/core/messagebundle_th.properties +40 -3
- package/src/sap/fe/core/messagebundle_tr.properties +40 -3
- package/src/sap/fe/core/messagebundle_uk.properties +40 -3
- package/src/sap/fe/core/messagebundle_vi.properties +40 -3
- package/src/sap/fe/core/messagebundle_zh_CN.properties +40 -3
- package/src/sap/fe/core/messagebundle_zh_TW.properties +40 -3
- package/src/sap/fe/core/services/AsyncComponentServiceFactory.js +1 -1
- package/src/sap/fe/core/services/CacheHandlerServiceFactory.js +1 -1
- package/src/sap/fe/core/services/EnvironmentServiceFactory.js +4 -3
- package/src/sap/fe/core/services/EnvironmentServiceFactory.ts +3 -0
- package/src/sap/fe/core/services/NavigationServiceFactory.js +1 -1
- package/src/sap/fe/core/services/ResourceModelServiceFactory.js +1 -1
- package/src/sap/fe/core/services/RoutingServiceFactory.js +98 -328
- package/src/sap/fe/core/services/ShellServicesFactory.js +31 -2
- package/src/sap/fe/core/services/ShellServicesFactory.ts +30 -1
- package/src/sap/fe/core/services/SideEffectsServiceFactory.js +8 -5
- package/src/sap/fe/core/services/SideEffectsServiceFactory.ts +11 -6
- package/src/sap/fe/core/services/TemplatedViewServiceFactory.js +14 -5
- package/src/sap/fe/core/services/view/TemplatingErrorPage.controller.js +1 -1
- package/src/sap/fe/core/support/InvalidAnnotationColumnKey.support.js +38 -0
- package/src/sap/fe/core/support/InvalidAnnotationColumnKey.support.ts +18 -0
- package/src/sap/fe/core/templating/DataModelPathHelper.js +8 -37
- package/src/sap/fe/core/templating/DataModelPathHelper.ts +13 -33
- package/src/sap/fe/core/templating/DisplayModeFormatter.js +114 -0
- package/src/sap/fe/core/templating/DisplayModeFormatter.ts +86 -0
- package/src/sap/fe/core/templating/EntitySetHelper.js +86 -3
- package/src/sap/fe/core/templating/EntitySetHelper.ts +44 -0
- package/src/sap/fe/core/templating/FilterHelper.js +10 -7
- package/src/sap/fe/core/templating/FilterHelper.ts +8 -6
- package/src/sap/fe/core/templating/PropertyHelper.js +2 -2
- package/src/sap/fe/core/templating/PropertyHelper.ts +1 -1
- package/src/sap/fe/core/templating/UIFormatters.js +47 -107
- package/src/sap/fe/core/templating/UIFormatters.ts +76 -72
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* SAPUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2022 SAP SE. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
sap.ui.define(
|
|
6
6
|
[
|
|
@@ -29,7 +29,8 @@ sap.ui.define(
|
|
|
29
29
|
|
|
30
30
|
var ProgrammingModel = FELibrary.ProgrammingModel,
|
|
31
31
|
DraftStatus = FELibrary.DraftStatus,
|
|
32
|
-
EditMode = FELibrary.EditMode
|
|
32
|
+
EditMode = FELibrary.EditMode,
|
|
33
|
+
CreationMode = FELibrary.CreationMode;
|
|
33
34
|
|
|
34
35
|
var Extension = ControllerExtension.extend("sap.fe.core.controllerextensions.InternalEditFlow", {
|
|
35
36
|
metadata: {
|
|
@@ -94,7 +95,7 @@ sap.ui.define(
|
|
|
94
95
|
|
|
95
96
|
mParameters.keepTransientContextOnFailed = false; // currently not fully supported
|
|
96
97
|
mParameters.busyMode = "None";
|
|
97
|
-
mParameters.creationMode =
|
|
98
|
+
mParameters.creationMode = CreationMode.CreationRow;
|
|
98
99
|
mParameters.parentControl = that.getView();
|
|
99
100
|
mParameters.createAtEnd = bCreateAtEnd;
|
|
100
101
|
|
|
@@ -200,6 +201,9 @@ sap.ui.define(
|
|
|
200
201
|
|
|
201
202
|
return oResult;
|
|
202
203
|
})
|
|
204
|
+
.catch(function(oError) {
|
|
205
|
+
Log.error("Error while deleting the document(s)", oError);
|
|
206
|
+
})
|
|
203
207
|
.finally(function() {
|
|
204
208
|
BusyLocker.unlock(oLockObject);
|
|
205
209
|
});
|
|
@@ -344,9 +348,10 @@ sap.ui.define(
|
|
|
344
348
|
|
|
345
349
|
// TODO: this setting and removing of contexts shouldn't be in the transaction helper at all
|
|
346
350
|
// for the time being I kept it and provide the internal model context to not break something
|
|
347
|
-
mParameters.internalModelContext = mParameters.
|
|
348
|
-
?
|
|
349
|
-
.
|
|
351
|
+
mParameters.internalModelContext = mParameters.controlId
|
|
352
|
+
? sap.ui
|
|
353
|
+
.getCore()
|
|
354
|
+
.byId(mParameters.controlId)
|
|
350
355
|
.getBindingContext("internal")
|
|
351
356
|
: null;
|
|
352
357
|
|
|
@@ -362,6 +367,9 @@ sap.ui.define(
|
|
|
362
367
|
)
|
|
363
368
|
.then(function() {
|
|
364
369
|
that.getInternalModel().setProperty("/sessionOn", false);
|
|
370
|
+
})
|
|
371
|
+
.catch(function(oError) {
|
|
372
|
+
return Promise.reject(oError);
|
|
365
373
|
});
|
|
366
374
|
},
|
|
367
375
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* SAPUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2022 SAP SE. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
sap.ui.define(
|
|
6
6
|
[
|
|
@@ -14,6 +14,7 @@ sap.ui.define(
|
|
|
14
14
|
"sap/ui/model/json/JSONModel",
|
|
15
15
|
"sap/base/Log",
|
|
16
16
|
"sap/fe/core/CommonUtils",
|
|
17
|
+
"sap/fe/core/helpers/KeepAliveHelper",
|
|
17
18
|
"sap/base/util/merge"
|
|
18
19
|
],
|
|
19
20
|
function(
|
|
@@ -27,6 +28,7 @@ sap.ui.define(
|
|
|
27
28
|
JSONModel,
|
|
28
29
|
Log,
|
|
29
30
|
CommonUtils,
|
|
31
|
+
KeepAliveHelper,
|
|
30
32
|
mergeObjects
|
|
31
33
|
) {
|
|
32
34
|
"use strict";
|
|
@@ -75,20 +77,27 @@ sap.ui.define(
|
|
|
75
77
|
prepareFiltersForExternalNavigation: {
|
|
76
78
|
"final": true,
|
|
77
79
|
"public": true
|
|
80
|
+
},
|
|
81
|
+
getOutboundParams: {
|
|
82
|
+
"final": true,
|
|
83
|
+
"public": true
|
|
78
84
|
}
|
|
79
85
|
}
|
|
80
86
|
},
|
|
81
87
|
/**
|
|
82
|
-
*
|
|
83
|
-
* If
|
|
88
|
+
* Enables intent-based navigation (SemanticObject-Action) with the provided context.
|
|
89
|
+
* If semantic object mapping is provided, this is also applied to the selection variant after the adaptation by a consumer.
|
|
84
90
|
* This takes care of removing any technical parameters and determines if an explace or inplace navigation should take place.
|
|
85
91
|
*
|
|
86
|
-
* @param {string} sSemanticObject Semantic
|
|
92
|
+
* @param {string} sSemanticObject Semantic object for the target app
|
|
87
93
|
* @param {string} sAction Action for the target app
|
|
88
94
|
* @param {object} [mNavigationParameters] Optional parameters to be passed to the external navigation
|
|
89
|
-
* @param {Array|object} [mNavigationParameters.navigationContexts]
|
|
90
|
-
*
|
|
91
|
-
*
|
|
95
|
+
* @param {Array|object} [mNavigationParameters.navigationContexts] Uses one of the following to be passed to the intent:
|
|
96
|
+
* a single instance of {@link sap.ui.model.odata.v4.Context}
|
|
97
|
+
* multiple instances of {@link sap.ui.model.odata.v4.Context}
|
|
98
|
+
* an object or an array of objects
|
|
99
|
+
* If an array of objects is passed, the context is used to determine the metaPath and to remove any sensitive data
|
|
100
|
+
* If an array of objects is passed, the following format ix expected:
|
|
92
101
|
* {
|
|
93
102
|
* data: {
|
|
94
103
|
* ProductID: 7634,
|
|
@@ -96,9 +105,9 @@ sap.ui.define(
|
|
|
96
105
|
* },
|
|
97
106
|
* metaPath: "/SalesOrderManage"
|
|
98
107
|
* }
|
|
99
|
-
* The metaPath is used to remove any sensitive data.
|
|
100
108
|
* @param {string | object} [mNavigationParameters.semanticObjectMapping] String representation of the SemanticObjectMapping or SemanticObjectMapping that applies to this navigation
|
|
101
|
-
* @param {object} [mNavigationParameters.defaultRefreshStrategy] Default refresh strategy to be used in case
|
|
109
|
+
* @param {object} [mNavigationParameters.defaultRefreshStrategy] Default refresh strategy to be used in case no refresh strategy is specified for the intent in the view.
|
|
110
|
+
* @param {object} [mNavigationParameters.additionalNavigationParameters] Additional navigation parameters configured in the crossAppNavigation outbound parameters.
|
|
102
111
|
**/
|
|
103
112
|
navigate: function(sSemanticObject, sAction, mNavigationParameters) {
|
|
104
113
|
var that = this;
|
|
@@ -107,6 +116,7 @@ sap.ui.define(
|
|
|
107
116
|
aNavigationContexts =
|
|
108
117
|
vNavigationContexts && !Array.isArray(vNavigationContexts) ? [vNavigationContexts] : vNavigationContexts,
|
|
109
118
|
vSemanticObjectMapping = mNavigationParameters && mNavigationParameters.semanticObjectMapping,
|
|
119
|
+
vOutboundParams = mNavigationParameters && mNavigationParameters.additionalNavigationParameters,
|
|
110
120
|
oTargetInfo = {
|
|
111
121
|
semanticObject: sSemanticObject,
|
|
112
122
|
action: sAction
|
|
@@ -166,6 +176,11 @@ sap.ui.define(
|
|
|
166
176
|
oSelectionVariant.setFilterContextUrl(sContextUrl);
|
|
167
177
|
}
|
|
168
178
|
|
|
179
|
+
// Apply Outbound Parameters to the SV
|
|
180
|
+
if (vOutboundParams) {
|
|
181
|
+
that._applyOutboundParams(oSelectionVariant, vOutboundParams);
|
|
182
|
+
}
|
|
183
|
+
|
|
169
184
|
// 4. give an opportunity for the application to influence the SelectionVariant
|
|
170
185
|
oController.intentBasedNavigation.adaptNavigationContext(oSelectionVariant, oTargetInfo);
|
|
171
186
|
|
|
@@ -174,7 +189,7 @@ sap.ui.define(
|
|
|
174
189
|
that._applySemanticObjectMappings(oSelectionVariant, vSemanticObjectMapping);
|
|
175
190
|
}
|
|
176
191
|
|
|
177
|
-
// 6. remove
|
|
192
|
+
// 6. remove technical parameters from Selection Variant
|
|
178
193
|
that._removeTechnicalParameters(oSelectionVariant);
|
|
179
194
|
|
|
180
195
|
// 7. check if programming model is sticky and page is editable
|
|
@@ -188,10 +203,11 @@ sap.ui.define(
|
|
|
188
203
|
var mViewRefreshStrategies = oView.getViewData().refreshStrategyOnAppRestore || {};
|
|
189
204
|
mergeObjects(mRefreshStrategies, mViewRefreshStrategies);
|
|
190
205
|
}
|
|
191
|
-
var mRefreshStrategy =
|
|
192
|
-
mRefreshStrategies
|
|
193
|
-
|
|
194
|
-
|
|
206
|
+
var mRefreshStrategy = KeepAliveHelper.getRefreshStrategyForIntent(
|
|
207
|
+
mRefreshStrategies,
|
|
208
|
+
sSemanticObject,
|
|
209
|
+
sAction
|
|
210
|
+
);
|
|
195
211
|
if (mRefreshStrategy) {
|
|
196
212
|
oInternalModel.setProperty("/refreshStrategyOnAppRestore", mRefreshStrategy);
|
|
197
213
|
}
|
|
@@ -244,6 +260,14 @@ sap.ui.define(
|
|
|
244
260
|
* @returns {object} Object of prepared attributes for external navigation and no conflict properties.
|
|
245
261
|
*/
|
|
246
262
|
prepareContextForExternalNavigation: function(oSemanticAttributes, oContext) {
|
|
263
|
+
// 1. Find all distinct keys in the object SemanticAttributes
|
|
264
|
+
// Store meta path for each occurence of the key
|
|
265
|
+
var oDistinctKeys = {},
|
|
266
|
+
sContextPath = oContext.getPath(),
|
|
267
|
+
oMetaModel = oContext.getModel().getMetaModel(),
|
|
268
|
+
sMetaPath = oMetaModel.getMetaPath(sContextPath),
|
|
269
|
+
aMetaPathParts = sMetaPath.split("/").filter(Boolean);
|
|
270
|
+
|
|
247
271
|
function _findDistinctKeysInObject(LookUpObject, sLookUpObjectMetaPath) {
|
|
248
272
|
for (var sKey in LookUpObject) {
|
|
249
273
|
// null case??
|
|
@@ -261,13 +285,7 @@ sap.ui.define(
|
|
|
261
285
|
}
|
|
262
286
|
}
|
|
263
287
|
}
|
|
264
|
-
|
|
265
|
-
// Store meta path for each occurence of the key
|
|
266
|
-
var oDistinctKeys = {},
|
|
267
|
-
sContextPath = oContext.getPath(),
|
|
268
|
-
oMetaModel = oContext.getModel().getMetaModel(),
|
|
269
|
-
sMetaPath = oMetaModel.getMetaPath(sContextPath),
|
|
270
|
-
aMetaPathParts = sMetaPath.split("/").filter(Boolean);
|
|
288
|
+
|
|
271
289
|
_findDistinctKeysInObject(oSemanticAttributes, sMetaPath);
|
|
272
290
|
|
|
273
291
|
// 2. Determine distinct key value and add conflicted paths to semantic attributes
|
|
@@ -355,6 +373,7 @@ sap.ui.define(
|
|
|
355
373
|
* @returns {object} Object of prepared filter conditions for external navigation and no conflict filters.
|
|
356
374
|
*/
|
|
357
375
|
prepareFiltersForExternalNavigation: function(oFilterBarConditions, sRootPath, aParameters) {
|
|
376
|
+
var oDistinctKeys = {};
|
|
358
377
|
function _findDistinctKeysInObject(LookUpObject, sLookUpObjectMetaPath) {
|
|
359
378
|
for (var sKey in LookUpObject) {
|
|
360
379
|
if (LookUpObject[sKey]) {
|
|
@@ -375,7 +394,6 @@ sap.ui.define(
|
|
|
375
394
|
}
|
|
376
395
|
}
|
|
377
396
|
}
|
|
378
|
-
var oDistinctKeys = {};
|
|
379
397
|
|
|
380
398
|
_findDistinctKeysInObject(oFilterBarConditions, sRootPath);
|
|
381
399
|
var oFilterConditionsWithoutConflict = {};
|
|
@@ -441,21 +459,21 @@ sap.ui.define(
|
|
|
441
459
|
* @returns {string}
|
|
442
460
|
*/
|
|
443
461
|
getNavigationMode: function() {
|
|
444
|
-
return
|
|
462
|
+
return undefined;
|
|
445
463
|
},
|
|
446
464
|
/**
|
|
447
|
-
* Allows for
|
|
448
|
-
* If
|
|
449
|
-
* This
|
|
465
|
+
* Allows for navigation to a given intent (SemanticObject-Action) with the provided context, using a dialog that shows the contexts which cannot be passed
|
|
466
|
+
* If semantic object mapping is provided, this setting is also applied to the selection variant after adaptation by a consumer.
|
|
467
|
+
* This setting also removes any technical parameters and determines if an inplace or explace navigation should take place.
|
|
450
468
|
*
|
|
451
|
-
* @param {string} sSemanticObject Semantic
|
|
469
|
+
* @param {string} sSemanticObject Semantic object for the target app
|
|
452
470
|
* @param {string} sAction Action for the target app
|
|
453
471
|
* @param {object} [mNavigationParameters] Optional parameters to be passed to the external navigation
|
|
454
|
-
* @param {Array|object} [mNavigationParameters.navigationContexts] Single instance or multiple instances of {@link sap.ui.model.odata.v4.Context} or alternatively an object or array of objects to be passed to intent.
|
|
455
|
-
* @param {Array|object} [mNavigationParameters.applicableContexts] Single instance or multiple instances of {@link sap.ui.model.odata.v4.Context} or alternatively an object or array of objects to be passed to intent and for which the IBN button is enabled
|
|
456
|
-
* @param {Array|object} [mNavigationParameters.notApplicableContexts] Single instance or multiple instances of {@link sap.ui.model.odata.v4.Context} or alternatively an object or array of objects which cannot be passed to the intent.
|
|
472
|
+
* @param {Array|object} [mNavigationParameters.navigationContexts] Single instance or multiple instances of {@link sap.ui.model.odata.v4.Context}, or alternatively an object or array of objects, to be passed to the intent.
|
|
473
|
+
* @param {Array|object} [mNavigationParameters.applicableContexts] Single instance or multiple instances of {@link sap.ui.model.odata.v4.Context}, or alternatively an object or array of objects, to be passed to the intent and for which the IBN button is enabled
|
|
474
|
+
* @param {Array|object} [mNavigationParameters.notApplicableContexts] Single instance or multiple instances of {@link sap.ui.model.odata.v4.Context}, or alternatively an object or array of objects, which cannot be passed to the intent.
|
|
457
475
|
* if an array of contexts is passed the context is used to determine the meta path and accordingly remove the sensitive data
|
|
458
|
-
*
|
|
476
|
+
* If an array of objects is passed, the following format is expected:
|
|
459
477
|
* {
|
|
460
478
|
* data: {
|
|
461
479
|
* ProductID: 7634,
|
|
@@ -656,7 +674,7 @@ sap.ui.define(
|
|
|
656
674
|
}
|
|
657
675
|
var sSemanticObject = oOutbound.semanticObject,
|
|
658
676
|
sAction = oOutbound.action,
|
|
659
|
-
outboundParams = oOutbound.parameters && this.
|
|
677
|
+
outboundParams = oOutbound.parameters && this.getOutboundParams(oOutbound.parameters);
|
|
660
678
|
|
|
661
679
|
if (mNavigationParameters) {
|
|
662
680
|
var aNavParams = [];
|
|
@@ -686,13 +704,29 @@ sap.ui.define(
|
|
|
686
704
|
},
|
|
687
705
|
|
|
688
706
|
/**
|
|
689
|
-
*
|
|
707
|
+
* Method to apply outbound parameters defined in the manifest.
|
|
708
|
+
* @param {object} oSelectionVariant SelectionVariant consisting of a filter bar, a table, and a page context
|
|
709
|
+
* @param {object} vOutboundParams Outbound Properties defined in the manifest
|
|
710
|
+
* @returns {object} - The modified SelectionVariant with outbound parameters.
|
|
711
|
+
*/
|
|
712
|
+
_applyOutboundParams: function(oSelectionVariant, vOutboundParams) {
|
|
713
|
+
var aParameters = Object.keys(vOutboundParams);
|
|
714
|
+
var aSelectProperties = oSelectionVariant.getSelectOptionsPropertyNames();
|
|
715
|
+
aParameters.forEach(function(key) {
|
|
716
|
+
if (!aSelectProperties.includes(key)) {
|
|
717
|
+
oSelectionVariant.addSelectOption(key, "I", "EQ", vOutboundParams[key]);
|
|
718
|
+
}
|
|
719
|
+
});
|
|
720
|
+
return oSelectionVariant;
|
|
721
|
+
},
|
|
722
|
+
/**
|
|
723
|
+
* Method to get the outbound parameters defined in the manifest.
|
|
690
724
|
*
|
|
691
725
|
* @function
|
|
692
726
|
* @param {object} [oOutboundParams] Parameters defined in the outbounds. Only "plain" is supported
|
|
693
727
|
* @returns {Array} Parameters with the key-Value pair
|
|
694
728
|
**/
|
|
695
|
-
|
|
729
|
+
getOutboundParams: function(oOutboundParams) {
|
|
696
730
|
var oParamsMapping = {};
|
|
697
731
|
if (oOutboundParams) {
|
|
698
732
|
var aParameters = Object.keys(oOutboundParams) || [];
|
|
@@ -711,13 +745,13 @@ sap.ui.define(
|
|
|
711
745
|
},
|
|
712
746
|
|
|
713
747
|
/**
|
|
714
|
-
* Triggers an outbound navigation
|
|
748
|
+
* Triggers an outbound navigation when a user chooses the chevron.
|
|
715
749
|
*
|
|
716
750
|
* @param {object} oController
|
|
717
751
|
* @param {string} sOutboundTarget Name of the outbound target (needs to be defined in the manifest)
|
|
718
|
-
* @param {sap.ui.model.odata.v4.Context} oContext The context that
|
|
719
|
-
* @param {string} sCreatePath Create path
|
|
720
|
-
* @returns {Promise} Promise which is resolved once the navigation is triggered
|
|
752
|
+
* @param {sap.ui.model.odata.v4.Context} oContext The context that contains the data for the target app
|
|
753
|
+
* @param {string} sCreatePath Create path when the chevron is created.
|
|
754
|
+
* @returns {Promise} Promise which is resolved once the navigation is triggered
|
|
721
755
|
*/
|
|
722
756
|
|
|
723
757
|
onChevronPressNavigateOutBound: function(oController, sOutboundTarget, oContext, sCreatePath) {
|
|
@@ -725,32 +759,42 @@ sap.ui.define(
|
|
|
725
759
|
.getAppComponent()
|
|
726
760
|
.getRoutingService()
|
|
727
761
|
.getOutbounds(),
|
|
728
|
-
oDisplayOutbound = oOutbounds[sOutboundTarget]
|
|
762
|
+
oDisplayOutbound = oOutbounds[sOutboundTarget],
|
|
763
|
+
additionalNavigationParameters;
|
|
729
764
|
if (oDisplayOutbound && oDisplayOutbound.semanticObject && oDisplayOutbound.action) {
|
|
730
|
-
var oRefreshStrategies = {
|
|
765
|
+
var oRefreshStrategies = {
|
|
766
|
+
intents: {}
|
|
767
|
+
},
|
|
731
768
|
oDefaultRefreshStrategy = {},
|
|
732
769
|
sMetaPath;
|
|
733
770
|
|
|
734
771
|
if (oContext) {
|
|
735
772
|
if (oContext.isA && oContext.isA("sap.ui.model.odata.v4.Context")) {
|
|
736
|
-
sMetaPath =
|
|
773
|
+
sMetaPath = ModelHelper.getMetaPathForContext(oContext);
|
|
737
774
|
oContext = [oContext];
|
|
738
775
|
} else {
|
|
739
|
-
sMetaPath =
|
|
776
|
+
sMetaPath = ModelHelper.getMetaPathForContext(oContext[0]);
|
|
740
777
|
}
|
|
741
778
|
oDefaultRefreshStrategy[sMetaPath] = "self";
|
|
742
|
-
oRefreshStrategies["
|
|
779
|
+
oRefreshStrategies["_feDefault"] = oDefaultRefreshStrategy;
|
|
743
780
|
}
|
|
744
781
|
|
|
745
782
|
if (sCreatePath) {
|
|
746
783
|
var sKey = oDisplayOutbound.semanticObject + "-" + oDisplayOutbound.action;
|
|
747
|
-
oRefreshStrategies[sKey] = {};
|
|
748
|
-
oRefreshStrategies[sKey][sCreatePath] = "self";
|
|
784
|
+
oRefreshStrategies.intents[sKey] = {};
|
|
785
|
+
oRefreshStrategies.intents[sKey][sCreatePath] = "self";
|
|
786
|
+
}
|
|
787
|
+
if (oDisplayOutbound && oDisplayOutbound.parameters) {
|
|
788
|
+
var oParams = oDisplayOutbound.parameters && this.getOutboundParams(oDisplayOutbound.parameters);
|
|
789
|
+
if (Object.keys(oParams).length > 0) {
|
|
790
|
+
additionalNavigationParameters = oParams;
|
|
791
|
+
}
|
|
749
792
|
}
|
|
750
793
|
|
|
751
794
|
oController._intentBasedNavigation.navigate(oDisplayOutbound.semanticObject, oDisplayOutbound.action, {
|
|
752
795
|
navigationContexts: oContext,
|
|
753
|
-
refreshStrategies: oRefreshStrategies
|
|
796
|
+
refreshStrategies: oRefreshStrategies,
|
|
797
|
+
additionalNavigationParameters: additionalNavigationParameters
|
|
754
798
|
});
|
|
755
799
|
|
|
756
800
|
//TODO: check why returning a promise is required
|