@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
|
|
|
6
6
|
sap.ui.define(
|
|
@@ -53,7 +53,7 @@ sap.ui.define(
|
|
|
53
53
|
Fragment
|
|
54
54
|
) {
|
|
55
55
|
"use strict";
|
|
56
|
-
|
|
56
|
+
var CommonUtils;
|
|
57
57
|
var ProgrammingModel = FELibrary.ProgrammingModel;
|
|
58
58
|
|
|
59
59
|
var aValidTypes = [
|
|
@@ -77,9 +77,31 @@ sap.ui.define(
|
|
|
77
77
|
];
|
|
78
78
|
|
|
79
79
|
/**
|
|
80
|
-
*
|
|
80
|
+
* Method to split the search term on spaces and wrap each word in double quotes.
|
|
81
|
+
*
|
|
82
|
+
* @param {string} sSearchTerm The search term
|
|
83
|
+
* @returns {string|undefined} The normalized search term, undefined if empty
|
|
84
|
+
*/
|
|
85
|
+
function normalizeSearchTerm(sSearchTerm) {
|
|
86
|
+
if (!sSearchTerm) {
|
|
87
|
+
return undefined;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
return sSearchTerm
|
|
91
|
+
.replace(/"/g, " ")
|
|
92
|
+
.split(/\s+/)
|
|
93
|
+
.reduce(function(sNormalized, sCurrentWord) {
|
|
94
|
+
if (sCurrentWord !== "") {
|
|
95
|
+
sNormalized = (sNormalized ? sNormalized + " " : "") + '"' + sCurrentWord + '"';
|
|
96
|
+
}
|
|
97
|
+
return sNormalized;
|
|
98
|
+
}, undefined);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Returns the actual property type of a given data field or property.
|
|
81
103
|
*
|
|
82
|
-
* @param {sap.ui.model.Context} oNavigationContext The
|
|
104
|
+
* @param {sap.ui.model.Context} oNavigationContext The MetaModel context
|
|
83
105
|
* @returns {string} The name of the actual data type
|
|
84
106
|
*/
|
|
85
107
|
function getPropertyDataType(oNavigationContext) {
|
|
@@ -272,6 +294,11 @@ sap.ui.define(
|
|
|
272
294
|
return getAppComponent(oControl).getShellServices();
|
|
273
295
|
}
|
|
274
296
|
|
|
297
|
+
function getHash() {
|
|
298
|
+
var sHash = window.location.hash;
|
|
299
|
+
return sHash.split("&")[0];
|
|
300
|
+
}
|
|
301
|
+
|
|
275
302
|
function _getSOIntents(oObjectPageLayout, oSemanticObject, oParam) {
|
|
276
303
|
var oShellServiceHelper = CommonUtils.getShellServices(oObjectPageLayout);
|
|
277
304
|
return oShellServiceHelper.getLinks({
|
|
@@ -284,8 +311,9 @@ sap.ui.define(
|
|
|
284
311
|
function _createMappings(oMapping) {
|
|
285
312
|
var aSOMappings = [];
|
|
286
313
|
var aMappingKeys = Object.keys(oMapping);
|
|
314
|
+
var oSemanticMapping;
|
|
287
315
|
for (var i = 0; i < aMappingKeys.length; i++) {
|
|
288
|
-
|
|
316
|
+
oSemanticMapping = {
|
|
289
317
|
"LocalProperty": {
|
|
290
318
|
"$PropertyPath": aMappingKeys[i]
|
|
291
319
|
},
|
|
@@ -780,7 +808,7 @@ sap.ui.define(
|
|
|
780
808
|
var fnGetLinks = function(oData) {
|
|
781
809
|
if (oData) {
|
|
782
810
|
var aKeys = Object.keys(oData);
|
|
783
|
-
aKeys.
|
|
811
|
+
aKeys.forEach(function(sKey) {
|
|
784
812
|
if (sKey.indexOf("_") !== 0 && sKey.indexOf("odata.context") === -1) {
|
|
785
813
|
oParams[sKey] = { value: oData[sKey] };
|
|
786
814
|
}
|
|
@@ -797,7 +825,7 @@ sap.ui.define(
|
|
|
797
825
|
params: oParams
|
|
798
826
|
})
|
|
799
827
|
.then(function(aLink) {
|
|
800
|
-
oIBNAction.setVisible(aLink && aLink.length === 1);
|
|
828
|
+
oIBNAction.setVisible(oIBNAction.getVisible() && aLink && aLink.length === 1);
|
|
801
829
|
})
|
|
802
830
|
.catch(function(oError) {
|
|
803
831
|
Log.error("Cannot retrieve the links from the shell service", oError);
|
|
@@ -825,8 +853,8 @@ sap.ui.define(
|
|
|
825
853
|
*
|
|
826
854
|
* @param {string} sFrameworkKey Current key.
|
|
827
855
|
* @param {object} oResourceBundle Contains the local resource bundle
|
|
828
|
-
* @param {object} oParams Parameter object for the resource value
|
|
829
|
-
* @param {
|
|
856
|
+
* @param {object} [oParams] Parameter object for the resource value
|
|
857
|
+
* @param {string} [sEntitySetName] EntitySet name of the control where the resource is being used
|
|
830
858
|
* @returns {string} The translated text
|
|
831
859
|
*/
|
|
832
860
|
function getTranslatedText(sFrameworkKey, oResourceBundle, oParams, sEntitySetName) {
|
|
@@ -1448,13 +1476,14 @@ sap.ui.define(
|
|
|
1448
1476
|
* @param {object} oSelectionVariant Instance of {@link sap.fe.navigation.SelectionVariant} SelectionVariant to be used.
|
|
1449
1477
|
* @param {object} mFilters Conditons to be added to the SelectionVariant
|
|
1450
1478
|
* @param {object} oTargetInfo Object returned after selection variant from the table is prepared.
|
|
1479
|
+
* @param {object} oFilterInfo Object containing the converted FilterBar filters
|
|
1451
1480
|
* @returns {object} Instance of {@link sap.fe.navigation.SelectionVariant} SelectionVariant with the conditions.
|
|
1452
1481
|
* @private
|
|
1453
1482
|
* @ui5-restricted
|
|
1454
1483
|
* @example <code>
|
|
1455
1484
|
* </code>
|
|
1456
1485
|
*/
|
|
1457
|
-
function addExternalStateFiltersToSelectionVariant(oSelectionVariant, mFilters, oTargetInfo) {
|
|
1486
|
+
function addExternalStateFiltersToSelectionVariant(oSelectionVariant, mFilters, oTargetInfo, oFilterInfo) {
|
|
1458
1487
|
var sFilter,
|
|
1459
1488
|
sLow = "",
|
|
1460
1489
|
sHigh = null;
|
|
@@ -1485,6 +1514,10 @@ sap.ui.define(
|
|
|
1485
1514
|
case "EQ":
|
|
1486
1515
|
oSelectOptionState.option = sOperator;
|
|
1487
1516
|
break;
|
|
1517
|
+
case "TODAY":
|
|
1518
|
+
case "DATE":
|
|
1519
|
+
oSelectOptionState.option = "EQ";
|
|
1520
|
+
break;
|
|
1488
1521
|
case "EEQ":
|
|
1489
1522
|
oSelectOptionState.option = "EQ";
|
|
1490
1523
|
break;
|
|
@@ -1544,6 +1577,13 @@ sap.ui.define(
|
|
|
1544
1577
|
var oFilter = aFilters[item];
|
|
1545
1578
|
sLow = (oFilter.values[0] && oFilter.values[0].toString()) || "";
|
|
1546
1579
|
sHigh = (oFilter.values[1] && oFilter.values[1].toString()) || null;
|
|
1580
|
+
if (oFilter.operator === "TODAY" || oFilter.operator === "DATE") {
|
|
1581
|
+
var aFilter = oFilterInfo[0].aFilters.filter(function(oFilter) {
|
|
1582
|
+
return oFilter.sPath === sFilter;
|
|
1583
|
+
});
|
|
1584
|
+
sLow = aFilter[0].oValue1 || "";
|
|
1585
|
+
sHigh = null;
|
|
1586
|
+
}
|
|
1547
1587
|
var oSelectOptionValues = fnGetSignAndOption(oFilter.operator, sLow, sHigh);
|
|
1548
1588
|
if (oSelectOptionValues.option) {
|
|
1549
1589
|
oSelectionVariant.addSelectOption(
|
|
@@ -1645,32 +1685,37 @@ sap.ui.define(
|
|
|
1645
1685
|
}
|
|
1646
1686
|
|
|
1647
1687
|
/**
|
|
1648
|
-
*
|
|
1688
|
+
* Defines the user default settings for the SAP Fiori Launchpad.
|
|
1649
1689
|
*
|
|
1650
1690
|
* @function
|
|
1651
1691
|
* @name sap.fe.core.CommonUtils.setUserDefaults
|
|
1652
1692
|
* @memberof sap.fe.core.CommonUtils
|
|
1653
1693
|
* @param {object} [oAppComponent] The AppComponent
|
|
1654
1694
|
* @param {Array} [aParameters] Parameters in the dialog
|
|
1655
|
-
* @param {object} [oModel]
|
|
1695
|
+
* @param {object} [oModel] Model for which the default value has to be set
|
|
1656
1696
|
* @param {boolean} [bIsAction] `true` if aParameters contains action parameters
|
|
1697
|
+
* @param {boolean} [bIsCreate] `true` if preferredMode is 'create'
|
|
1698
|
+
* @param {object} [oActionDefaultValues] Inbound Create Parameters from the Manifest
|
|
1657
1699
|
* @returns {Promise}
|
|
1658
1700
|
* @ui5-restricted
|
|
1659
1701
|
* @final
|
|
1660
1702
|
**/
|
|
1661
|
-
function setUserDefaults(oAppComponent, aParameters, oModel, bIsAction) {
|
|
1703
|
+
function setUserDefaults(oAppComponent, aParameters, oModel, bIsAction, bIsCreate, oActionDefaultValues) {
|
|
1662
1704
|
return new Promise(function(resolve, reject) {
|
|
1663
1705
|
var oComponentData = oAppComponent.getComponentData(),
|
|
1664
1706
|
oStartupParameters = (oComponentData && oComponentData.startupParameters) || {},
|
|
1665
1707
|
oShellServices = oAppComponent.getShellServices();
|
|
1666
|
-
|
|
1667
1708
|
if (!oShellServices.hasUShell()) {
|
|
1668
|
-
aParameters.
|
|
1709
|
+
aParameters.forEach(function(oParameter) {
|
|
1669
1710
|
var sPropertyName = bIsAction
|
|
1670
1711
|
? "/" + oParameter.$Name
|
|
1671
1712
|
: oParameter.getPath().slice(oParameter.getPath().lastIndexOf("/") + 1);
|
|
1672
1713
|
var sParameterName = bIsAction ? sPropertyName.slice(1) : sPropertyName;
|
|
1673
|
-
if (
|
|
1714
|
+
if (oActionDefaultValues && bIsCreate) {
|
|
1715
|
+
if (oActionDefaultValues[sParameterName]) {
|
|
1716
|
+
oModel.setProperty(sPropertyName, oActionDefaultValues[sParameterName]);
|
|
1717
|
+
}
|
|
1718
|
+
} else if (oStartupParameters[sParameterName]) {
|
|
1674
1719
|
oModel.setProperty(sPropertyName, oStartupParameters[sParameterName][0]);
|
|
1675
1720
|
}
|
|
1676
1721
|
});
|
|
@@ -1679,12 +1724,16 @@ sap.ui.define(
|
|
|
1679
1724
|
return oShellServices.getStartupAppState(oAppComponent).then(function(oStartupAppState) {
|
|
1680
1725
|
var oData = oStartupAppState.getData() || {},
|
|
1681
1726
|
aExtendedParameters = (oData.selectionVariant && oData.selectionVariant.SelectOptions) || [];
|
|
1682
|
-
aParameters.
|
|
1727
|
+
aParameters.forEach(function(oParameter) {
|
|
1683
1728
|
var sPropertyName = bIsAction
|
|
1684
1729
|
? "/" + oParameter.$Name
|
|
1685
1730
|
: oParameter.getPath().slice(oParameter.getPath().lastIndexOf("/") + 1);
|
|
1686
1731
|
var sParameterName = bIsAction ? sPropertyName.slice(1) : sPropertyName;
|
|
1687
|
-
if (
|
|
1732
|
+
if (oActionDefaultValues && bIsCreate) {
|
|
1733
|
+
if (oActionDefaultValues[sParameterName]) {
|
|
1734
|
+
oModel.setProperty(sPropertyName, oActionDefaultValues[sParameterName]);
|
|
1735
|
+
}
|
|
1736
|
+
} else if (oStartupParameters[sParameterName]) {
|
|
1688
1737
|
oModel.setProperty(sPropertyName, oStartupParameters[sParameterName][0]);
|
|
1689
1738
|
} else if (aExtendedParameters.length > 0) {
|
|
1690
1739
|
for (var i in aExtendedParameters) {
|
|
@@ -1703,6 +1752,24 @@ sap.ui.define(
|
|
|
1703
1752
|
});
|
|
1704
1753
|
}
|
|
1705
1754
|
|
|
1755
|
+
function getAdditionalParamsForCreate(oStartupParameters, oInboundParameters) {
|
|
1756
|
+
var oInbounds = oInboundParameters,
|
|
1757
|
+
aCreateParameters = oInbounds
|
|
1758
|
+
? Object.keys(oInbounds).filter(function(sParameter) {
|
|
1759
|
+
return oInbounds[sParameter].useForCreate;
|
|
1760
|
+
})
|
|
1761
|
+
: [],
|
|
1762
|
+
oRet;
|
|
1763
|
+
for (var i = 0; i < aCreateParameters.length; i++) {
|
|
1764
|
+
var sCreateParameter = aCreateParameters[i];
|
|
1765
|
+
var aValues = oStartupParameters && oStartupParameters[sCreateParameter];
|
|
1766
|
+
if (aValues && aValues.length === 1) {
|
|
1767
|
+
oRet = oRet || Object.create(null);
|
|
1768
|
+
oRet[sCreateParameter] = aValues[0];
|
|
1769
|
+
}
|
|
1770
|
+
}
|
|
1771
|
+
return oRet;
|
|
1772
|
+
}
|
|
1706
1773
|
/**
|
|
1707
1774
|
* Gets semantic object mappings defined in app descriptor outbounds.
|
|
1708
1775
|
*
|
|
@@ -1857,7 +1924,7 @@ sap.ui.define(
|
|
|
1857
1924
|
.then(function(aValues) {
|
|
1858
1925
|
var aLinks,
|
|
1859
1926
|
_oLink,
|
|
1860
|
-
|
|
1927
|
+
_sLinkIntentAction,
|
|
1861
1928
|
aFinalLinks = [];
|
|
1862
1929
|
var oFinalSemanticObjects = {};
|
|
1863
1930
|
var bIntentHasActions = function(sIntent, aActions) {
|
|
@@ -1882,10 +1949,11 @@ sap.ui.define(
|
|
|
1882
1949
|
var hasTargets = false;
|
|
1883
1950
|
for (var iLinkCount = 0; iLinkCount < aLinks[i][0].length; iLinkCount++) {
|
|
1884
1951
|
_oLink = aLinks[i][0][iLinkCount];
|
|
1885
|
-
|
|
1952
|
+
_sLinkIntentAction = _oLink && _oLink.intent.split("?")[0].split("-")[1];
|
|
1953
|
+
|
|
1886
1954
|
if (!(_oLink && _oLink.intent && _oLink.intent.indexOf(sCurrentHash) === 0)) {
|
|
1887
1955
|
hasTargetsNotFiltered = true;
|
|
1888
|
-
if (!bIntentHasActions(
|
|
1956
|
+
if (!bIntentHasActions(_sLinkIntentAction, aSemanticObjects[k].unavailableActions)) {
|
|
1889
1957
|
aFinalLinks[i].push(_oLink);
|
|
1890
1958
|
hasTargets = true;
|
|
1891
1959
|
}
|
|
@@ -1962,9 +2030,6 @@ sap.ui.define(
|
|
|
1962
2030
|
* @returns {Promise} Once resolved, a promise is returned which is resolved without a result in case of success of setting internal Semantic Targets Model
|
|
1963
2031
|
*/
|
|
1964
2032
|
function fnGetSemanticTargetsFromPageModel(oController, sPageModel) {
|
|
1965
|
-
var _fnfindValues = function(obj, key) {
|
|
1966
|
-
return _fnfindValuesHelper(obj, key, []);
|
|
1967
|
-
};
|
|
1968
2033
|
var _fnfindValuesHelper = function(obj, key, list) {
|
|
1969
2034
|
if (!obj) {
|
|
1970
2035
|
return list;
|
|
@@ -1989,6 +2054,9 @@ sap.ui.define(
|
|
|
1989
2054
|
}
|
|
1990
2055
|
return list;
|
|
1991
2056
|
};
|
|
2057
|
+
var _fnfindValues = function(obj, key) {
|
|
2058
|
+
return _fnfindValuesHelper(obj, key, []);
|
|
2059
|
+
};
|
|
1992
2060
|
var _fnDeleteDuplicateSemanticObjects = function(aSemanticObjectPath) {
|
|
1993
2061
|
return aSemanticObjectPath.filter(function(value, index) {
|
|
1994
2062
|
return aSemanticObjectPath.indexOf(value) === index;
|
|
@@ -2009,7 +2077,7 @@ sap.ui.define(
|
|
|
2009
2077
|
var aSemanticObjectsFound = _fnfindValues(oPageModel, "semanticObjectPath");
|
|
2010
2078
|
aSemanticObjectsFound = _fnDeleteDuplicateSemanticObjects(aSemanticObjectsFound);
|
|
2011
2079
|
var oShellServiceHelper = CommonUtils.getShellServices(oAppComponent);
|
|
2012
|
-
var sCurrentHash =
|
|
2080
|
+
var sCurrentHash = CommonUtils.getHash();
|
|
2013
2081
|
var aSemanticObjectsForGetLinks = [];
|
|
2014
2082
|
var aSemanticObjects = [];
|
|
2015
2083
|
var sPath;
|
|
@@ -2220,20 +2288,39 @@ sap.ui.define(
|
|
|
2220
2288
|
* @ui5-restricted
|
|
2221
2289
|
*/
|
|
2222
2290
|
function addEventToBindingInfo(oControl, sEventName, fHandler) {
|
|
2223
|
-
var oBindingInfo
|
|
2224
|
-
|
|
2225
|
-
if (
|
|
2226
|
-
oBindingInfo.events
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
oBindingInfo.events[sEventName]
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2291
|
+
var oBindingInfo;
|
|
2292
|
+
var setBindingInfo = function() {
|
|
2293
|
+
if (oBindingInfo) {
|
|
2294
|
+
if (!oBindingInfo.events) {
|
|
2295
|
+
oBindingInfo.events = {};
|
|
2296
|
+
}
|
|
2297
|
+
if (!oBindingInfo.events[sEventName]) {
|
|
2298
|
+
oBindingInfo.events[sEventName] = fHandler;
|
|
2299
|
+
} else {
|
|
2300
|
+
var fOriginalHandler = oBindingInfo.events[sEventName];
|
|
2301
|
+
oBindingInfo.events[sEventName] = function() {
|
|
2302
|
+
fHandler.apply(this, arguments);
|
|
2303
|
+
fOriginalHandler.apply(this, arguments);
|
|
2304
|
+
};
|
|
2305
|
+
}
|
|
2236
2306
|
}
|
|
2307
|
+
};
|
|
2308
|
+
if (oControl.isA("sap.ui.mdc.Chart")) {
|
|
2309
|
+
oControl
|
|
2310
|
+
.innerChartBound()
|
|
2311
|
+
.then(function() {
|
|
2312
|
+
oBindingInfo = oControl
|
|
2313
|
+
.getControlDelegate()
|
|
2314
|
+
._getChart(oControl)
|
|
2315
|
+
.getBindingInfo("data");
|
|
2316
|
+
setBindingInfo();
|
|
2317
|
+
})
|
|
2318
|
+
.catch(function(sError) {
|
|
2319
|
+
Log.error(sError);
|
|
2320
|
+
});
|
|
2321
|
+
} else {
|
|
2322
|
+
oBindingInfo = oControl.data("rowsBindingInfo");
|
|
2323
|
+
setBindingInfo();
|
|
2237
2324
|
}
|
|
2238
2325
|
}
|
|
2239
2326
|
|
|
@@ -2245,181 +2332,7 @@ sap.ui.define(
|
|
|
2245
2332
|
});
|
|
2246
2333
|
}
|
|
2247
2334
|
|
|
2248
|
-
|
|
2249
|
-
* Check if given path resides in the context path provided.
|
|
2250
|
-
*
|
|
2251
|
-
* @function
|
|
2252
|
-
* @name sap.fe.core.CommonUtils.isPathApplicableToContextPath
|
|
2253
|
-
* @memberof sap.fe.core.CommonUtils
|
|
2254
|
-
* @param {object} [oMetaModel] MetaModel to be used
|
|
2255
|
-
* @param {string} [sContextPath] Context path to be used
|
|
2256
|
-
* @param {string} [sPath] Path to be used
|
|
2257
|
-
* @param {string} [sStrategy] Strategy, it could be 'self' | 'includingDependents'
|
|
2258
|
-
* @returns {boolean} If path is applicable to context.
|
|
2259
|
-
**/
|
|
2260
|
-
function isPathApplicableToContextPath(oMetaModel, sContextPath, sPath, sStrategy) {
|
|
2261
|
-
var sContextPathToCheck = sContextPath.startsWith("/") ? sContextPath : "/" + sContextPath,
|
|
2262
|
-
sPathToCheck = sPath.startsWith("/") ? sPath : "/" + sPath,
|
|
2263
|
-
fnIsApplicable = function(sPrimaryPath, sKey) {
|
|
2264
|
-
return sPrimaryPath === sKey || (sStrategy === "includingDependents" && sPrimaryPath.startsWith(sKey));
|
|
2265
|
-
},
|
|
2266
|
-
fnSimplifyEntitySetPath = function(sEntitySetPathToUse) {
|
|
2267
|
-
var sEntitySetPath = ModelHelper.getEntitySetPath(sEntitySetPathToUse);
|
|
2268
|
-
var sEntitySet = sEntitySetPath.indexOf("$NavigationPropertyBinding") > -1 && oMetaModel.getObject(sEntitySetPath);
|
|
2269
|
-
return sEntitySet ? "/" + sEntitySet : sEntitySetPathToUse;
|
|
2270
|
-
};
|
|
2271
|
-
|
|
2272
|
-
if (!fnIsApplicable(sContextPathToCheck, sPathToCheck)) {
|
|
2273
|
-
sContextPathToCheck = fnSimplifyEntitySetPath(sContextPathToCheck);
|
|
2274
|
-
|
|
2275
|
-
if (!fnIsApplicable(sContextPathToCheck, sPathToCheck)) {
|
|
2276
|
-
sPathToCheck = fnSimplifyEntitySetPath(sPathToCheck);
|
|
2277
|
-
} else {
|
|
2278
|
-
return true;
|
|
2279
|
-
}
|
|
2280
|
-
}
|
|
2281
|
-
|
|
2282
|
-
return fnIsApplicable(sContextPathToCheck, sPathToCheck);
|
|
2283
|
-
}
|
|
2284
|
-
|
|
2285
|
-
/**
|
|
2286
|
-
* Get controls to refresh in a view.
|
|
2287
|
-
*
|
|
2288
|
-
* @function
|
|
2289
|
-
* @name sap.fe.core.CommonUtils.getControlsForRefresh
|
|
2290
|
-
* @memberof sap.fe.core.CommonUtils
|
|
2291
|
-
* @param {object} [oView] View of the controls
|
|
2292
|
-
* @param {Array} [aViewControls] Controls to be checked
|
|
2293
|
-
* @returns {Array} Controls that need to be refreshed
|
|
2294
|
-
**/
|
|
2295
|
-
function getControlsForRefresh(oView, aViewControls) {
|
|
2296
|
-
var aControls = [],
|
|
2297
|
-
oMetaModel = oView.getModel().getMetaModel(),
|
|
2298
|
-
oInternalModel = oView.getModel("internal"),
|
|
2299
|
-
oRefreshStrategyForKeepAliveRestore = oInternalModel.getProperty("/refreshStrategyOnAppRestore") || {};
|
|
2300
|
-
|
|
2301
|
-
if (aViewControls) {
|
|
2302
|
-
aViewControls.forEach(function(oControl) {
|
|
2303
|
-
var sContextPath = oControl.data("targetCollectionPath");
|
|
2304
|
-
|
|
2305
|
-
for (var sKey in oRefreshStrategyForKeepAliveRestore) {
|
|
2306
|
-
var sStrategy = oRefreshStrategyForKeepAliveRestore[sKey];
|
|
2307
|
-
if (CommonUtils.isPathApplicableToContextPath(oMetaModel, sContextPath, sKey, sStrategy)) {
|
|
2308
|
-
aControls.push(oControl);
|
|
2309
|
-
}
|
|
2310
|
-
}
|
|
2311
|
-
});
|
|
2312
|
-
}
|
|
2313
|
-
|
|
2314
|
-
return aControls;
|
|
2315
|
-
}
|
|
2316
|
-
|
|
2317
|
-
/**
|
|
2318
|
-
* Get refresh strategy for the control for a context path.
|
|
2319
|
-
*
|
|
2320
|
-
* @function
|
|
2321
|
-
* @name sap.fe.core.CommonUtils.getControlRefreshStrategyForContextPath
|
|
2322
|
-
* @memberof sap.fe.core.CommonUtils
|
|
2323
|
-
* @param {object} [oControl] Control from which refresh info is needed
|
|
2324
|
-
* @param {string} sContextPath ContextPath for properities
|
|
2325
|
-
* @returns {string} Strategy for control refresh
|
|
2326
|
-
**/
|
|
2327
|
-
|
|
2328
|
-
function getControlRefreshStrategyForContextPath(oControl, sContextPath) {
|
|
2329
|
-
var oMetaModel = oControl.getModel().getMetaModel(),
|
|
2330
|
-
oInternalModel = oControl.getModel("internal"),
|
|
2331
|
-
oRefreshStrategyForKeepAliveRestore = oInternalModel.getProperty("/refreshStrategyOnAppRestore"),
|
|
2332
|
-
sStrategy;
|
|
2333
|
-
|
|
2334
|
-
if (sContextPath) {
|
|
2335
|
-
for (var sKey in oRefreshStrategyForKeepAliveRestore) {
|
|
2336
|
-
var sStrategyToCheck = oRefreshStrategyForKeepAliveRestore[sKey];
|
|
2337
|
-
if (CommonUtils.isPathApplicableToContextPath(oMetaModel, sContextPath, sKey, sStrategyToCheck)) {
|
|
2338
|
-
sStrategy = sStrategyToCheck;
|
|
2339
|
-
if (sStrategy === "includingDependents") {
|
|
2340
|
-
break;
|
|
2341
|
-
}
|
|
2342
|
-
}
|
|
2343
|
-
}
|
|
2344
|
-
}
|
|
2345
|
-
|
|
2346
|
-
return sStrategy;
|
|
2347
|
-
}
|
|
2348
|
-
|
|
2349
|
-
/**
|
|
2350
|
-
* Get refresh info from view.
|
|
2351
|
-
*
|
|
2352
|
-
* @function
|
|
2353
|
-
* @name sap.fe.core.CommonUtils.getViewRefreshInfo
|
|
2354
|
-
* @memberof sap.fe.core.CommonUtils
|
|
2355
|
-
* @param {object} [oView] View from which refresh info is needed
|
|
2356
|
-
* @returns {string} Strategy for view refresh
|
|
2357
|
-
**/
|
|
2358
|
-
function getViewRefreshInfo(oView) {
|
|
2359
|
-
var mViewData = oView.getViewData(),
|
|
2360
|
-
sContextPath = mViewData && (mViewData.contextPath || "/" + mViewData.entitySet);
|
|
2361
|
-
|
|
2362
|
-
return CommonUtils.getControlRefreshStrategyForContextPath(oView, sContextPath);
|
|
2363
|
-
}
|
|
2364
|
-
|
|
2365
|
-
/**
|
|
2366
|
-
* Get MetaPath for the context.
|
|
2367
|
-
*
|
|
2368
|
-
* @function
|
|
2369
|
-
* @name sap.fe.core.CommonUtils.getMetaPathForContext
|
|
2370
|
-
* @memberof sap.fe.core.CommonUtils
|
|
2371
|
-
* @param {object} [oContext] Outbound defined in app descriptor
|
|
2372
|
-
* @returns {string} Meta path for the context
|
|
2373
|
-
**/
|
|
2374
|
-
function getMetaPathForContext(oContext) {
|
|
2375
|
-
var oModel = oContext && oContext.getModel && oContext.getModel(),
|
|
2376
|
-
oMetaModel = oModel && oModel.getMetaModel && oModel.getMetaModel(),
|
|
2377
|
-
sPath = oContext && oContext.getPath && oContext.getPath();
|
|
2378
|
-
|
|
2379
|
-
return oMetaModel && sPath && oMetaModel.getMetaPath && oMetaModel.getMetaPath(sPath);
|
|
2380
|
-
}
|
|
2381
|
-
|
|
2382
|
-
/**
|
|
2383
|
-
* Get MetaPath for the listbinding.
|
|
2384
|
-
*
|
|
2385
|
-
* @function
|
|
2386
|
-
* @name sap.fe.core.CommonUtils.getAbsoluteMetaPathForListBinding
|
|
2387
|
-
* @memberof sap.fe.core.CommonUtils
|
|
2388
|
-
* @param {object} [oView] The View
|
|
2389
|
-
* @param {sap.ui.model.odata.v4.ODataListBinding|string} vListBinding ODataListBinding object or the binding path for a temporary list binding
|
|
2390
|
-
* @returns {string} Meta path for the listbinding
|
|
2391
|
-
**/
|
|
2392
|
-
function getAbsoluteMetaPathForListBinding(oView, vListBinding) {
|
|
2393
|
-
var oMetaModel = oView.getModel().getMetaModel(),
|
|
2394
|
-
sMetaPath;
|
|
2395
|
-
if (vListBinding && typeof vListBinding === "object") {
|
|
2396
|
-
// we already get a list binding use this one
|
|
2397
|
-
var oBinding = vListBinding;
|
|
2398
|
-
var oRootBinding = oBinding.getRootBinding();
|
|
2399
|
-
if (oBinding === oRootBinding) {
|
|
2400
|
-
// absolute path
|
|
2401
|
-
sMetaPath = oMetaModel.getMetaPath(oBinding.getPath());
|
|
2402
|
-
} else {
|
|
2403
|
-
// relative path
|
|
2404
|
-
var sRootBindingPath = oRootBinding.getPath();
|
|
2405
|
-
var sRelativePath = oBinding.getPath();
|
|
2406
|
-
sMetaPath = oMetaModel.getMetaPath(sRootBindingPath + "/" + sRelativePath);
|
|
2407
|
-
}
|
|
2408
|
-
} else if (typeof vListBinding === "string") {
|
|
2409
|
-
if (vListBinding.startsWith("/")) {
|
|
2410
|
-
// absolute path
|
|
2411
|
-
sMetaPath = oMetaModel.getMetaPath(vListBinding);
|
|
2412
|
-
} else {
|
|
2413
|
-
// relative path
|
|
2414
|
-
var oBindingContext = oView.getBindingContext();
|
|
2415
|
-
var sRootContextPath = oBindingContext.getPath();
|
|
2416
|
-
sMetaPath = oMetaModel.getMetaPath(sRootContextPath + "/" + vListBinding);
|
|
2417
|
-
}
|
|
2418
|
-
}
|
|
2419
|
-
return sMetaPath;
|
|
2420
|
-
}
|
|
2421
|
-
|
|
2422
|
-
var CommonUtils = {
|
|
2335
|
+
CommonUtils = {
|
|
2423
2336
|
isPropertyFilterable: isPropertyFilterable,
|
|
2424
2337
|
isFieldControlPathInapplicable: isFieldControlPathInapplicable,
|
|
2425
2338
|
removeSensitiveData: removeSensitiveData,
|
|
@@ -2448,6 +2361,7 @@ sap.ui.define(
|
|
|
2448
2361
|
getNonComputedVisibleFields: getNonComputedVisibleFields,
|
|
2449
2362
|
setUserDefaults: setUserDefaults,
|
|
2450
2363
|
getShellServices: getShellServices,
|
|
2364
|
+
getHash: getHash,
|
|
2451
2365
|
getIBNActions: fnGetIBNActions,
|
|
2452
2366
|
getHeaderFacetItemConfigForExternalNavigation: getHeaderFacetItemConfigForExternalNavigation,
|
|
2453
2367
|
getSemanticObjectMapping: getSemanticObjectMapping,
|
|
@@ -2461,6 +2375,7 @@ sap.ui.define(
|
|
|
2461
2375
|
getSearchRestrictions: getSearchRestrictions,
|
|
2462
2376
|
getFilterRestrictionsByPath: getFilterRestrictionsByPath,
|
|
2463
2377
|
getSpecificAllowedExpression: getSpecificAllowedExpression,
|
|
2378
|
+
getAdditionalParamsForCreate: getAdditionalParamsForCreate,
|
|
2464
2379
|
requestSingletonProperty: requestSingletonProperty,
|
|
2465
2380
|
templateControlFragment: templateControlFragment,
|
|
2466
2381
|
addEventToBindingInfo: addEventToBindingInfo,
|
|
@@ -2478,12 +2393,7 @@ sap.ui.define(
|
|
|
2478
2393
|
"MultiRangeOrSearchExpression"
|
|
2479
2394
|
],
|
|
2480
2395
|
fnProcessDataLossOrDraftDiscardConfirmation: fnProcessDataLossOrDraftDiscardConfirmation,
|
|
2481
|
-
|
|
2482
|
-
getControlsForRefresh: getControlsForRefresh,
|
|
2483
|
-
getViewRefreshInfo: getViewRefreshInfo,
|
|
2484
|
-
getMetaPathForContext: getMetaPathForContext,
|
|
2485
|
-
getAbsoluteMetaPathForListBinding: getAbsoluteMetaPathForListBinding,
|
|
2486
|
-
getControlRefreshStrategyForContextPath: getControlRefreshStrategyForContextPath
|
|
2396
|
+
normalizeSearchTerm: normalizeSearchTerm
|
|
2487
2397
|
};
|
|
2488
2398
|
|
|
2489
2399
|
return CommonUtils;
|
|
@@ -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
|
["sap/ui/base/Object", "sap/fe/core/CommonUtils", "sap/base/Log", "sap/ui/core/Component", "sap/ui/model/json/JSONModel"],
|
|
@@ -157,11 +157,12 @@ sap.ui.define(
|
|
|
157
157
|
* @alias sap.fe.core.ExtensionAPI#navigateToTarget
|
|
158
158
|
* @param {string} sTarget Name of the target route
|
|
159
159
|
* @param {sap.ui.model.Context} [oContext] Context instance
|
|
160
|
+
* @returns {Promise} Promise that is resolved when the navigation is finalized
|
|
160
161
|
*
|
|
161
162
|
* @public
|
|
162
163
|
*/
|
|
163
164
|
navigateToTarget: function(sTarget, oContext) {
|
|
164
|
-
this._controller._routing.navigateToTarget(oContext, sTarget);
|
|
165
|
+
return this._controller._routing.navigateToTarget(oContext, sTarget);
|
|
165
166
|
},
|
|
166
167
|
|
|
167
168
|
/**
|
|
@@ -229,10 +230,17 @@ sap.ui.define(
|
|
|
229
230
|
* @public
|
|
230
231
|
*/
|
|
231
232
|
updateAppState: function() {
|
|
232
|
-
|
|
233
|
-
.
|
|
234
|
-
|
|
235
|
-
|
|
233
|
+
if (
|
|
234
|
+
!this._controller
|
|
235
|
+
.getAppComponent()
|
|
236
|
+
.getModel("internal")
|
|
237
|
+
.getProperty("/uiAdaptation")
|
|
238
|
+
) {
|
|
239
|
+
return this._controller
|
|
240
|
+
.getAppComponent()
|
|
241
|
+
.getAppStateHandler()
|
|
242
|
+
.createAppState();
|
|
243
|
+
}
|
|
236
244
|
},
|
|
237
245
|
|
|
238
246
|
/**
|
|
@@ -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
|
[
|
|
@@ -17,7 +17,9 @@ sap.ui.define(
|
|
|
17
17
|
"sap/fe/core/controllerextensions/Share",
|
|
18
18
|
"sap/fe/core/controllerextensions/ViewState",
|
|
19
19
|
"sap/fe/core/controllerextensions/Paginator",
|
|
20
|
-
"sap/fe/core/controllerextensions/Placeholder"
|
|
20
|
+
"sap/fe/core/controllerextensions/Placeholder",
|
|
21
|
+
"sap/fe/core/controllerextensions/SideEffects",
|
|
22
|
+
"sap/fe/core/controllerextensions/MassEdit"
|
|
21
23
|
],
|
|
22
24
|
function(
|
|
23
25
|
Controller,
|
|
@@ -33,7 +35,9 @@ sap.ui.define(
|
|
|
33
35
|
Share,
|
|
34
36
|
ViewState,
|
|
35
37
|
Paginator,
|
|
36
|
-
Placeholder
|
|
38
|
+
Placeholder,
|
|
39
|
+
SideEffects,
|
|
40
|
+
MassEdit
|
|
37
41
|
) {
|
|
38
42
|
"use strict";
|
|
39
43
|
|
|
@@ -60,6 +64,8 @@ sap.ui.define(
|
|
|
60
64
|
paginator: Paginator,
|
|
61
65
|
viewState: ViewState,
|
|
62
66
|
placeholder: Placeholder,
|
|
67
|
+
_sideEffects: SideEffects,
|
|
68
|
+
massEdit: MassEdit,
|
|
63
69
|
/**
|
|
64
70
|
* @private
|
|
65
71
|
* @name sap.fe.core.PageController.getMetadata
|
|
@@ -121,38 +127,6 @@ sap.ui.define(
|
|
|
121
127
|
this.getAppComponent()
|
|
122
128
|
.getAppStateHandler()
|
|
123
129
|
.applyAppState();
|
|
124
|
-
},
|
|
125
|
-
commonFormatters: {
|
|
126
|
-
compareTitleFromTableAndTab: function(headerVisible, tableTitle, tabTitle, thisController) {
|
|
127
|
-
if (typeof headerVisible !== "boolean") {
|
|
128
|
-
headerVisible = headerVisible === "true";
|
|
129
|
-
}
|
|
130
|
-
function _seekingFinalString(i18nValue) {
|
|
131
|
-
var i18nSearch = i18nValue.slice(i18nValue.indexOf(">") + 1, -1);
|
|
132
|
-
var modelToSearch = i18nValue.slice(1, i18nValue.indexOf(">"));
|
|
133
|
-
if (thisController.getAppComponent().getModel(modelToSearch)) {
|
|
134
|
-
return thisController
|
|
135
|
-
.getAppComponent()
|
|
136
|
-
.getModel(modelToSearch)
|
|
137
|
-
.getResourceBundle()
|
|
138
|
-
.getText(i18nSearch);
|
|
139
|
-
} else if (thisController.getAppComponent().getModel("i18n")) {
|
|
140
|
-
return thisController
|
|
141
|
-
.getAppComponent()
|
|
142
|
-
.getModel("i18n")
|
|
143
|
-
.getResourceBundle()
|
|
144
|
-
.getText(i18nSearch);
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
if (tableTitle.includes("i18n")) {
|
|
149
|
-
tableTitle = _seekingFinalString(tableTitle);
|
|
150
|
-
}
|
|
151
|
-
if (tabTitle.includes("i18n")) {
|
|
152
|
-
tabTitle = _seekingFinalString(tabTitle);
|
|
153
|
-
}
|
|
154
|
-
return headerVisible && !(tableTitle == tabTitle);
|
|
155
|
-
}
|
|
156
130
|
}
|
|
157
131
|
});
|
|
158
132
|
}
|