@sapui5/sap.fe.templates 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/templates/.library +1 -1
- package/src/sap/fe/templates/AnalyticalListPage/Component.js +1 -1
- package/src/sap/fe/templates/AnalyticalListPage/chart/FEChartDelegate.js +1 -1
- package/src/sap/fe/templates/AnalyticalListPage/manifest.json +6 -0
- package/src/sap/fe/templates/ListComponent.js +1 -1
- package/src/sap/fe/templates/ListReport/Component.js +1 -1
- package/src/sap/fe/templates/ListReport/ExtensionAPI.js +20 -5
- package/src/sap/fe/templates/ListReport/ListReport.view.xml +3 -2
- package/src/sap/fe/templates/ListReport/ListReportController.controller.js +183 -170
- package/src/sap/fe/templates/ListReport/manifest.json +11 -1
- package/src/sap/fe/templates/ListReport/overrides/IntentBasedNavigation.js +7 -3
- package/src/sap/fe/templates/ListReport/overrides/Share.js +37 -22
- package/src/sap/fe/templates/ListReport/overrides/ViewState.js +124 -27
- package/src/sap/fe/templates/ListReport/view/fragments/MultipleMode.fragment.xml +3 -3
- package/src/sap/fe/templates/ObjectPage/AnnotationHelper.js +25 -5
- package/src/sap/fe/templates/ObjectPage/Component.js +1 -7
- package/src/sap/fe/templates/ObjectPage/ExtensionAPI.js +1 -1
- package/src/sap/fe/templates/ObjectPage/ObjectPage.view.xml +69 -60
- package/src/sap/fe/templates/ObjectPage/ObjectPageController.controller.js +154 -231
- package/src/sap/fe/templates/ObjectPage/controls/StashableHBox.js +1 -1
- package/src/sap/fe/templates/ObjectPage/controls/StashableVBox.js +1 -1
- package/src/sap/fe/templates/ObjectPage/controls/SubSectionBlock.js +2 -2
- package/src/sap/fe/templates/ObjectPage/designtime/FlexBox.designtime.js +1 -1
- package/src/sap/fe/templates/ObjectPage/designtime/StashableHBox.designtime.js +1 -1
- package/src/sap/fe/templates/ObjectPage/designtime/StashableVBox.designtime.js +1 -1
- package/src/sap/fe/templates/ObjectPage/flexibility/StashableHBox.flexibility.js +1 -1
- package/src/sap/fe/templates/ObjectPage/flexibility/StashableVBox.flexibility.js +1 -1
- package/src/sap/fe/templates/ObjectPage/overrides/IntentBasedNavigation.js +1 -1
- package/src/sap/fe/templates/ObjectPage/overrides/InternalRouting.js +1 -1
- package/src/sap/fe/templates/ObjectPage/overrides/MessageHandler.js +1 -1
- package/src/sap/fe/templates/ObjectPage/overrides/Paginator.js +13 -0
- package/src/sap/fe/templates/ObjectPage/overrides/Share.js +87 -63
- package/src/sap/fe/templates/ObjectPage/overrides/ViewState.js +23 -2
- package/src/sap/fe/templates/ObjectPage/templating/ObjectPageTemplating.js +14 -11
- package/src/sap/fe/templates/ObjectPage/templating/ObjectPageTemplating.ts +26 -12
- package/src/sap/fe/templates/ObjectPage/view/fragments/Actions.fragment.xml +3 -3
- package/src/sap/fe/templates/ObjectPage/view/fragments/EditableHeaderFacet.fragment.xml +3 -3
- package/src/sap/fe/templates/ObjectPage/view/fragments/HeaderContent.fragment.xml +34 -38
- package/src/sap/fe/templates/ObjectPage/view/fragments/Section.fragment.xml +9 -2
- package/src/sap/fe/templates/ObjectPage/view/fragments/SectionContent.fragment.xml +1 -4
- package/src/sap/fe/templates/ObjectPage/view/fragments/SectionFormContent.fragment.xml +1 -0
- package/src/sap/fe/templates/ObjectPage/view/fragments/SectionMoreFormContent.fragment.xml +1 -0
- package/src/sap/fe/templates/RootContainer/controller/Fcl.controller.js +117 -116
- package/src/sap/fe/templates/RootContainer/controller/NavContainer.controller.js +63 -71
- package/src/sap/fe/templates/RootContainer/controller/RootContainerBaseController.js +33 -22
- package/src/sap/fe/templates/RootContainer/overrides/EditFlow.js +1 -1
- package/src/sap/fe/templates/RootContainer/view/Fcl.view.xml +2 -1
- package/src/sap/fe/templates/RootContainer/view/NavContainer.view.xml +1 -1
- package/src/sap/fe/templates/TableScroller.js +61 -0
- package/src/sap/fe/templates/controls/Chart.fragment.xml +6 -2
- package/src/sap/fe/templates/controls/Table.fragment.xml +1 -0
- package/src/sap/fe/templates/library.js +2 -2
- package/src/sap/fe/templates/messagebundle.properties +1 -1
- package/src/sap/fe/templates/messagebundle_ar.properties +2 -2
- package/src/sap/fe/templates/messagebundle_bg.properties +1 -1
- package/src/sap/fe/templates/messagebundle_ca.properties +1 -1
- package/src/sap/fe/templates/messagebundle_cs.properties +1 -1
- package/src/sap/fe/templates/messagebundle_cy.properties +1 -1
- package/src/sap/fe/templates/messagebundle_da.properties +2 -2
- package/src/sap/fe/templates/messagebundle_de.properties +1 -1
- package/src/sap/fe/templates/messagebundle_el.properties +1 -1
- package/src/sap/fe/templates/messagebundle_en.properties +1 -1
- package/src/sap/fe/templates/messagebundle_en_GB.properties +1 -1
- package/src/sap/fe/templates/messagebundle_en_US_sappsd.properties +1 -1
- package/src/sap/fe/templates/messagebundle_en_US_saprigi.properties +1 -1
- package/src/sap/fe/templates/messagebundle_en_US_saptrc.properties +1 -1
- package/src/sap/fe/templates/messagebundle_es.properties +1 -1
- package/src/sap/fe/templates/messagebundle_es_MX.properties +1 -1
- package/src/sap/fe/templates/messagebundle_et.properties +1 -1
- package/src/sap/fe/templates/messagebundle_fi.properties +1 -1
- package/src/sap/fe/templates/messagebundle_fr.properties +2 -2
- package/src/sap/fe/templates/messagebundle_fr_CA.properties +2 -2
- package/src/sap/fe/templates/messagebundle_hi.properties +1 -1
- package/src/sap/fe/templates/messagebundle_hr.properties +2 -2
- package/src/sap/fe/templates/messagebundle_hu.properties +1 -1
- package/src/sap/fe/templates/messagebundle_id.properties +1 -1
- package/src/sap/fe/templates/messagebundle_it.properties +1 -1
- package/src/sap/fe/templates/messagebundle_iw.properties +1 -1
- package/src/sap/fe/templates/messagebundle_ja.properties +1 -1
- package/src/sap/fe/templates/messagebundle_kk.properties +1 -1
- package/src/sap/fe/templates/messagebundle_ko.properties +1 -1
- package/src/sap/fe/templates/messagebundle_lt.properties +1 -1
- package/src/sap/fe/templates/messagebundle_lv.properties +1 -1
- package/src/sap/fe/templates/messagebundle_ms.properties +1 -1
- package/src/sap/fe/templates/messagebundle_nl.properties +1 -1
- package/src/sap/fe/templates/messagebundle_no.properties +2 -2
- package/src/sap/fe/templates/messagebundle_pl.properties +2 -2
- package/src/sap/fe/templates/messagebundle_pt.properties +1 -1
- package/src/sap/fe/templates/messagebundle_pt_PT.properties +1 -1
- package/src/sap/fe/templates/messagebundle_ro.properties +1 -1
- package/src/sap/fe/templates/messagebundle_ru.properties +1 -1
- package/src/sap/fe/templates/messagebundle_sh.properties +1 -1
- package/src/sap/fe/templates/messagebundle_sk.properties +2 -2
- package/src/sap/fe/templates/messagebundle_sl.properties +1 -1
- package/src/sap/fe/templates/messagebundle_sv.properties +1 -1
- package/src/sap/fe/templates/messagebundle_th.properties +2 -2
- package/src/sap/fe/templates/messagebundle_tr.properties +1 -1
- package/src/sap/fe/templates/messagebundle_uk.properties +1 -1
- package/src/sap/fe/templates/messagebundle_vi.properties +1 -1
- package/src/sap/fe/templates/messagebundle_zh_CN.properties +2 -2
- package/src/sap/fe/templates/messagebundle_zh_TW.properties +1 -1
- package/src/sap/fe/templates/ObjectPage/overrides/Routing.js +0 -20
- package/src/sap/fe/templates/ObjectPage/view/fragments/TitleAndSubtitle.fragment.xml +0 -24
- package/src/sap/fe/templates/RootContainer/view/PlaceholderLR.view.xml +0 -617
- package/src/sap/fe/templates/RootContainer/view/PlaceholderOP.view.xml +0 -588
- package/src/sap/fe/templates/controls/OverflowToolbarButtonHover.js +0 -25
- package/src/sap/fe/templates/controls/Paginator.control.xml +0 -24
- package/src/sap/fe/templates/controls/Paginator.js +0 -173
|
@@ -10,45 +10,41 @@
|
|
|
10
10
|
ID: 'sap/fe/core/helpers/StableIdHelper'
|
|
11
11
|
}"
|
|
12
12
|
>
|
|
13
|
-
<template:
|
|
14
|
-
<template:
|
|
15
|
-
<template:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
<template:with path="converterContext>header/facets" var="converterHeaderFacets">
|
|
14
|
+
<template:repeat list="{converterHeaderFacets>}" var="converterHeaderFacet">
|
|
15
|
+
<template:if test="{= ${converterHeaderFacet>type} === 'Annotation'}">
|
|
16
|
+
<!-- Header facets from OData Service Annotations -->
|
|
17
|
+
<template:then>
|
|
18
|
+
<template:with path="converterHeaderFacet>annotationPath" var="headerFacet">
|
|
19
|
+
<template:with path="headerFacet>" var="collectionHeaderFacet">
|
|
20
|
+
<template:if test="{= ${converterHeaderFacet>facetType} === 'Reference' }">
|
|
19
21
|
<template:then>
|
|
20
|
-
<
|
|
21
|
-
<template:with path="headerFacet>" var="collectionHeaderFacet">
|
|
22
|
-
<template:if test="{= ${converterHeaderFacet>facetType} === 'Reference' }">
|
|
23
|
-
<template:then>
|
|
24
|
-
<core:Fragment fragmentName="sap.fe.templates.ObjectPage.view.fragments.HeaderFacet" type="XML" />
|
|
25
|
-
</template:then>
|
|
26
|
-
<template:elseif test="{= ${converterHeaderFacet>facetType} === 'Collection' }">
|
|
27
|
-
<fe:StashableVBox
|
|
28
|
-
id="{= ID.generate(['fe', 'HeaderCollectionFacetContainer', { Facet: ${collectionHeaderFacet>} } ])}"
|
|
29
|
-
dt:designtime="{= ${converterHeaderFacet>flexSettings/designtime} === 'Default' ? 'sap/fe/templates/ObjectPage/designtime/StashableVBox.designtime' : ${converterHeaderFacet>flexSettings/designtime}}"
|
|
30
|
-
fl:flexibility="sap/fe/templates/ObjectPage/flexibility/StashableVBox.flexibility"
|
|
31
|
-
stashed="{converterHeaderFacet>stashed}"
|
|
32
|
-
displayInline="true"
|
|
33
|
-
>
|
|
34
|
-
<template:repeat list="{converterHeaderFacet>facets}" var="converterHeaderFacet">
|
|
35
|
-
<template:with path="converterHeaderFacet>annotationPath" var="headerFacet">
|
|
36
|
-
<core:Fragment fragmentName="sap.fe.templates.ObjectPage.view.fragments.HeaderFacet" type="XML" />
|
|
37
|
-
</template:with>
|
|
38
|
-
</template:repeat>
|
|
39
|
-
</fe:StashableVBox>
|
|
40
|
-
</template:elseif>
|
|
41
|
-
</template:if>
|
|
42
|
-
</template:with>
|
|
43
|
-
</template:with>
|
|
22
|
+
<core:Fragment fragmentName="sap.fe.templates.ObjectPage.view.fragments.HeaderFacet" type="XML" />
|
|
44
23
|
</template:then>
|
|
45
|
-
<template:elseif test="{= ${converterHeaderFacet>
|
|
46
|
-
|
|
47
|
-
|
|
24
|
+
<template:elseif test="{= ${converterHeaderFacet>facetType} === 'Collection' }">
|
|
25
|
+
<fe:StashableVBox
|
|
26
|
+
id="{= ID.generate(['fe', 'HeaderCollectionFacetContainer', { Facet: ${collectionHeaderFacet>} } ])}"
|
|
27
|
+
dt:designtime="{= ${converterHeaderFacet>flexSettings/designtime} === 'Default' ? 'sap/fe/templates/ObjectPage/designtime/StashableVBox.designtime' : ${converterHeaderFacet>flexSettings/designtime}}"
|
|
28
|
+
fl:flexibility="sap/fe/templates/ObjectPage/flexibility/StashableVBox.flexibility"
|
|
29
|
+
stashed="{converterHeaderFacet>stashed}"
|
|
30
|
+
displayInline="true"
|
|
31
|
+
>
|
|
32
|
+
<template:repeat list="{converterHeaderFacet>facets}" var="converterHeaderFacet">
|
|
33
|
+
<template:with path="converterHeaderFacet>annotationPath" var="headerFacet">
|
|
34
|
+
<core:Fragment fragmentName="sap.fe.templates.ObjectPage.view.fragments.HeaderFacet" type="XML" />
|
|
35
|
+
</template:with>
|
|
36
|
+
</template:repeat>
|
|
37
|
+
</fe:StashableVBox>
|
|
48
38
|
</template:elseif>
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
39
|
+
</template:if>
|
|
40
|
+
</template:with>
|
|
41
|
+
</template:with>
|
|
42
|
+
</template:then>
|
|
43
|
+
<template:elseif test="{= ${converterHeaderFacet>fragmentName}}">
|
|
44
|
+
<!-- Custom header facets from manifest (FPM) -->
|
|
45
|
+
<core:Fragment fragmentName="sap.fe.templates.ObjectPage.view.fragments.HeaderFacetCustomContainer" type="XML" />
|
|
46
|
+
</template:elseif>
|
|
47
|
+
</template:if>
|
|
48
|
+
</template:repeat>
|
|
49
|
+
</template:with>
|
|
54
50
|
</core:FragmentDefinition>
|
|
@@ -19,9 +19,15 @@
|
|
|
19
19
|
For HeaderFacets, a section to the object page is added which is only visible in edit mode.
|
|
20
20
|
The object page has one section with one sub-section for all header facets, and a block for each facet.
|
|
21
21
|
-->
|
|
22
|
-
<template:with path="converterContext>
|
|
22
|
+
<template:with path="converterContext>header/section" var="headerSection">
|
|
23
23
|
<template:if test="{viewData>/editableHeaderContent}">
|
|
24
|
-
<uxap:ObjectPageSection
|
|
24
|
+
<uxap:ObjectPageSection
|
|
25
|
+
dt:designtime="not-adaptable-visibility"
|
|
26
|
+
id="{headerSection>id}"
|
|
27
|
+
title="{headerSection>title}"
|
|
28
|
+
visible="{headerSection>visible}"
|
|
29
|
+
titleUppercase="false"
|
|
30
|
+
>
|
|
25
31
|
<uxap:subSections>
|
|
26
32
|
<uxap:ObjectPageSubSection id="fe::EditableHeaderSubSection">
|
|
27
33
|
<core:Fragment fragmentName="sap.fe.templates.ObjectPage.view.fragments.EditableHeaderFacet" type="XML" />
|
|
@@ -51,6 +57,7 @@
|
|
|
51
57
|
>
|
|
52
58
|
<uxap:customData>
|
|
53
59
|
<core:CustomData key="strategyForVisibilityChange" value="lazyLoading" />
|
|
60
|
+
<core:CustomData key="isVisibilityDynamic" value="{subSection>isVisibilityDynamic}" />
|
|
54
61
|
</uxap:customData>
|
|
55
62
|
<template:if test="{= ${subSection>type} === 'Mixed'}">
|
|
56
63
|
<template:then>
|
|
@@ -131,10 +131,7 @@
|
|
|
131
131
|
<template:elseif test="{= ${subSection>type} === 'DataVisualization'}">
|
|
132
132
|
<uxap:blocks>
|
|
133
133
|
<template:if test="{= ${subSection>level} === 2}">
|
|
134
|
-
<Title
|
|
135
|
-
text="{subSection>title}"
|
|
136
|
-
visible="{= ${subSection>visible} && ${subSection>title} !=='undefined' && ${subSection>showTitle} ? true : false}"
|
|
137
|
-
/>
|
|
134
|
+
<Title text="{subSection>title}" visible="{subSection>titleVisible}" />
|
|
138
135
|
</template:if>
|
|
139
136
|
<opcontrol:SubSectionBlock visible="{subSection>visible}">
|
|
140
137
|
<opcontrol:content>
|
|
@@ -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
|
[
|
|
@@ -9,12 +9,24 @@ sap.ui.define(
|
|
|
9
9
|
"./RootContainerBaseController",
|
|
10
10
|
"sap/f/FlexibleColumnLayoutSemanticHelper",
|
|
11
11
|
"sap/ui/core/Component",
|
|
12
|
+
"sap/fe/core/CommonUtils",
|
|
12
13
|
"sap/fe/core/controllerextensions/ViewState",
|
|
13
14
|
"sap/m/Link",
|
|
14
15
|
"sap/m/MessagePage",
|
|
15
16
|
"sap/m/MessageBox"
|
|
16
17
|
],
|
|
17
|
-
function(
|
|
18
|
+
function(
|
|
19
|
+
Log,
|
|
20
|
+
JSONModel,
|
|
21
|
+
BaseController,
|
|
22
|
+
FlexibleColumnLayoutSemanticHelper,
|
|
23
|
+
Component,
|
|
24
|
+
CommonUtils,
|
|
25
|
+
ViewState,
|
|
26
|
+
Link,
|
|
27
|
+
MessagePage,
|
|
28
|
+
MessageBox
|
|
29
|
+
) {
|
|
18
30
|
"use strict";
|
|
19
31
|
|
|
20
32
|
var CONSTANTS = {
|
|
@@ -54,28 +66,54 @@ sap.ui.define(
|
|
|
54
66
|
applyInitialStateOnly: function() {
|
|
55
67
|
return false;
|
|
56
68
|
},
|
|
69
|
+
adaptBindingRefreshControls: function(aControls) {
|
|
70
|
+
this.getView()
|
|
71
|
+
.getController()
|
|
72
|
+
._getAllVisibleViews()
|
|
73
|
+
.forEach(function(oChildView) {
|
|
74
|
+
var pChildView = new Promise(function(resolve) {
|
|
75
|
+
resolve(oChildView);
|
|
76
|
+
});
|
|
77
|
+
aControls.push(pChildView);
|
|
78
|
+
});
|
|
79
|
+
},
|
|
57
80
|
adaptStateControls: function(aStateControls) {
|
|
58
81
|
this.getView()
|
|
59
82
|
.getController()
|
|
60
83
|
._getAllVisibleViews()
|
|
61
84
|
.forEach(function(oChildView) {
|
|
62
85
|
var pChildView = new Promise(function(resolve) {
|
|
63
|
-
|
|
64
|
-
oChildView &&
|
|
65
|
-
oChildView.getController &&
|
|
66
|
-
oChildView.getController().isPlaceholder &&
|
|
67
|
-
oChildView.getController().isPlaceholder()
|
|
68
|
-
) {
|
|
69
|
-
oChildView.getController().attachEventOnce("targetPageInsertedInContainer", function(oEvent) {
|
|
70
|
-
var oTargetPage = oEvent.getParameter("targetpage");
|
|
71
|
-
resolve(_getViewFromContainer(oTargetPage));
|
|
72
|
-
});
|
|
73
|
-
} else {
|
|
74
|
-
resolve(oChildView);
|
|
75
|
-
}
|
|
86
|
+
resolve(oChildView);
|
|
76
87
|
});
|
|
77
88
|
aStateControls.push(pChildView);
|
|
78
89
|
});
|
|
90
|
+
},
|
|
91
|
+
onRestore: function() {
|
|
92
|
+
var oView = this.getView(),
|
|
93
|
+
oNavContainer = oView.byId("appContent");
|
|
94
|
+
var oInternalModel = oNavContainer.getModel("internal");
|
|
95
|
+
var oPages = oInternalModel.getProperty("/pages");
|
|
96
|
+
|
|
97
|
+
for (var sComponentId in oPages) {
|
|
98
|
+
oInternalModel.setProperty("/pages/" + sComponentId + "/restoreStatus", "pending");
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
onSuspend: function() {
|
|
102
|
+
var oFCLController = this.getView().getController();
|
|
103
|
+
var oFCLControl = oFCLController.getFclControl();
|
|
104
|
+
var aBeginColumnPages = oFCLControl.getBeginColumnPages() || [];
|
|
105
|
+
var aMidColumnPages = oFCLControl.getMidColumnPages() || [];
|
|
106
|
+
var aEndColumnPages = oFCLControl.getEndColumnPages() || [];
|
|
107
|
+
var aPages = [].concat(aBeginColumnPages, aMidColumnPages, aEndColumnPages);
|
|
108
|
+
|
|
109
|
+
aPages.forEach(function(oPage) {
|
|
110
|
+
var oTargetView = _getViewFromContainer(oPage);
|
|
111
|
+
|
|
112
|
+
var oController = oTargetView && oTargetView.getController();
|
|
113
|
+
if (oController && oController.viewState && oController.viewState.onSuspend) {
|
|
114
|
+
return oController.viewState.onSuspend();
|
|
115
|
+
}
|
|
116
|
+
});
|
|
79
117
|
}
|
|
80
118
|
}),
|
|
81
119
|
|
|
@@ -498,9 +536,11 @@ sap.ui.define(
|
|
|
498
536
|
if (FCLLevel >= this._oFCLConfig.maxColumnsCount) {
|
|
499
537
|
// The view is on a level > max number of columns. It's always fullscreen without close/exit buttons
|
|
500
538
|
viewColumn = oFclColName[this._oFCLConfig.maxColumnsCount - 1];
|
|
539
|
+
oUIState.actionButtonsInfo.midColumn.fullScreen = null;
|
|
501
540
|
oUIState.actionButtonsInfo.midColumn.exitFullScreen = null;
|
|
502
541
|
oUIState.actionButtonsInfo.midColumn.closeColumn = null;
|
|
503
542
|
oUIState.actionButtonsInfo.endColumn.exitFullScreen = null;
|
|
543
|
+
oUIState.actionButtonsInfo.endColumn.fullScreen = null;
|
|
504
544
|
oUIState.actionButtonsInfo.endColumn.closeColumn = null;
|
|
505
545
|
} else {
|
|
506
546
|
viewColumn = oFclColName[FCLLevel];
|
|
@@ -520,7 +560,13 @@ sap.ui.define(
|
|
|
520
560
|
// so we have to add this info manually
|
|
521
561
|
oUIState.actionButtonsInfo.beginColumn = { fullScreen: null, exitFullScreen: null, closeColumn: null };
|
|
522
562
|
|
|
523
|
-
|
|
563
|
+
var oActionButtonInfos = Object.assign({}, oUIState.actionButtonsInfo[viewColumn]);
|
|
564
|
+
oActionButtonInfos.switchVisible = oActionButtonInfos.fullScreen !== null || oActionButtonInfos.exitFullScreen !== null;
|
|
565
|
+
oActionButtonInfos.switchIcon =
|
|
566
|
+
oActionButtonInfos.fullScreen !== null ? "sap-icon://full-screen" : "sap-icon://exit-full-screen";
|
|
567
|
+
oActionButtonInfos.isFullScreen = oActionButtonInfos.fullScreen === null;
|
|
568
|
+
|
|
569
|
+
oView.getModel("fclhelper").setProperty("/actionButtonsInfo", oActionButtonInfos);
|
|
524
570
|
|
|
525
571
|
oView.getModel("fclhelper").setProperty("/showShareIcon", this._updateShareButtonVisibility(viewColumn, sLayout));
|
|
526
572
|
},
|
|
@@ -551,11 +597,7 @@ sap.ui.define(
|
|
|
551
597
|
|
|
552
598
|
// Update the layout of the FlexibleColumnLayout
|
|
553
599
|
if (sLayout) {
|
|
554
|
-
|
|
555
|
-
this.getFclControl().setModel(new JSONModel(), "fcl");
|
|
556
|
-
this.getFclControl().bindProperty("layout", "fcl>/layout");
|
|
557
|
-
}
|
|
558
|
-
this.getFclControl().setProperty("layout", sLayout);
|
|
600
|
+
this.getFclControl().setLayout(sLayout);
|
|
559
601
|
}
|
|
560
602
|
}
|
|
561
603
|
},
|
|
@@ -710,104 +752,63 @@ sap.ui.define(
|
|
|
710
752
|
return aViews;
|
|
711
753
|
},
|
|
712
754
|
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
fnTo = oRootContainer.toBeginColumnPage;
|
|
757
|
-
break;
|
|
758
|
-
case 1:
|
|
759
|
-
if (!oPlaceholderTarget["mid"]) {
|
|
760
|
-
oPlaceholderTarget["mid"] = this.oPlaceholder.createPlaceholderView(oTarget.name);
|
|
761
|
-
oRootContainer.addMidColumnPage(oPlaceholderTarget["mid"]);
|
|
762
|
-
oRootContainer.setDefaultTransitionNameMidColumn("placeholder");
|
|
763
|
-
bFirstNavigation = true;
|
|
755
|
+
onContainerReady: function() {
|
|
756
|
+
var aViews = this._getAllVisibleViews();
|
|
757
|
+
var aRestorePromises = [];
|
|
758
|
+
aViews.reduce(function(aPromises, oTargetView) {
|
|
759
|
+
aPromises.push(CommonUtils.restoreView(oTargetView));
|
|
760
|
+
return aPromises;
|
|
761
|
+
}, aRestorePromises);
|
|
762
|
+
return Promise.all(aRestorePromises);
|
|
763
|
+
},
|
|
764
|
+
|
|
765
|
+
getRightmostContext: function() {
|
|
766
|
+
var oContext;
|
|
767
|
+
switch (this.getFclControl().getLayout()) {
|
|
768
|
+
case sap.f.LayoutType.OneColumn:
|
|
769
|
+
if (this.getFclControl().getCurrentBeginColumnPage()) {
|
|
770
|
+
oContext = _getViewFromContainer(this.getFclControl().getCurrentBeginColumnPage()).getBindingContext();
|
|
771
|
+
}
|
|
772
|
+
break;
|
|
773
|
+
|
|
774
|
+
case sap.f.LayoutType.TwoColumnsBeginExpanded:
|
|
775
|
+
case sap.f.LayoutType.TwoColumnsMidExpanded:
|
|
776
|
+
if (this.getFclControl().getCurrentMidColumnPage()) {
|
|
777
|
+
oContext = _getViewFromContainer(this.getFclControl().getCurrentMidColumnPage()).getBindingContext();
|
|
778
|
+
}
|
|
779
|
+
break;
|
|
780
|
+
|
|
781
|
+
case sap.f.LayoutType.ThreeColumnsEndExpanded:
|
|
782
|
+
case sap.f.LayoutType.ThreeColumnsMidExpanded:
|
|
783
|
+
case sap.f.LayoutType.ThreeColumnsMidExpandedEndHidden:
|
|
784
|
+
case sap.f.LayoutType.ThreeColumnsBeginExpandedEndHidden:
|
|
785
|
+
case sap.f.LayoutType.EndColumnFullScreen:
|
|
786
|
+
if (this.getFclControl().getCurrentEndColumnPage()) {
|
|
787
|
+
oContext = _getViewFromContainer(this.getFclControl().getCurrentEndColumnPage()).getBindingContext();
|
|
788
|
+
}
|
|
789
|
+
break;
|
|
790
|
+
|
|
791
|
+
case sap.f.LayoutType.MidColumnFullScreen:
|
|
792
|
+
// In this case we need to determine if this mid column fullscreen comes from a 2 or a 3 column layout
|
|
793
|
+
var sLayoutWhenExitFullScreen = this.getHelper().getCurrentUIState().actionButtonsInfo.midColumn.exitFullScreen;
|
|
794
|
+
if (sLayoutWhenExitFullScreen.indexOf("ThreeColumn") >= 0) {
|
|
795
|
+
// We come from a 3 column layout
|
|
796
|
+
if (this.getFclControl().getCurrentEndColumnPage()) {
|
|
797
|
+
oContext = _getViewFromContainer(this.getFclControl().getCurrentEndColumnPage()).getBindingContext();
|
|
764
798
|
}
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
if (!oPlaceholderTarget["end"]) {
|
|
770
|
-
oPlaceholderTarget["end"] = this.oPlaceholder.createPlaceholderView(oTarget.name);
|
|
771
|
-
oRootContainer.addEndColumnPage(oPlaceholderTarget["end"]);
|
|
772
|
-
oRootContainer.setDefaultTransitionNameEndColumn("placeholder");
|
|
773
|
-
bFirstNavigation = true;
|
|
799
|
+
} else {
|
|
800
|
+
// We come from a 2 column layout
|
|
801
|
+
if (this.getFclControl().getCurrentMidColumnPage()) {
|
|
802
|
+
oContext = _getViewFromContainer(this.getFclControl().getCurrentMidColumnPage()).getBindingContext();
|
|
774
803
|
}
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
}
|
|
781
|
-
}
|
|
782
|
-
var sStartupParameter;
|
|
783
|
-
var bPlaceholderScreenEnabledFirstTimeOnly;
|
|
784
|
-
if (this.oPlaceholder.isPlaceholderEnabled) {
|
|
785
|
-
if (oTarget.name === "sap.fe.templates.ListReport") {
|
|
786
|
-
sStartupParameter = this.oPlaceholder.getEnumStartingParams().FE_DATA_LOADED;
|
|
787
|
-
bPlaceholderScreenEnabledFirstTimeOnly = true;
|
|
788
|
-
} else {
|
|
789
|
-
sStartupParameter = this.oPlaceholder.getEnumStartingParams().FE_HEROES_LOADED;
|
|
790
|
-
bPlaceholderScreenEnabledFirstTimeOnly = false;
|
|
791
|
-
}
|
|
792
|
-
}
|
|
793
|
-
if ((bPlaceholderScreenEnabledFirstTimeOnly && !toView.getController().istargetNavigated(oTarget)) || bFirstNavigation) {
|
|
794
|
-
toView.getController().setPlaceholderOption(sStartupParameter);
|
|
795
|
-
fnTo.apply(oRootContainer, [toView, "show"]);
|
|
796
|
-
bPlaceholderDisplayed = true;
|
|
797
|
-
} else if (!bPlaceholderScreenEnabledFirstTimeOnly && targetIndex === aTargets.length - 1) {
|
|
798
|
-
//placeholder should not be displayed if only the appstate is modified
|
|
799
|
-
var sCurrentHashNoAppState = oRouter
|
|
800
|
-
.getHashChanger()
|
|
801
|
-
.getHash()
|
|
802
|
-
.replace(/[&?]{1}sap-iapp-state=[A-Z0-9]+/, "");
|
|
803
|
-
if (this.sPreviousHashNoAppState !== sCurrentHashNoAppState) {
|
|
804
|
-
toView.getController().setPlaceholderOption(sStartupParameter);
|
|
805
|
-
fnTo.apply(oRootContainer, [toView, "show"]);
|
|
806
|
-
bPlaceholderDisplayed = true;
|
|
807
|
-
}
|
|
808
|
-
this.sPreviousHashNoAppState = sCurrentHashNoAppState;
|
|
804
|
+
}
|
|
805
|
+
break;
|
|
806
|
+
|
|
807
|
+
default:
|
|
808
|
+
Log.error("Unhandled switch case for " + this.getFclControl().getLayout());
|
|
809
809
|
}
|
|
810
|
-
|
|
810
|
+
|
|
811
|
+
return oContext;
|
|
811
812
|
}
|
|
812
813
|
});
|
|
813
814
|
},
|
|
@@ -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
|
[
|
|
@@ -30,32 +30,74 @@ sap.ui.define(
|
|
|
30
30
|
applyInitialStateOnly: function() {
|
|
31
31
|
return false;
|
|
32
32
|
},
|
|
33
|
+
adaptBindingRefreshControls: function(aControls) {
|
|
34
|
+
var oView = this.getView(),
|
|
35
|
+
oController = oView.getController();
|
|
36
|
+
aControls.push(oController._getCurrentPage(oView));
|
|
37
|
+
},
|
|
33
38
|
adaptStateControls: function(aStateControls) {
|
|
34
|
-
var
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
39
|
+
var oView = this.getView(),
|
|
40
|
+
oController = oView.getController();
|
|
41
|
+
aStateControls.push(oController._getCurrentPage(oView));
|
|
42
|
+
},
|
|
43
|
+
onRestore: function() {
|
|
44
|
+
var oView = this.getView(),
|
|
45
|
+
oNavContainer = oView.byId("appContent");
|
|
46
|
+
var oInternalModel = oNavContainer.getModel("internal");
|
|
47
|
+
var oPages = oInternalModel.getProperty("/pages");
|
|
48
|
+
|
|
49
|
+
for (var sComponentId in oPages) {
|
|
50
|
+
oInternalModel.setProperty("/pages/" + sComponentId + "/restoreStatus", "pending");
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
onSuspend: function() {
|
|
54
|
+
var oView = this.getView(),
|
|
55
|
+
oNavContainer = oView.byId("appContent");
|
|
56
|
+
var aPages = oNavContainer.getPages();
|
|
57
|
+
aPages.forEach(function(oPage) {
|
|
58
|
+
var oTargetView = CommonUtils.getTargetView(oPage);
|
|
59
|
+
|
|
60
|
+
var oController = oTargetView && oTargetView.getController();
|
|
61
|
+
if (oController && oController.viewState && oController.viewState.onSuspend) {
|
|
62
|
+
return oController.viewState.onSuspend();
|
|
53
63
|
}
|
|
54
64
|
});
|
|
55
|
-
aStateControls.push(pCurrentPage);
|
|
56
65
|
}
|
|
57
66
|
}),
|
|
58
67
|
|
|
68
|
+
onContainerReady: function() {
|
|
69
|
+
// Restore views if neccessary.
|
|
70
|
+
var oView = this.getView(),
|
|
71
|
+
oPagePromise = this._getCurrentPage(oView);
|
|
72
|
+
|
|
73
|
+
return oPagePromise.then(function(oCurrentPage) {
|
|
74
|
+
var oTargetView = CommonUtils.getTargetView(oCurrentPage);
|
|
75
|
+
return CommonUtils.restoreView(oTargetView);
|
|
76
|
+
});
|
|
77
|
+
},
|
|
78
|
+
|
|
79
|
+
_getCurrentPage: function(oView) {
|
|
80
|
+
return new Promise(function(resolve) {
|
|
81
|
+
var oNavContainer = oView.byId("appContent");
|
|
82
|
+
var oCurrentPage = oNavContainer.getCurrentPage();
|
|
83
|
+
if (
|
|
84
|
+
oCurrentPage &&
|
|
85
|
+
oCurrentPage.getController &&
|
|
86
|
+
oCurrentPage.getController().isPlaceholder &&
|
|
87
|
+
oCurrentPage.getController().isPlaceholder()
|
|
88
|
+
) {
|
|
89
|
+
oCurrentPage.getController().attachEventOnce("targetPageInsertedInContainer", function(oEvent) {
|
|
90
|
+
var oTargetPage = oEvent.getParameter("targetpage");
|
|
91
|
+
var oTargetView = CommonUtils.getTargetView(oTargetPage);
|
|
92
|
+
resolve(oTargetView !== oView && oTargetView);
|
|
93
|
+
});
|
|
94
|
+
} else {
|
|
95
|
+
var oTargetView = CommonUtils.getTargetView(oCurrentPage);
|
|
96
|
+
resolve(oTargetView !== oView && oTargetView);
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
},
|
|
100
|
+
|
|
59
101
|
/**
|
|
60
102
|
* @private
|
|
61
103
|
* @name sap.fe.templates.RootContainer.controller.NavContainer.getMetadata
|
|
@@ -118,56 +160,6 @@ sap.ui.define(
|
|
|
118
160
|
}
|
|
119
161
|
|
|
120
162
|
oNavContainer.to(this.oMessagePage.getId());
|
|
121
|
-
},
|
|
122
|
-
|
|
123
|
-
/**
|
|
124
|
-
* Trigger the navigation to the Placeholder for a specific route target.
|
|
125
|
-
*
|
|
126
|
-
* @function
|
|
127
|
-
* @name sap.fe.templates.RootContainer.controller.NavContainer.controller#displayPlaceholders
|
|
128
|
-
* @memberof sap.fe.templates.RootContainer.controller.NavContainer.controller
|
|
129
|
-
* @param {object} [oTarget] Route target for which the placeHolder must be displayed
|
|
130
|
-
* @param {object} [aTargets] Array containing routing targets for the current navigation
|
|
131
|
-
* @param {object} [oPlaceholderTarget] Object containing the view to be displayed . if empty the placeHolder view is created and stored
|
|
132
|
-
* @param {object} [oRootContainer] NavContainer or FCL
|
|
133
|
-
*
|
|
134
|
-
* @returns {boolean} `true` if the placeHolder is displayed
|
|
135
|
-
* @ui5-restricted
|
|
136
|
-
* @final
|
|
137
|
-
*/
|
|
138
|
-
displayPlaceholders: function(oTarget, aTargets, oPlaceholderTarget, oRootContainer) {
|
|
139
|
-
var bPlaceholderDisplayed = false;
|
|
140
|
-
oRootContainer.setDefaultTransitionName("placeholder");
|
|
141
|
-
var oPlaceholderMapping = this.oPlaceholder.getPlaceholderMapping();
|
|
142
|
-
|
|
143
|
-
if (oPlaceholderMapping[oTarget.name]) {
|
|
144
|
-
if (!oPlaceholderTarget.view) {
|
|
145
|
-
oPlaceholderTarget.view = this.oPlaceholder.createPlaceholderView(oTarget.name);
|
|
146
|
-
oRootContainer.addPage(oPlaceholderTarget.view);
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
var sStartupParameter;
|
|
150
|
-
var bPlaceholderScreenEnabledFirstTimeOnly;
|
|
151
|
-
if (this.oPlaceholder.isPlaceholderEnabled) {
|
|
152
|
-
if (oTarget.name === "sap.fe.templates.ListReport") {
|
|
153
|
-
sStartupParameter = this.oPlaceholder.getEnumStartingParams().FE_DATA_LOADED;
|
|
154
|
-
bPlaceholderScreenEnabledFirstTimeOnly = true;
|
|
155
|
-
} else {
|
|
156
|
-
sStartupParameter = this.oPlaceholder.getEnumStartingParams().FE_HEROES_LOADED;
|
|
157
|
-
bPlaceholderScreenEnabledFirstTimeOnly = false;
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
if (
|
|
161
|
-
(bPlaceholderScreenEnabledFirstTimeOnly && !oPlaceholderTarget.view.getController().istargetNavigated(oTarget)) ||
|
|
162
|
-
!bPlaceholderScreenEnabledFirstTimeOnly
|
|
163
|
-
) {
|
|
164
|
-
oPlaceholderTarget.view.getController().setPlaceholderOption(sStartupParameter);
|
|
165
|
-
oRootContainer.to(oPlaceholderTarget.view, "show");
|
|
166
|
-
bPlaceholderDisplayed = true;
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
return bPlaceholderDisplayed;
|
|
171
163
|
}
|
|
172
164
|
});
|
|
173
165
|
},
|