@sapui5/sap.fe.core 1.95.0 → 1.96.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/sap/fe/core/.library +1 -1
- package/src/sap/fe/core/AnnotationHelper.js +3 -3
- package/src/sap/fe/core/AppComponent.js +7 -43
- package/src/sap/fe/core/AppStateHandler.js +18 -4
- 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 +136 -19
- package/src/sap/fe/core/ExtensionAPI.js +1 -1
- package/src/sap/fe/core/PageController.js +1 -33
- package/src/sap/fe/core/RouterProxy.js +59 -69
- package/src/sap/fe/core/Synchronization.js +1 -1
- package/src/sap/fe/core/TemplateComponent.js +3 -3
- package/src/sap/fe/core/TemplateModel.js +1 -1
- package/src/sap/fe/core/TransactionHelper.js +87 -6
- package/src/sap/fe/core/actions/draft.js +1 -1
- package/src/sap/fe/core/actions/messageHandling.js +1 -1
- package/src/sap/fe/core/actions/nonDraft.js +1 -1
- package/src/sap/fe/core/actions/operations.js +22 -3
- 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 +74 -48
- package/src/sap/fe/core/controllerextensions/IntentBasedNavigation.js +1 -1
- package/src/sap/fe/core/controllerextensions/InternalEditFlow.js +5 -4
- package/src/sap/fe/core/controllerextensions/InternalIntentBasedNavigation.js +64 -28
- package/src/sap/fe/core/controllerextensions/InternalRouting.js +194 -223
- package/src/sap/fe/core/controllerextensions/KPIManagement.js +460 -207
- package/src/sap/fe/core/controllerextensions/KPIManagement.ts +475 -213
- package/src/sap/fe/core/controllerextensions/MessageHandler.js +1 -1
- package/src/sap/fe/core/controllerextensions/PageReady.js +1 -1
- package/src/sap/fe/core/controllerextensions/PageReady.ts +3 -7
- package/src/sap/fe/core/controllerextensions/Paginator.js +4 -5
- package/src/sap/fe/core/controllerextensions/Placeholder.js +11 -17
- package/src/sap/fe/core/controllerextensions/Routing.js +1 -1
- 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 +2 -3
- package/src/sap/fe/core/controllerextensions/SideEffects.ts +13 -12
- package/src/sap/fe/core/controllerextensions/ViewState.js +21 -3
- 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/CommandExecution.js +1 -1
- package/src/sap/fe/core/controls/ConditionalWrapper.js +1 -1
- package/src/sap/fe/core/controls/CustomQuickViewPage.js +4 -1
- package/src/sap/fe/core/controls/DataLossOrDraftDiscard/DataLossOrDraftDiscardHandler.js +1 -1
- package/src/sap/fe/core/controls/FieldWrapper.js +1 -1
- package/src/sap/fe/core/controls/FilterBar.js +1 -1
- package/src/sap/fe/core/controls/FormElementWrapper.js +1 -1
- package/src/sap/fe/core/controls/MultiValueParameterDelegate.js +45 -0
- 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/converters/MetaModelConverter.js +852 -881
- package/src/sap/fe/core/converters/MetaModelConverter.ts +761 -849
- package/src/sap/fe/core/converters/annotations/DataField.js +52 -2
- package/src/sap/fe/core/converters/annotations/DataField.ts +52 -2
- 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 +16 -8
- package/src/sap/fe/core/converters/controls/Common/Form.ts +9 -3
- package/src/sap/fe/core/converters/controls/Common/KPI.js +271 -253
- package/src/sap/fe/core/converters/controls/Common/KPI.ts +287 -291
- package/src/sap/fe/core/converters/controls/Common/Table.js +196 -102
- package/src/sap/fe/core/converters/controls/Common/Table.ts +240 -109
- 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/BindingHelper.js +3 -2
- package/src/sap/fe/core/converters/helpers/BindingHelper.ts +2 -2
- package/src/sap/fe/core/converters/helpers/ID.js +1 -1
- package/src/sap/fe/core/converters/helpers/ID.ts +2 -2
- package/src/sap/fe/core/converters/helpers/IssueManager.js +4 -5
- package/src/sap/fe/core/converters/helpers/IssueManager.ts +3 -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 +20 -1
- package/src/sap/fe/core/converters/templates/ListReportConverter.ts +25 -1
- 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 +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/fpm/Component.js +2 -2
- package/src/sap/fe/core/helpers/BindingExpression.js +34 -2
- package/src/sap/fe/core/helpers/BindingExpression.ts +24 -1
- 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/ModelHelper.js +13 -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 +2 -2
- package/src/sap/fe/core/library.support.js +1 -1
- package/src/sap/fe/core/messagebundle.properties +18 -3
- package/src/sap/fe/core/messagebundle_ar.properties +8 -3
- package/src/sap/fe/core/messagebundle_bg.properties +8 -3
- package/src/sap/fe/core/messagebundle_ca.properties +9 -4
- package/src/sap/fe/core/messagebundle_cs.properties +8 -3
- package/src/sap/fe/core/messagebundle_cy.properties +8 -3
- package/src/sap/fe/core/messagebundle_da.properties +8 -3
- package/src/sap/fe/core/messagebundle_de.properties +8 -3
- package/src/sap/fe/core/messagebundle_el.properties +8 -3
- package/src/sap/fe/core/messagebundle_en.properties +5 -0
- package/src/sap/fe/core/messagebundle_en_GB.properties +5 -0
- package/src/sap/fe/core/messagebundle_en_US_sappsd.properties +5 -0
- package/src/sap/fe/core/messagebundle_en_US_saprigi.properties +20 -2
- package/src/sap/fe/core/messagebundle_en_US_saptrc.properties +12 -0
- package/src/sap/fe/core/messagebundle_es.properties +8 -3
- package/src/sap/fe/core/messagebundle_es_MX.properties +9 -4
- package/src/sap/fe/core/messagebundle_et.properties +8 -3
- package/src/sap/fe/core/messagebundle_fi.properties +8 -3
- package/src/sap/fe/core/messagebundle_fr.properties +8 -3
- package/src/sap/fe/core/messagebundle_fr_CA.properties +8 -3
- package/src/sap/fe/core/messagebundle_hi.properties +8 -3
- package/src/sap/fe/core/messagebundle_hr.properties +8 -3
- package/src/sap/fe/core/messagebundle_hu.properties +8 -3
- package/src/sap/fe/core/messagebundle_id.properties +7 -2
- package/src/sap/fe/core/messagebundle_it.properties +8 -3
- package/src/sap/fe/core/messagebundle_iw.properties +8 -3
- package/src/sap/fe/core/messagebundle_ja.properties +8 -3
- package/src/sap/fe/core/messagebundle_kk.properties +8 -3
- package/src/sap/fe/core/messagebundle_ko.properties +8 -3
- package/src/sap/fe/core/messagebundle_lt.properties +8 -3
- package/src/sap/fe/core/messagebundle_lv.properties +8 -3
- package/src/sap/fe/core/messagebundle_ms.properties +8 -3
- package/src/sap/fe/core/messagebundle_nl.properties +8 -3
- package/src/sap/fe/core/messagebundle_no.properties +8 -3
- package/src/sap/fe/core/messagebundle_pl.properties +8 -3
- package/src/sap/fe/core/messagebundle_pt.properties +8 -3
- package/src/sap/fe/core/messagebundle_pt_PT.properties +8 -3
- package/src/sap/fe/core/messagebundle_ro.properties +8 -3
- package/src/sap/fe/core/messagebundle_ru.properties +8 -3
- package/src/sap/fe/core/messagebundle_sh.properties +8 -3
- package/src/sap/fe/core/messagebundle_sk.properties +8 -3
- package/src/sap/fe/core/messagebundle_sl.properties +8 -3
- package/src/sap/fe/core/messagebundle_sv.properties +8 -3
- package/src/sap/fe/core/messagebundle_th.properties +8 -3
- package/src/sap/fe/core/messagebundle_tr.properties +8 -3
- package/src/sap/fe/core/messagebundle_uk.properties +8 -3
- package/src/sap/fe/core/messagebundle_vi.properties +8 -3
- package/src/sap/fe/core/messagebundle_zh_CN.properties +8 -3
- package/src/sap/fe/core/messagebundle_zh_TW.properties +8 -3
- package/src/sap/fe/core/services/CacheHandlerServiceFactory.js +1 -1
- 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 +70 -33
- package/src/sap/fe/core/services/SideEffectsServiceFactory.js +2 -2
- package/src/sap/fe/core/services/SideEffectsServiceFactory.ts +1 -1
- package/src/sap/fe/core/services/TemplatedViewServiceFactory.js +1 -1
- package/src/sap/fe/core/services/view/TemplatingErrorPage.controller.js +1 -1
- package/src/sap/fe/core/templating/DataModelPathHelper.js +3 -14
- package/src/sap/fe/core/templating/DataModelPathHelper.ts +3 -10
- 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/UIFormatters.js +39 -1
- package/src/sap/fe/core/templating/UIFormatters.ts +73 -1
package/package.json
CHANGED
package/src/sap/fe/core/.library
CHANGED
|
@@ -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(
|
|
@@ -362,8 +362,8 @@ sap.ui.define(
|
|
|
362
362
|
buildActionWrapper: function(oAction, oThis) {
|
|
363
363
|
var aParams = [
|
|
364
364
|
"$event",
|
|
365
|
-
CommonHelper.addSingleQuotes(oAction.handlerModule),
|
|
366
|
-
CommonHelper.addSingleQuotes(oAction.handlerMethod)
|
|
365
|
+
CommonHelper.addSingleQuotes(oAction.handlerModule, true),
|
|
366
|
+
CommonHelper.addSingleQuotes(oAction.handlerMethod, true)
|
|
367
367
|
];
|
|
368
368
|
|
|
369
369
|
if (oThis && oThis.id) {
|
|
@@ -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
|
// ----------------------------------------------------------------------------------
|
|
@@ -17,7 +17,6 @@ sap.ui.define(
|
|
|
17
17
|
"sap/ui/model/json/JSONModel",
|
|
18
18
|
"sap/fe/core/library",
|
|
19
19
|
"sap/fe/core/helpers/SemanticDateOperators",
|
|
20
|
-
"sap/ui/core/CustomizingConfiguration",
|
|
21
20
|
"sap/ui/core/Component",
|
|
22
21
|
"sap/fe/core/TemplateComponent",
|
|
23
22
|
"sap/fe/core/helpers/ModelHelper",
|
|
@@ -34,7 +33,6 @@ sap.ui.define(
|
|
|
34
33
|
JSONModel,
|
|
35
34
|
library,
|
|
36
35
|
SemanticDateOperators,
|
|
37
|
-
CustomizingConfiguration,
|
|
38
36
|
Component,
|
|
39
37
|
TemplateComponent,
|
|
40
38
|
ModelHelper,
|
|
@@ -43,34 +41,6 @@ sap.ui.define(
|
|
|
43
41
|
) {
|
|
44
42
|
"use strict";
|
|
45
43
|
|
|
46
|
-
// ----- <Remove> -----
|
|
47
|
-
// Can be removed once core change is merged
|
|
48
|
-
|
|
49
|
-
// monkey patch the sap.ui.core.CustomizingConfiguration#getControllerExtension:
|
|
50
|
-
var fGetControllerExtension = CustomizingConfiguration.getControllerExtension;
|
|
51
|
-
CustomizingConfiguration.getControllerExtension = function(sControllerName, vObject) {
|
|
52
|
-
var oComponent = getAppComponent(vObject),
|
|
53
|
-
sComponentId = oComponent && oComponent.getId(),
|
|
54
|
-
oResultConfig = fGetControllerExtension.call(CustomizingConfiguration, sControllerName, sComponentId);
|
|
55
|
-
return oResultConfig;
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
function getAppComponent(vObject) {
|
|
59
|
-
// check whether a context is given and determine a componentId from it
|
|
60
|
-
// - either it is a string, then this is the pre-processor use case and the string is a component id
|
|
61
|
-
// - or it is a view or fragment and the Id of the owner component should be used
|
|
62
|
-
var sComponentId = vObject && typeof vObject === "string" ? vObject : vObject && Component.getOwnerIdFor(vObject);
|
|
63
|
-
// retrieve the component (if an Id is known)
|
|
64
|
-
var oComponent = sComponentId && Component.get(sComponentId);
|
|
65
|
-
// only when it inherits from TemplateComponent, ask for the AppComponent instead
|
|
66
|
-
if (oComponent instanceof TemplateComponent) {
|
|
67
|
-
oComponent = oComponent.oAppComponent;
|
|
68
|
-
}
|
|
69
|
-
// return the AppComponent
|
|
70
|
-
return oComponent;
|
|
71
|
-
}
|
|
72
|
-
// ----- </Remove> -----
|
|
73
|
-
|
|
74
44
|
var NAVCONF = {
|
|
75
45
|
FCL: {
|
|
76
46
|
VIEWNAME: "sap.fe.templates.RootContainer.view.Fcl",
|
|
@@ -389,16 +359,6 @@ sap.ui.define(
|
|
|
389
359
|
ValueListHelper.initializeCachedValueHelp();
|
|
390
360
|
|
|
391
361
|
delete AppComponent.prototype.instanceMap[this.getId()];
|
|
392
|
-
var sCurrentComponentName = this.getMetadata().getName();
|
|
393
|
-
var bHasOtherComponent = false;
|
|
394
|
-
Object.keys(AppComponent.prototype.instanceMap).forEach(function(instanceID) {
|
|
395
|
-
if (AppComponent.prototype.instanceMap[instanceID].getMetadata().getName() === sCurrentComponentName) {
|
|
396
|
-
bHasOtherComponent = true;
|
|
397
|
-
}
|
|
398
|
-
});
|
|
399
|
-
if (!bHasOtherComponent) {
|
|
400
|
-
sap.ui.fl.apply._internal.flexState.FlexState.clearState(sCurrentComponentName);
|
|
401
|
-
}
|
|
402
362
|
|
|
403
363
|
// var oRegistry = sap.ui.mdc.p13n.Engine.getInstance()._getRegistry();
|
|
404
364
|
// Object.keys(oRegistry).forEach(function(sKey) {
|
|
@@ -417,6 +377,7 @@ sap.ui.define(
|
|
|
417
377
|
var oMainModel = this.oModels[undefined];
|
|
418
378
|
var oHeaders = jQuery.extend({}, oMainModel.oRequestor.mHeaders);
|
|
419
379
|
// As we need to cleanup the application / handle the dirty object we need to call our cleanup before the models are destroyed
|
|
380
|
+
this.getRoutingService().beforeExit();
|
|
420
381
|
UIComponent.prototype.destroy.apply(this, arguments);
|
|
421
382
|
oMainModel.oRequestor.mHeaders = oHeaders;
|
|
422
383
|
},
|
|
@@ -427,9 +388,12 @@ sap.ui.define(
|
|
|
427
388
|
},
|
|
428
389
|
restore: function() {
|
|
429
390
|
// called by FLP when app sap-keep-alive is enabled and app is restored
|
|
430
|
-
this.getRootViewController().viewState.
|
|
391
|
+
this.getRootViewController().viewState.onRestore();
|
|
431
392
|
},
|
|
432
|
-
suspend: function() {
|
|
393
|
+
suspend: function() {
|
|
394
|
+
// called by FLP when app sap-keep-alive is enabled and app is suspended
|
|
395
|
+
this.getRootViewController().viewState.onSuspend();
|
|
396
|
+
}
|
|
433
397
|
});
|
|
434
398
|
|
|
435
399
|
return AppComponent;
|
|
@@ -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
|
[
|
|
@@ -13,9 +13,22 @@ sap.ui.define(
|
|
|
13
13
|
"sap/base/Log",
|
|
14
14
|
"sap/base/util/merge",
|
|
15
15
|
"sap/base/util/deepEqual",
|
|
16
|
-
"sap/fe/core/BusyLocker"
|
|
16
|
+
"sap/fe/core/BusyLocker",
|
|
17
|
+
"sap/fe/core/helpers/ModelHelper"
|
|
17
18
|
],
|
|
18
|
-
function(
|
|
19
|
+
function(
|
|
20
|
+
StateUtil,
|
|
21
|
+
BaseObject,
|
|
22
|
+
CoreLibrary,
|
|
23
|
+
NavLibrary,
|
|
24
|
+
CommonUtils,
|
|
25
|
+
ControlVariantApplyAPI,
|
|
26
|
+
Log,
|
|
27
|
+
merge,
|
|
28
|
+
deepEqual,
|
|
29
|
+
BusyLocker,
|
|
30
|
+
ModelHelper
|
|
31
|
+
) {
|
|
19
32
|
"use strict";
|
|
20
33
|
|
|
21
34
|
var NavType = NavLibrary.NavType;
|
|
@@ -59,6 +72,7 @@ sap.ui.define(
|
|
|
59
72
|
oRouterProxy = this.oAppComponent.getRouterProxy(),
|
|
60
73
|
sHash = oRouterProxy.getHash(),
|
|
61
74
|
oController = this.oAppComponent.getRootControl().getController(),
|
|
75
|
+
bIsStickyMode = ModelHelper.isStickySessionSupported(this.oAppComponent.getMetaModel()),
|
|
62
76
|
that = this;
|
|
63
77
|
|
|
64
78
|
if (!oController.viewState) {
|
|
@@ -76,7 +90,7 @@ sap.ui.define(
|
|
|
76
90
|
var sAppStateKey = oAppState.appStateKey;
|
|
77
91
|
var sNewHash = oNavigationService.replaceInnerAppStateKey(sHash, sAppStateKey);
|
|
78
92
|
if (sNewHash !== sHash) {
|
|
79
|
-
oRouterProxy.navToHash(sNewHash);
|
|
93
|
+
oRouterProxy.navToHash(sNewHash, null, null, null, !bIsStickyMode);
|
|
80
94
|
that.bNoRouteChange = true;
|
|
81
95
|
}
|
|
82
96
|
Log.info("APPSTATE: navToHash");
|
|
@@ -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(["sap/base/Log"], function(Log) {
|
|
@@ -90,10 +90,22 @@ sap.ui.define(["sap/base/Log"], function(Log) {
|
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
return {
|
|
93
|
+
/**
|
|
94
|
+
*
|
|
95
|
+
* @param oModelOrControl
|
|
96
|
+
* @param [sPath]
|
|
97
|
+
* @returns {boolean}
|
|
98
|
+
*/
|
|
93
99
|
lock: function(oModelOrControl, sPath) {
|
|
94
100
|
return this._updateLock(oModelOrControl, sPath, 1);
|
|
95
101
|
},
|
|
96
102
|
|
|
103
|
+
/**
|
|
104
|
+
*
|
|
105
|
+
* @param oModelOrControl
|
|
106
|
+
* @param [sPath]
|
|
107
|
+
* @returns {boolean}
|
|
108
|
+
*/
|
|
97
109
|
unlock: function(oModelOrControl, sPath) {
|
|
98
110
|
return this._updateLock(oModelOrControl, sPath, -1);
|
|
99
111
|
},
|
|
@@ -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(
|
|
@@ -797,7 +797,7 @@ sap.ui.define(
|
|
|
797
797
|
params: oParams
|
|
798
798
|
})
|
|
799
799
|
.then(function(aLink) {
|
|
800
|
-
oIBNAction.setVisible(aLink && aLink.length === 1);
|
|
800
|
+
oIBNAction.setVisible(oIBNAction.getVisible() && aLink && aLink.length === 1);
|
|
801
801
|
})
|
|
802
802
|
.catch(function(oError) {
|
|
803
803
|
Log.error("Cannot retrieve the links from the shell service", oError);
|
|
@@ -825,8 +825,8 @@ sap.ui.define(
|
|
|
825
825
|
*
|
|
826
826
|
* @param {string} sFrameworkKey Current key.
|
|
827
827
|
* @param {object} oResourceBundle Contains the local resource bundle
|
|
828
|
-
* @param {object} oParams Parameter object for the resource value
|
|
829
|
-
* @param {
|
|
828
|
+
* @param {object} [oParams] Parameter object for the resource value
|
|
829
|
+
* @param {string} [sEntitySetName] EntitySet name of the control where the resource is being used
|
|
830
830
|
* @returns {string} The translated text
|
|
831
831
|
*/
|
|
832
832
|
function getTranslatedText(sFrameworkKey, oResourceBundle, oParams, sEntitySetName) {
|
|
@@ -1448,13 +1448,14 @@ sap.ui.define(
|
|
|
1448
1448
|
* @param {object} oSelectionVariant Instance of {@link sap.fe.navigation.SelectionVariant} SelectionVariant to be used.
|
|
1449
1449
|
* @param {object} mFilters Conditons to be added to the SelectionVariant
|
|
1450
1450
|
* @param {object} oTargetInfo Object returned after selection variant from the table is prepared.
|
|
1451
|
+
* @param {object} oFilterInfo Object containing the converted FilterBar filters
|
|
1451
1452
|
* @returns {object} Instance of {@link sap.fe.navigation.SelectionVariant} SelectionVariant with the conditions.
|
|
1452
1453
|
* @private
|
|
1453
1454
|
* @ui5-restricted
|
|
1454
1455
|
* @example <code>
|
|
1455
1456
|
* </code>
|
|
1456
1457
|
*/
|
|
1457
|
-
function addExternalStateFiltersToSelectionVariant(oSelectionVariant, mFilters, oTargetInfo) {
|
|
1458
|
+
function addExternalStateFiltersToSelectionVariant(oSelectionVariant, mFilters, oTargetInfo, oFilterInfo) {
|
|
1458
1459
|
var sFilter,
|
|
1459
1460
|
sLow = "",
|
|
1460
1461
|
sHigh = null;
|
|
@@ -1485,6 +1486,10 @@ sap.ui.define(
|
|
|
1485
1486
|
case "EQ":
|
|
1486
1487
|
oSelectOptionState.option = sOperator;
|
|
1487
1488
|
break;
|
|
1489
|
+
case "TODAY":
|
|
1490
|
+
case "DATE":
|
|
1491
|
+
oSelectOptionState.option = "EQ";
|
|
1492
|
+
break;
|
|
1488
1493
|
case "EEQ":
|
|
1489
1494
|
oSelectOptionState.option = "EQ";
|
|
1490
1495
|
break;
|
|
@@ -1544,6 +1549,13 @@ sap.ui.define(
|
|
|
1544
1549
|
var oFilter = aFilters[item];
|
|
1545
1550
|
sLow = (oFilter.values[0] && oFilter.values[0].toString()) || "";
|
|
1546
1551
|
sHigh = (oFilter.values[1] && oFilter.values[1].toString()) || null;
|
|
1552
|
+
if (oFilter.operator === "TODAY" || oFilter.operator === "DATE") {
|
|
1553
|
+
var aFilter = oFilterInfo[0].aFilters.filter(function(oFilter) {
|
|
1554
|
+
return oFilter.sPath === sFilter;
|
|
1555
|
+
});
|
|
1556
|
+
sLow = aFilter[0].oValue1 || "";
|
|
1557
|
+
sHigh = null;
|
|
1558
|
+
}
|
|
1547
1559
|
var oSelectOptionValues = fnGetSignAndOption(oFilter.operator, sLow, sHigh);
|
|
1548
1560
|
if (oSelectOptionValues.option) {
|
|
1549
1561
|
oSelectionVariant.addSelectOption(
|
|
@@ -2220,20 +2232,39 @@ sap.ui.define(
|
|
|
2220
2232
|
* @ui5-restricted
|
|
2221
2233
|
*/
|
|
2222
2234
|
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
|
-
|
|
2235
|
+
var oBindingInfo;
|
|
2236
|
+
var setBindingInfo = function() {
|
|
2237
|
+
if (oBindingInfo) {
|
|
2238
|
+
if (!oBindingInfo.events) {
|
|
2239
|
+
oBindingInfo.events = {};
|
|
2240
|
+
}
|
|
2241
|
+
if (!oBindingInfo.events[sEventName]) {
|
|
2242
|
+
oBindingInfo.events[sEventName] = fHandler;
|
|
2243
|
+
} else {
|
|
2244
|
+
var fOriginalHandler = oBindingInfo.events[sEventName];
|
|
2245
|
+
oBindingInfo.events[sEventName] = function() {
|
|
2246
|
+
fHandler.apply(this, arguments);
|
|
2247
|
+
fOriginalHandler.apply(this, arguments);
|
|
2248
|
+
};
|
|
2249
|
+
}
|
|
2236
2250
|
}
|
|
2251
|
+
};
|
|
2252
|
+
if (oControl.isA("sap.ui.mdc.ChartNew")) {
|
|
2253
|
+
oControl
|
|
2254
|
+
.innerChartBound()
|
|
2255
|
+
.then(function() {
|
|
2256
|
+
oBindingInfo = oControl
|
|
2257
|
+
.getControlDelegate()
|
|
2258
|
+
._getChart(oControl)
|
|
2259
|
+
.getBindingInfo("data");
|
|
2260
|
+
setBindingInfo();
|
|
2261
|
+
})
|
|
2262
|
+
.catch(function(sError) {
|
|
2263
|
+
Log.error(sError);
|
|
2264
|
+
});
|
|
2265
|
+
} else {
|
|
2266
|
+
oBindingInfo = oControl.data("rowsBindingInfo");
|
|
2267
|
+
setBindingInfo();
|
|
2237
2268
|
}
|
|
2238
2269
|
}
|
|
2239
2270
|
|
|
@@ -2419,6 +2450,89 @@ sap.ui.define(
|
|
|
2419
2450
|
return sMetaPath;
|
|
2420
2451
|
}
|
|
2421
2452
|
|
|
2453
|
+
/**
|
|
2454
|
+
* Get refresh strategy for an intent.
|
|
2455
|
+
*
|
|
2456
|
+
* @function
|
|
2457
|
+
* @name sap.fe.core.CommonUtils.getRefreshStrategyForIntent
|
|
2458
|
+
* @memberof sap.fe.core.CommonUtils
|
|
2459
|
+
* @param {object} mRefreshStrategies RefreshStrategies to consider
|
|
2460
|
+
* @param {string} sSemanticObject Outbound Semantic Object
|
|
2461
|
+
* @param {string} sAction Outbound Action
|
|
2462
|
+
* @returns {object} Meta path for the context
|
|
2463
|
+
**/
|
|
2464
|
+
function getRefreshStrategyForIntent(mRefreshStrategies, sSemanticObject, sAction) {
|
|
2465
|
+
return (
|
|
2466
|
+
(mRefreshStrategies.intents &&
|
|
2467
|
+
((sSemanticObject && sAction && mRefreshStrategies.intents[sSemanticObject + "-" + sAction]) ||
|
|
2468
|
+
(sSemanticObject && mRefreshStrategies.intents[sSemanticObject]))) ||
|
|
2469
|
+
mRefreshStrategies["defaultBehavior"] ||
|
|
2470
|
+
mRefreshStrategies["_feDefault"]
|
|
2471
|
+
);
|
|
2472
|
+
}
|
|
2473
|
+
|
|
2474
|
+
/**
|
|
2475
|
+
* Store control refresh strategy for hash in the internal model.
|
|
2476
|
+
*
|
|
2477
|
+
* @function
|
|
2478
|
+
* @name sap.fe.core.CommonUtils.storeControlRefreshStrategyForHash
|
|
2479
|
+
* @memberof sap.fe.core.CommonUtils
|
|
2480
|
+
* @param {object} oControl Control for the refresh strategy
|
|
2481
|
+
* @param {object} oHash Shell hash object
|
|
2482
|
+
**/
|
|
2483
|
+
function storeControlRefreshStrategyForHash(oControl, oHash) {
|
|
2484
|
+
if (oControl && oControl.getModel("viewData") && oControl.getModel("internal")) {
|
|
2485
|
+
var mViewData = oControl.getModel("viewData");
|
|
2486
|
+
var oRefreshStrategies = mViewData.getObject("/refreshStrategyOnAppRestore");
|
|
2487
|
+
if (oRefreshStrategies) {
|
|
2488
|
+
var mInternalModel = oControl.getModel("internal");
|
|
2489
|
+
var oRefreshStrategy = CommonUtils.getRefreshStrategyForIntent(
|
|
2490
|
+
oRefreshStrategies,
|
|
2491
|
+
oHash && oHash.semanticObject,
|
|
2492
|
+
oHash && oHash.action
|
|
2493
|
+
);
|
|
2494
|
+
|
|
2495
|
+
mInternalModel.setProperty("/refreshStrategyOnAppRestore", oRefreshStrategy);
|
|
2496
|
+
}
|
|
2497
|
+
}
|
|
2498
|
+
}
|
|
2499
|
+
/**
|
|
2500
|
+
* Method to refresh and restore the view if neccessary.
|
|
2501
|
+
*
|
|
2502
|
+
* @function
|
|
2503
|
+
* @name sap.fe.core.CommonUtils.restoreView
|
|
2504
|
+
* @memberof sap.fe.core.CommonUtils
|
|
2505
|
+
* @param {object} oView Control for the refresh strategy
|
|
2506
|
+
* @returns {Promise} A promise after view refresh and restore are triggered
|
|
2507
|
+
**/
|
|
2508
|
+
function restoreView(oView) {
|
|
2509
|
+
var oInternalModelContext = oView.getBindingContext("internal");
|
|
2510
|
+
var oController = oView.getController();
|
|
2511
|
+
var oViewState = oController.viewState;
|
|
2512
|
+
var pRefreshBindings = Promise.resolve();
|
|
2513
|
+
if (oInternalModelContext.getProperty("restoreStatus") === "pending") {
|
|
2514
|
+
if (oViewState.refreshViewBindings) {
|
|
2515
|
+
pRefreshBindings = oViewState.refreshViewBindings();
|
|
2516
|
+
pRefreshBindings
|
|
2517
|
+
.then(function() {
|
|
2518
|
+
Log.info("FE V4: Refresh was triggered successfull: " + oView.getId());
|
|
2519
|
+
})
|
|
2520
|
+
.catch(function(err) {
|
|
2521
|
+
Log.warning("FE V4: Refresh was unsuccessfull: " + oView.getId(), err);
|
|
2522
|
+
});
|
|
2523
|
+
}
|
|
2524
|
+
pRefreshBindings
|
|
2525
|
+
.then(function() {
|
|
2526
|
+
oViewState.onRestore();
|
|
2527
|
+
oInternalModelContext.setProperty("restoreStatus", "done");
|
|
2528
|
+
})
|
|
2529
|
+
.catch(function(err) {
|
|
2530
|
+
Log.warning("FE V4: Restore was unsuccessfull: " + oView.getId());
|
|
2531
|
+
});
|
|
2532
|
+
}
|
|
2533
|
+
return pRefreshBindings;
|
|
2534
|
+
}
|
|
2535
|
+
|
|
2422
2536
|
var CommonUtils = {
|
|
2423
2537
|
isPropertyFilterable: isPropertyFilterable,
|
|
2424
2538
|
isFieldControlPathInapplicable: isFieldControlPathInapplicable,
|
|
@@ -2483,7 +2597,10 @@ sap.ui.define(
|
|
|
2483
2597
|
getViewRefreshInfo: getViewRefreshInfo,
|
|
2484
2598
|
getMetaPathForContext: getMetaPathForContext,
|
|
2485
2599
|
getAbsoluteMetaPathForListBinding: getAbsoluteMetaPathForListBinding,
|
|
2486
|
-
getControlRefreshStrategyForContextPath: getControlRefreshStrategyForContextPath
|
|
2600
|
+
getControlRefreshStrategyForContextPath: getControlRefreshStrategyForContextPath,
|
|
2601
|
+
getRefreshStrategyForIntent: getRefreshStrategyForIntent,
|
|
2602
|
+
storeControlRefreshStrategyForHash: storeControlRefreshStrategyForHash,
|
|
2603
|
+
restoreView: restoreView
|
|
2487
2604
|
};
|
|
2488
2605
|
|
|
2489
2606
|
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"],
|
|
@@ -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
|
[
|
|
@@ -121,38 +121,6 @@ sap.ui.define(
|
|
|
121
121
|
this.getAppComponent()
|
|
122
122
|
.getAppStateHandler()
|
|
123
123
|
.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
124
|
}
|
|
157
125
|
});
|
|
158
126
|
}
|