@sapui5/sap.fe.core 1.94.0 → 1.96.3
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 +10 -41
- 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 +372 -9
- package/src/sap/fe/core/ExtensionAPI.js +1 -1
- package/src/sap/fe/core/PageController.js +11 -3
- 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 +9 -3
- package/src/sap/fe/core/TemplateModel.js +1 -1
- package/src/sap/fe/core/TransactionHelper.js +157 -111
- 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 +25 -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 +89 -54
- package/src/sap/fe/core/controllerextensions/IntentBasedNavigation.js +1 -1
- package/src/sap/fe/core/controllerextensions/InternalEditFlow.js +14 -7
- package/src/sap/fe/core/controllerextensions/InternalIntentBasedNavigation.js +128 -25
- package/src/sap/fe/core/controllerextensions/InternalRouting.js +197 -210
- package/src/sap/fe/core/controllerextensions/KPIManagement.js +844 -168
- package/src/sap/fe/core/controllerextensions/KPIManagement.ts +903 -189
- package/src/sap/fe/core/controllerextensions/MessageHandler.js +1 -1
- package/src/sap/fe/core/controllerextensions/PageReady.js +31 -17
- package/src/sap/fe/core/controllerextensions/PageReady.ts +50 -15
- package/src/sap/fe/core/controllerextensions/Paginator.js +20 -4
- package/src/sap/fe/core/controllerextensions/Placeholder.js +134 -271
- 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 +174 -7
- 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 +5 -8
- package/src/sap/fe/core/controls/filterbar/VisualFilter.js +83 -23
- package/src/sap/fe/core/controls/filterbar/VisualFilterContainer.js +2 -6
- package/src/sap/fe/core/controls/filterbar/utils/VisualFilterUtils.js +25 -18
- package/src/sap/fe/core/converters/ConverterContext.js +18 -4
- package/src/sap/fe/core/converters/ConverterContext.ts +13 -3
- package/src/sap/fe/core/converters/ManifestSettings.js +1 -1
- package/src/sap/fe/core/converters/ManifestSettings.ts +4 -1
- package/src/sap/fe/core/converters/MetaModelConverter.js +855 -868
- package/src/sap/fe/core/converters/MetaModelConverter.ts +763 -826
- 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/Action.js +6 -1
- package/src/sap/fe/core/converters/controls/Common/Action.ts +3 -0
- package/src/sap/fe/core/converters/controls/Common/Chart.js +85 -6
- package/src/sap/fe/core/converters/controls/Common/Chart.ts +80 -2
- package/src/sap/fe/core/converters/controls/Common/DataVisualization.js +15 -16
- package/src/sap/fe/core/converters/controls/Common/DataVisualization.ts +16 -30
- package/src/sap/fe/core/converters/controls/Common/Form.js +17 -8
- package/src/sap/fe/core/converters/controls/Common/Form.ts +11 -3
- package/src/sap/fe/core/converters/controls/Common/KPI.js +287 -109
- package/src/sap/fe/core/converters/controls/Common/KPI.ts +314 -139
- package/src/sap/fe/core/converters/controls/Common/Table.js +273 -105
- package/src/sap/fe/core/converters/controls/Common/Table.ts +319 -111
- package/src/sap/fe/core/converters/controls/ListReport/FilterBar.js +8 -20
- package/src/sap/fe/core/converters/controls/ListReport/FilterBar.ts +11 -15
- package/src/sap/fe/core/converters/controls/ListReport/VisualFilters.js +44 -15
- package/src/sap/fe/core/converters/controls/ListReport/VisualFilters.ts +41 -19
- package/src/sap/fe/core/converters/controls/ObjectPage/Avatar.js +74 -0
- package/src/sap/fe/core/converters/controls/ObjectPage/Avatar.ts +50 -0
- package/src/sap/fe/core/converters/controls/ObjectPage/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 +18 -30
- package/src/sap/fe/core/converters/helpers/Aggregation.ts +17 -28
- 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 +3 -3
- package/src/sap/fe/core/converters/helpers/IssueManager.ts +2 -2
- package/src/sap/fe/core/converters/helpers/SelectionVariantHelper.js +11 -6
- package/src/sap/fe/core/converters/helpers/SelectionVariantHelper.ts +9 -5
- package/src/sap/fe/core/converters/objectPage/FormMenuActions.js +15 -2
- package/src/sap/fe/core/converters/objectPage/FormMenuActions.ts +14 -14
- 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 +73 -8
- package/src/sap/fe/core/converters/templates/ListReportConverter.ts +70 -10
- package/src/sap/fe/core/converters/templates/ObjectPageConverter.js +82 -16
- package/src/sap/fe/core/converters/templates/ObjectPageConverter.ts +100 -17
- 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 +17 -2
- package/src/sap/fe/core/helpers/BindingExpression.ts +14 -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 +28 -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 +3 -3
- 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 +30 -1
- package/src/sap/fe/core/messagebundle_ar.properties +14 -0
- package/src/sap/fe/core/messagebundle_bg.properties +14 -0
- package/src/sap/fe/core/messagebundle_ca.properties +15 -1
- package/src/sap/fe/core/messagebundle_cs.properties +14 -0
- package/src/sap/fe/core/messagebundle_cy.properties +14 -0
- package/src/sap/fe/core/messagebundle_da.properties +14 -0
- package/src/sap/fe/core/messagebundle_de.properties +14 -0
- package/src/sap/fe/core/messagebundle_el.properties +14 -0
- package/src/sap/fe/core/messagebundle_en.properties +14 -0
- package/src/sap/fe/core/messagebundle_en_GB.properties +14 -0
- package/src/sap/fe/core/messagebundle_en_US_sappsd.properties +14 -0
- package/src/sap/fe/core/messagebundle_en_US_saprigi.properties +20 -2
- package/src/sap/fe/core/messagebundle_en_US_saptrc.properties +14 -0
- package/src/sap/fe/core/messagebundle_es.properties +21 -7
- package/src/sap/fe/core/messagebundle_es_MX.properties +15 -1
- package/src/sap/fe/core/messagebundle_et.properties +14 -0
- package/src/sap/fe/core/messagebundle_fi.properties +14 -0
- package/src/sap/fe/core/messagebundle_fr.properties +18 -4
- package/src/sap/fe/core/messagebundle_fr_CA.properties +14 -0
- package/src/sap/fe/core/messagebundle_hi.properties +14 -0
- package/src/sap/fe/core/messagebundle_hr.properties +14 -0
- package/src/sap/fe/core/messagebundle_hu.properties +14 -0
- package/src/sap/fe/core/messagebundle_id.properties +14 -0
- package/src/sap/fe/core/messagebundle_it.properties +14 -0
- package/src/sap/fe/core/messagebundle_iw.properties +15 -1
- package/src/sap/fe/core/messagebundle_ja.properties +14 -0
- package/src/sap/fe/core/messagebundle_kk.properties +14 -0
- package/src/sap/fe/core/messagebundle_ko.properties +14 -0
- package/src/sap/fe/core/messagebundle_lt.properties +14 -0
- package/src/sap/fe/core/messagebundle_lv.properties +14 -0
- package/src/sap/fe/core/messagebundle_ms.properties +14 -0
- package/src/sap/fe/core/messagebundle_nl.properties +18 -4
- package/src/sap/fe/core/messagebundle_no.properties +15 -1
- package/src/sap/fe/core/messagebundle_pl.properties +15 -1
- package/src/sap/fe/core/messagebundle_pt.properties +14 -0
- package/src/sap/fe/core/messagebundle_pt_PT.properties +14 -0
- package/src/sap/fe/core/messagebundle_ro.properties +14 -0
- package/src/sap/fe/core/messagebundle_ru.properties +14 -0
- package/src/sap/fe/core/messagebundle_sh.properties +14 -0
- package/src/sap/fe/core/messagebundle_sk.properties +14 -0
- package/src/sap/fe/core/messagebundle_sl.properties +14 -0
- package/src/sap/fe/core/messagebundle_sv.properties +14 -0
- package/src/sap/fe/core/messagebundle_th.properties +14 -0
- package/src/sap/fe/core/messagebundle_tr.properties +14 -0
- package/src/sap/fe/core/messagebundle_uk.properties +14 -0
- package/src/sap/fe/core/messagebundle_vi.properties +14 -0
- package/src/sap/fe/core/messagebundle_zh_CN.properties +14 -0
- package/src/sap/fe/core/messagebundle_zh_TW.properties +14 -0
- 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 +114 -44
- 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 +12 -2
- 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/FilterHelper.js +2 -2
- package/src/sap/fe/core/templating/FilterHelper.ts +1 -1
- package/src/sap/fe/core/templating/UIFormatters.js +41 -3
- package/src/sap/fe/core/templating/UIFormatters.ts +74 -2
|
@@ -1,286 +1,149 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* SAPUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2022 SAP SE. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
sap.ui.define(
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
sap.ui.define(
|
|
7
|
+
[
|
|
8
|
+
"sap/ui/core/mvc/ControllerExtension",
|
|
9
|
+
"sap/base/util/UriParameters",
|
|
10
|
+
"sap/base/util/ObjectPath",
|
|
11
|
+
"sap/ui/core/Placeholder",
|
|
12
|
+
"sap/fe/placeholder/library" // library dependency
|
|
13
|
+
],
|
|
14
|
+
function(ControllerExtension, UriParameters, ObjectPath, Placeholder) {
|
|
15
|
+
"use strict";
|
|
13
16
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
override: {
|
|
39
|
-
onExit: function() {
|
|
40
|
-
this.oRouter.detachBeforeRouteMatched(this._fnBeforeRouteMatched);
|
|
41
|
-
sap.m.NavContainer.addCustomTransition(
|
|
42
|
-
"placeholder",
|
|
43
|
-
function(oFromPage, oToPage, fCallback) {
|
|
44
|
-
sap.m.NavContainer.transitions["show"].to(oFromPage, oToPage, fCallback);
|
|
45
|
-
},
|
|
46
|
-
sap.m.NavContainer.transitions["show"].back
|
|
47
|
-
);
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
|
|
51
|
-
attachRouteMatchers: function() {
|
|
52
|
-
this._init();
|
|
53
|
-
var that = this;
|
|
54
|
-
if (this.isPlaceholderEnabled()) {
|
|
55
|
-
this._fnBeforeRouteMatched = function(oEvent) {
|
|
56
|
-
var bDisplayBusyIndicator = that.navigateToPlaceholder(
|
|
57
|
-
that.oAppComponent,
|
|
58
|
-
that.oRouter,
|
|
59
|
-
that.oRootContainer,
|
|
60
|
-
that.oPlaceholders
|
|
61
|
-
);
|
|
62
|
-
if (bDisplayBusyIndicator) {
|
|
63
|
-
var oRootView = that.oAppComponent.getRootControl();
|
|
64
|
-
BusyLocker.lock(oRootView);
|
|
65
|
-
that.oRouter.attachEventOnce("routeMatched", function() {
|
|
66
|
-
var oRootView = that.oAppComponent.getRootControl();
|
|
67
|
-
if (BusyLocker.isLocked(oRootView)) {
|
|
68
|
-
BusyLocker.unlock(oRootView);
|
|
17
|
+
/**
|
|
18
|
+
* {@link sap.ui.core.mvc.ControllerExtension Controller extension} for Placeholder
|
|
19
|
+
*
|
|
20
|
+
* @namespace
|
|
21
|
+
* @alias sap.fe.core.controllerextensions.Placeholder
|
|
22
|
+
*
|
|
23
|
+
**/
|
|
24
|
+
var Extension = ControllerExtension.extend("sap.fe.core.controllerextensions.Placeholder", {
|
|
25
|
+
attachHideCallback: function() {
|
|
26
|
+
if (this.isPlaceholderEnabled()) {
|
|
27
|
+
var oView = this.base.getView();
|
|
28
|
+
var oPage = oView.getParent().oContainer;
|
|
29
|
+
var oNavContainer = oPage.getParent();
|
|
30
|
+
|
|
31
|
+
var _fnContainerDelegate = {
|
|
32
|
+
onAfterShow: function(oEvent) {
|
|
33
|
+
if (oEvent.isBackToPage) {
|
|
34
|
+
oNavContainer.hidePlaceholder();
|
|
35
|
+
} else if (
|
|
36
|
+
UriParameters.fromQuery(window.location.hash.replace(/#.*\?/, "")).get("restoreHistory") === "true"
|
|
37
|
+
) {
|
|
38
|
+
// in case we navigate to the listreport using the shell
|
|
39
|
+
oNavContainer.hidePlaceholder();
|
|
69
40
|
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
this.oRouter.attachBeforeRouteMatched(this._fnBeforeRouteMatched);
|
|
74
|
-
}
|
|
75
|
-
},
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
oPage.addEventDelegate(_fnContainerDelegate);
|
|
76
44
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
this.oRootContainer = this.oAppComponent.getRootContainer();
|
|
82
|
-
this.oRouter = this.oAppComponent.getRouter();
|
|
83
|
-
this.oPlaceholders = {};
|
|
45
|
+
var oPageReady = oView.getController().pageReady;
|
|
46
|
+
//In case of objectPage, the placeholder should be hidden when heroes requests are received
|
|
47
|
+
// But for some scenario like "Create item", heroes requests are not sent .
|
|
48
|
+
// The pageReady event is then used as fallback
|
|
84
49
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
50
|
+
var aAttachEvents = ["pageReady"];
|
|
51
|
+
if (oView.getControllerName() === "sap.fe.templates.ObjectPage.ObjectPageController") {
|
|
52
|
+
aAttachEvents.push("heroesBatchReceived");
|
|
53
|
+
}
|
|
54
|
+
aAttachEvents.forEach(function(sEvent) {
|
|
55
|
+
oPageReady.attachEvent(
|
|
56
|
+
sEvent,
|
|
57
|
+
null,
|
|
58
|
+
function() {
|
|
59
|
+
oNavContainer.hidePlaceholder();
|
|
60
|
+
},
|
|
61
|
+
null
|
|
62
|
+
);
|
|
63
|
+
});
|
|
97
64
|
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
.getRootControl()
|
|
127
|
-
.getController().pageReady;
|
|
128
|
-
oPageReady.attachEvent("pageReady", _removePlaceholder);
|
|
129
|
-
aPlaceHolderEvents.push({ "eventId": "pageReady", "fn": _removePlaceholder });
|
|
130
|
-
|
|
131
|
-
var pWaitHeroes, pWaitWorkers;
|
|
132
|
-
var fnInitWaitHeroes = function() {
|
|
133
|
-
return new Promise(function(resolve, reject) {
|
|
134
|
-
oPageReady.attachEvent("heroesBatchReceived", resolve);
|
|
135
|
-
oPageReady.attachEvent("pageReady", reject);
|
|
136
|
-
aPlaceHolderEvents.push({ "eventId": "heroesBatchReceived", "fn": resolve });
|
|
137
|
-
aPlaceHolderEvents.push({ "eventId": "pageReady", "fn": reject });
|
|
138
|
-
});
|
|
139
|
-
};
|
|
140
|
-
|
|
141
|
-
var fnInitWaitWorkers = function() {
|
|
142
|
-
return new Promise(function(resolve, reject) {
|
|
143
|
-
oPageReady.attachEvent("workersBatchReceived", resolve);
|
|
144
|
-
oPageReady.attachEvent("pageReady", reject);
|
|
145
|
-
aPlaceHolderEvents.push({ "eventId": "workersBatchReceived", "fn": resolve });
|
|
146
|
-
aPlaceHolderEvents.push({ "eventId": "pageReady", "fn": reject });
|
|
147
|
-
});
|
|
148
|
-
};
|
|
149
|
-
|
|
150
|
-
switch (sTransition) {
|
|
151
|
-
case that.getEnumStartingParams().FE_HEROES_LOADED:
|
|
152
|
-
pWaitHeroes = fnInitWaitHeroes();
|
|
153
|
-
pWaitHeroes.then(_removePlaceholder).catch(function() {
|
|
154
|
-
Log.info("PlaceHolder : Heroes request not received");
|
|
155
|
-
});
|
|
156
|
-
break;
|
|
157
|
-
case that.getEnumStartingParams().FE_WORKERS_LOADED:
|
|
158
|
-
pWaitWorkers = fnInitWaitWorkers();
|
|
159
|
-
pWaitWorkers.then(_removePlaceholder).catch(function() {
|
|
160
|
-
Log.info("PlaceHolder : Workers request not received");
|
|
161
|
-
});
|
|
162
|
-
break;
|
|
163
|
-
case that.getEnumStartingParams().FE_HEROES_WORKERS_LOADED:
|
|
164
|
-
pWaitHeroes = fnInitWaitHeroes();
|
|
165
|
-
pWaitWorkers = fnInitWaitWorkers();
|
|
166
|
-
Promise.all([pWaitHeroes, pWaitWorkers])
|
|
167
|
-
.then(_removePlaceholder)
|
|
168
|
-
.catch(function() {
|
|
169
|
-
Log.info("PlaceHolder : Heroes or Workers request not received");
|
|
170
|
-
});
|
|
171
|
-
break;
|
|
172
|
-
|
|
173
|
-
default:
|
|
174
|
-
}
|
|
175
|
-
} else {
|
|
176
|
-
var oFromViewCtrl = oFromPage.getController();
|
|
177
|
-
oFromViewCtrl.currentTargetNavigated();
|
|
178
|
-
sap.m.NavContainer.transitions["show"].to(oFromPage, oToPage, fCallback);
|
|
65
|
+
},
|
|
66
|
+
attachRouteMatchers: function() {
|
|
67
|
+
this._init();
|
|
68
|
+
},
|
|
69
|
+
|
|
70
|
+
_init: function() {
|
|
71
|
+
this.oAppComponent = this.base.getAppComponent();
|
|
72
|
+
this.oRouting = this.oAppComponent._oRouting;
|
|
73
|
+
this.oRootContainer = this.oAppComponent.getRootContainer();
|
|
74
|
+
this.oRouter = this.oAppComponent.getRouter();
|
|
75
|
+
this.oPlaceholders = {};
|
|
76
|
+
|
|
77
|
+
// eslint-disable-next-line no-constant-condition
|
|
78
|
+
if (this.isPlaceholderEnabled()) {
|
|
79
|
+
Placeholder.registerProvider(function(oConfig) {
|
|
80
|
+
switch (oConfig.name) {
|
|
81
|
+
case "sap.fe.templates.ListReport":
|
|
82
|
+
return {
|
|
83
|
+
html: "sap/fe/placeholder/view/PlaceholderLR.fragment.html",
|
|
84
|
+
autoClose: false
|
|
85
|
+
};
|
|
86
|
+
case "sap.fe.templates.ObjectPage":
|
|
87
|
+
return {
|
|
88
|
+
html: "sap/fe/placeholder/view/PlaceholderOP.fragment.html",
|
|
89
|
+
autoClose: false
|
|
90
|
+
};
|
|
91
|
+
default:
|
|
92
|
+
return;
|
|
179
93
|
}
|
|
180
|
-
}
|
|
181
|
-
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
if (this.isPlaceholderDebugEnabled()) {
|
|
97
|
+
this.initPlaceholderDebug();
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
|
|
101
|
+
initPlaceholderDebug: function() {
|
|
102
|
+
this.resetPlaceholderDebugStats();
|
|
103
|
+
var that = this;
|
|
104
|
+
var handler = {
|
|
105
|
+
apply: function(target, thisArg, argumentsList) {
|
|
106
|
+
if (that.oRootContainer._placeholder && that.oRootContainer._placeholder.placeholder) {
|
|
107
|
+
that.debugStats.iHidePlaceholderTimestamp = Date.now();
|
|
108
|
+
}
|
|
109
|
+
return target.bind(that.oRootContainer)();
|
|
182
110
|
}
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
window["sap-ushell-config"].apps.placeholder.enabled;
|
|
203
|
-
}
|
|
204
|
-
return bPlaceholderEnabled;
|
|
205
|
-
},
|
|
206
|
-
|
|
207
|
-
setPlaceholderMapping: function(oMapping) {
|
|
208
|
-
this.oPlaceholderMapping = oMapping;
|
|
209
|
-
},
|
|
210
|
-
|
|
211
|
-
getPlaceholderMapping: function(oMapping) {
|
|
212
|
-
return this.oPlaceholderMapping;
|
|
213
|
-
},
|
|
214
|
-
|
|
215
|
-
createPlaceholderView: function(sViewName) {
|
|
216
|
-
var oPlaceholder = new sap.ui.core.mvc.XMLView({
|
|
217
|
-
viewName: this.oPlaceholderMapping[sViewName].placeHolderName
|
|
218
|
-
});
|
|
219
|
-
return oPlaceholder;
|
|
220
|
-
},
|
|
221
|
-
|
|
222
|
-
/**
|
|
223
|
-
* Trigger the navigation to the Placeholder based on the current hash (support NavContainer and FlexibleColumnLayout).
|
|
224
|
-
*
|
|
225
|
-
* @function
|
|
226
|
-
* @name sap.fe.templates.RootContainer.controller.Fcl.controller#navigateToPlaceholder
|
|
227
|
-
* @memberof sap.fe.templates.RootContainer.controller.Fcl.controller
|
|
228
|
-
* @param {object} [oAppComponent] the app component
|
|
229
|
-
* @param {object} [oRouter] the router component
|
|
230
|
-
* @param {object} [oRootContainer] NavContainer of FCL
|
|
231
|
-
* @param {object} [oPlaceholders] Map of placeholders for each kind of view (List Report, Object Page)
|
|
232
|
-
* @ui5-restricted
|
|
233
|
-
* @final
|
|
234
|
-
*/
|
|
111
|
+
};
|
|
112
|
+
// eslint-disable-next-line no-undef
|
|
113
|
+
var proxy1 = new Proxy(this.oRootContainer.hidePlaceholder, handler);
|
|
114
|
+
this.oRootContainer.hidePlaceholder = proxy1;
|
|
115
|
+
},
|
|
116
|
+
isPlaceholderDebugEnabled: function() {
|
|
117
|
+
if (UriParameters.fromQuery(window.location.search).get("sap-ui-xx-placeholder-debug") === "true") {
|
|
118
|
+
return true;
|
|
119
|
+
}
|
|
120
|
+
return false;
|
|
121
|
+
},
|
|
122
|
+
|
|
123
|
+
resetPlaceholderDebugStats: function() {
|
|
124
|
+
this.debugStats = {
|
|
125
|
+
iHidePlaceholderTimestamp: 0,
|
|
126
|
+
iPageReadyEventTimestamp: 0,
|
|
127
|
+
iHeroesBatchReceivedEventTimestamp: 0
|
|
128
|
+
};
|
|
129
|
+
},
|
|
235
130
|
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
.getHashChanger()
|
|
240
|
-
.getHash()
|
|
241
|
-
.match(/([^?]*)/)[0];
|
|
242
|
-
var oRoute = oRouting.getRouteFromHash(oRouter, oAppComponent);
|
|
243
|
-
var aTargets = oRouting.getTargetsFromRoute(oRoute, oAppComponent);
|
|
244
|
-
var that = this;
|
|
245
|
-
var bDisplayBusyIndicator = true;
|
|
131
|
+
getPlaceholderDebugStats: function() {
|
|
132
|
+
return this.debugStats;
|
|
133
|
+
},
|
|
246
134
|
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
var oPlaceholderTarget;
|
|
253
|
-
var oPlaceholderMapping = that.getPlaceholderMapping();
|
|
254
|
-
if (oPlaceholderMapping[oTarget.name]) {
|
|
255
|
-
switch (oPlaceholderMapping[oTarget.name].viewType) {
|
|
256
|
-
case that.enumViewType.OBJECTPAGE:
|
|
257
|
-
oPlaceholders.oOP = oPlaceholders.oOP ? oPlaceholders.oOP : {};
|
|
258
|
-
oPlaceholderTarget = oPlaceholders.oOP;
|
|
259
|
-
break;
|
|
260
|
-
case that.enumViewType.LISTREPORT:
|
|
261
|
-
oPlaceholders.oLR = oPlaceholders.oLR ? oPlaceholders.oLR : {};
|
|
262
|
-
oPlaceholderTarget = oPlaceholders.oLR;
|
|
263
|
-
break;
|
|
264
|
-
default:
|
|
265
|
-
break;
|
|
266
|
-
}
|
|
135
|
+
isPlaceholderEnabled: function() {
|
|
136
|
+
var bPlaceholderEnabledInFLP = ObjectPath.get("sap-ushell-config.apps.placeholder.enabled");
|
|
137
|
+
if (bPlaceholderEnabledInFLP === false) {
|
|
138
|
+
return false;
|
|
139
|
+
}
|
|
267
140
|
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
oRootContainer,
|
|
273
|
-
oRouter
|
|
274
|
-
)
|
|
275
|
-
? false
|
|
276
|
-
: true;
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
});
|
|
141
|
+
return sap.ui
|
|
142
|
+
.getCore()
|
|
143
|
+
.getConfiguration()
|
|
144
|
+
.getPlaceholder();
|
|
280
145
|
}
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
return Extension;
|
|
286
|
-
});
|
|
146
|
+
});
|
|
147
|
+
return Extension;
|
|
148
|
+
}
|
|
149
|
+
);
|
|
@@ -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
|
// ---------------------------------------------------------------------------------------
|
|
@@ -133,20 +133,26 @@ sap.ui.define(
|
|
|
133
133
|
}
|
|
134
134
|
};
|
|
135
135
|
oLastFocusedControl = by;
|
|
136
|
+
|
|
137
|
+
var setShareEmailData = function(oShareActionSheet, oModelData) {
|
|
138
|
+
var oShareMailModel = oShareActionSheet.getModel("shareData");
|
|
139
|
+
var oNewMailData = extend(oShareMailModel.getData(), oModelData);
|
|
140
|
+
oShareMailModel.setData(oNewMailData);
|
|
141
|
+
};
|
|
136
142
|
return Promise.resolve(that.adaptShareMetadata(oShareMetadata))
|
|
137
143
|
.then(function(oModelData) {
|
|
138
144
|
fragmentController = {
|
|
139
145
|
shareEmailPressed: function() {
|
|
146
|
+
var oMailData = oShareActionSheet.getModel("shareData");
|
|
147
|
+
oMailData = oMailData.getData();
|
|
140
148
|
var oResource = sap.ui.getCore().getLibraryResourceBundle("sap.fe.core");
|
|
141
|
-
var sEmailSubject =
|
|
142
|
-
?
|
|
143
|
-
: oResource.getText("T_SHARE_UTIL_HELPER_SAPFE_EMAIL_SUBJECT", [
|
|
149
|
+
var sEmailSubject = oMailData.email.title
|
|
150
|
+
? oMailData.email.title
|
|
151
|
+
: oResource.getText("T_SHARE_UTIL_HELPER_SAPFE_EMAIL_SUBJECT", [oMailData.title]);
|
|
144
152
|
library.URLHelper.triggerEmail(
|
|
145
153
|
null,
|
|
146
154
|
sEmailSubject,
|
|
147
|
-
|
|
148
|
-
window.location.pathname +
|
|
149
|
-
(oModelData.email.url ? oModelData.email.url : oModelData.url)
|
|
155
|
+
oMailData.email.url ? oMailData.email.url : oMailData.url
|
|
150
156
|
);
|
|
151
157
|
},
|
|
152
158
|
onSaveTilePress: function() {
|
|
@@ -196,10 +202,12 @@ sap.ui.define(
|
|
|
196
202
|
};
|
|
197
203
|
if (by.shareSheet) {
|
|
198
204
|
oShareActionSheet = by.shareSheet;
|
|
205
|
+
|
|
199
206
|
var oShareModel = oShareActionSheet.getModel("share");
|
|
200
207
|
that._setStaticShareData(oShareModel);
|
|
201
208
|
var oNewData = extend(oShareModel.getData(), oTileData);
|
|
202
209
|
oShareModel.setData(oNewData);
|
|
210
|
+
setShareEmailData(oShareActionSheet, oModelData);
|
|
203
211
|
oShareActionSheet.openBy(by);
|
|
204
212
|
} else {
|
|
205
213
|
var sFragmentName = "sap.fe.macros.share.ShareSheet",
|
|
@@ -211,11 +219,16 @@ sap.ui.define(
|
|
|
211
219
|
})
|
|
212
220
|
.then(function(oActionSheet) {
|
|
213
221
|
oShareActionSheet = oActionSheet;
|
|
222
|
+
|
|
214
223
|
oShareActionSheet.setModel(new JSONModel(oTileData || {}), "share");
|
|
215
224
|
var oShareModel = oShareActionSheet.getModel("share");
|
|
216
225
|
that._setStaticShareData(oShareModel);
|
|
217
226
|
var oNewData = extend(oShareModel.getData(), oTileData);
|
|
218
227
|
oShareModel.setData(oNewData);
|
|
228
|
+
|
|
229
|
+
oShareActionSheet.setModel(new JSONModel(oModelData || {}), "shareData");
|
|
230
|
+
setShareEmailData(oShareActionSheet, oModelData);
|
|
231
|
+
|
|
219
232
|
by.addDependent(oShareActionSheet);
|
|
220
233
|
oShareActionSheet.openBy(by);
|
|
221
234
|
fragmentController.setShareSheet(oShareActionSheet);
|