@sapui5/sap.fe.templates 1.97.0 → 1.99.1

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.
Files changed (102) hide show
  1. package/package.json +7 -5
  2. package/src/sap/fe/templates/.library +1 -1
  3. package/src/sap/fe/templates/AnalyticalListPage/Component.js +3 -2
  4. package/src/sap/fe/templates/AnalyticalListPage/chart/FEChartDelegate.js +5 -4
  5. package/src/sap/fe/templates/ListComponent.js +3 -2
  6. package/src/sap/fe/templates/ListReport/Component.js +11 -2
  7. package/src/sap/fe/templates/ListReport/ExtensionAPI.js +12 -6
  8. package/src/sap/fe/templates/ListReport/ListReport.view.xml +13 -7
  9. package/src/sap/fe/templates/ListReport/ListReportController.controller.js +193 -125
  10. package/src/sap/fe/templates/ListReport/overrides/IntentBasedNavigation.js +18 -13
  11. package/src/sap/fe/templates/ListReport/overrides/Share.js +46 -29
  12. package/src/sap/fe/templates/ListReport/overrides/ViewState.js +131 -86
  13. package/src/sap/fe/templates/ListReport/view/fragments/CollectionVisualization.fragment.xml +8 -0
  14. package/src/sap/fe/templates/ObjectPage/AnnotationHelper.js +25 -4
  15. package/src/sap/fe/templates/ObjectPage/Component.js +20 -17
  16. package/src/sap/fe/templates/ObjectPage/ExtensionAPI.js +18 -2
  17. package/src/sap/fe/templates/ObjectPage/ObjectPage.view.xml +72 -94
  18. package/src/sap/fe/templates/ObjectPage/ObjectPageController.controller.js +118 -140
  19. package/src/sap/fe/templates/ObjectPage/controls/StashableHBox.js +3 -2
  20. package/src/sap/fe/templates/ObjectPage/controls/StashableVBox.js +3 -2
  21. package/src/sap/fe/templates/ObjectPage/controls/SubSectionBlock.js +3 -2
  22. package/src/sap/fe/templates/ObjectPage/designtime/FlexBox.designtime.js +3 -2
  23. package/src/sap/fe/templates/ObjectPage/designtime/StashableHBox.designtime.js +3 -2
  24. package/src/sap/fe/templates/ObjectPage/designtime/StashableVBox.designtime.js +3 -2
  25. package/src/sap/fe/templates/ObjectPage/flexibility/StashableHBox.flexibility.js +3 -2
  26. package/src/sap/fe/templates/ObjectPage/flexibility/StashableVBox.flexibility.js +3 -2
  27. package/src/sap/fe/templates/ObjectPage/overrides/IntentBasedNavigation.js +3 -2
  28. package/src/sap/fe/templates/ObjectPage/overrides/InternalRouting.js +3 -2
  29. package/src/sap/fe/templates/ObjectPage/overrides/MessageHandler.js +3 -2
  30. package/src/sap/fe/templates/ObjectPage/overrides/Paginator.js +15 -2
  31. package/src/sap/fe/templates/ObjectPage/overrides/Share.js +50 -45
  32. package/src/sap/fe/templates/ObjectPage/overrides/ViewState.js +3 -22
  33. package/src/sap/fe/templates/ObjectPage/templating/ObjectPageTemplating.js +1 -1
  34. package/src/sap/fe/templates/ObjectPage/templating/ObjectPageTemplating.ts +2 -2
  35. package/src/sap/fe/templates/ObjectPage/view/fragments/Actions.fragment.xml +1 -1
  36. package/src/sap/fe/templates/ObjectPage/view/fragments/FooterContent.fragment.xml +5 -1
  37. package/src/sap/fe/templates/ObjectPage/view/fragments/Heading.fragment.xml +33 -0
  38. package/src/sap/fe/templates/ObjectPage/view/fragments/HeadingAvatar.fragment.xml +17 -0
  39. package/src/sap/fe/templates/ObjectPage/view/fragments/HeadingTitle.fragment.xml +18 -0
  40. package/src/sap/fe/templates/ObjectPage/view/fragments/Section.fragment.xml +24 -5
  41. package/src/sap/fe/templates/ObjectPage/view/fragments/SectionContent.fragment.xml +1 -4
  42. package/src/sap/fe/templates/ObjectPage/view/fragments/SectionContentLazyLoader.fragment.xml +181 -0
  43. package/src/sap/fe/templates/ObjectPage/view/fragments/SectionFormContent.fragment.xml +4 -3
  44. package/src/sap/fe/templates/ObjectPage/view/fragments/SectionMoreFormContent.fragment.xml +4 -3
  45. package/src/sap/fe/templates/RootContainer/controller/Fcl.controller.js +3 -2
  46. package/src/sap/fe/templates/RootContainer/controller/NavContainer.controller.js +3 -2
  47. package/src/sap/fe/templates/RootContainer/controller/RootContainerBaseController.js +136 -125
  48. package/src/sap/fe/templates/RootContainer/overrides/EditFlow.js +3 -2
  49. package/src/sap/fe/templates/TableScroller.js +3 -2
  50. package/src/sap/fe/templates/controls/Table.fragment.xml +1 -1
  51. package/src/sap/fe/templates/library.js +4 -3
  52. package/src/sap/fe/templates/messagebundle.properties +15 -8
  53. package/src/sap/fe/templates/messagebundle_ar.properties +24 -6
  54. package/src/sap/fe/templates/messagebundle_bg.properties +24 -6
  55. package/src/sap/fe/templates/messagebundle_ca.properties +24 -6
  56. package/src/sap/fe/templates/messagebundle_cs.properties +24 -6
  57. package/src/sap/fe/templates/messagebundle_cy.properties +24 -6
  58. package/src/sap/fe/templates/messagebundle_da.properties +24 -6
  59. package/src/sap/fe/templates/messagebundle_de.properties +24 -6
  60. package/src/sap/fe/templates/messagebundle_el.properties +25 -7
  61. package/src/sap/fe/templates/messagebundle_en.properties +24 -6
  62. package/src/sap/fe/templates/messagebundle_en_GB.properties +24 -6
  63. package/src/sap/fe/templates/messagebundle_en_US_sappsd.properties +25 -7
  64. package/src/sap/fe/templates/messagebundle_en_US_saprigi.properties +25 -7
  65. package/src/sap/fe/templates/messagebundle_en_US_saptrc.properties +25 -7
  66. package/src/sap/fe/templates/messagebundle_es.properties +32 -14
  67. package/src/sap/fe/templates/messagebundle_es_MX.properties +24 -6
  68. package/src/sap/fe/templates/messagebundle_et.properties +24 -6
  69. package/src/sap/fe/templates/messagebundle_fi.properties +24 -6
  70. package/src/sap/fe/templates/messagebundle_fr.properties +25 -7
  71. package/src/sap/fe/templates/messagebundle_fr_CA.properties +24 -6
  72. package/src/sap/fe/templates/messagebundle_hi.properties +24 -6
  73. package/src/sap/fe/templates/messagebundle_hr.properties +25 -7
  74. package/src/sap/fe/templates/messagebundle_hu.properties +24 -6
  75. package/src/sap/fe/templates/messagebundle_id.properties +26 -8
  76. package/src/sap/fe/templates/messagebundle_it.properties +24 -6
  77. package/src/sap/fe/templates/messagebundle_iw.properties +24 -6
  78. package/src/sap/fe/templates/messagebundle_ja.properties +25 -7
  79. package/src/sap/fe/templates/messagebundle_kk.properties +24 -6
  80. package/src/sap/fe/templates/messagebundle_ko.properties +24 -6
  81. package/src/sap/fe/templates/messagebundle_lt.properties +24 -6
  82. package/src/sap/fe/templates/messagebundle_lv.properties +24 -6
  83. package/src/sap/fe/templates/messagebundle_ms.properties +24 -6
  84. package/src/sap/fe/templates/messagebundle_nl.properties +24 -6
  85. package/src/sap/fe/templates/messagebundle_no.properties +24 -6
  86. package/src/sap/fe/templates/messagebundle_pl.properties +24 -6
  87. package/src/sap/fe/templates/messagebundle_pt.properties +27 -9
  88. package/src/sap/fe/templates/messagebundle_pt_PT.properties +25 -7
  89. package/src/sap/fe/templates/messagebundle_ro.properties +24 -6
  90. package/src/sap/fe/templates/messagebundle_ru.properties +24 -6
  91. package/src/sap/fe/templates/messagebundle_sh.properties +24 -6
  92. package/src/sap/fe/templates/messagebundle_sk.properties +24 -6
  93. package/src/sap/fe/templates/messagebundle_sl.properties +24 -6
  94. package/src/sap/fe/templates/messagebundle_sv.properties +25 -7
  95. package/src/sap/fe/templates/messagebundle_th.properties +24 -6
  96. package/src/sap/fe/templates/messagebundle_tr.properties +25 -7
  97. package/src/sap/fe/templates/messagebundle_uk.properties +25 -7
  98. package/src/sap/fe/templates/messagebundle_vi.properties +24 -6
  99. package/src/sap/fe/templates/messagebundle_zh_CN.properties +24 -6
  100. package/src/sap/fe/templates/messagebundle_zh_TW.properties +24 -6
  101. package/ui5.yaml +0 -3
  102. package/src/sap/fe/templates/ObjectPage/view/fragments/HeaderImage.fragment.xml +0 -24
@@ -0,0 +1,181 @@
1
+ <core:FragmentDefinition
2
+ xmlns:uxap="sap.uxap"
3
+ xmlns:core="sap.ui.core"
4
+ xmlns:template="http://schemas.sap.com/sapui5/extension/sap.ui.core.template/1"
5
+ xmlns:fpm="sap.fe.macros.fpm"
6
+ xmlns:macro="sap.fe.macros"
7
+ xmlns:layout="sap.ui.layout"
8
+ xmlns:dt="sap.ui.dt"
9
+ xmlns="sap.m"
10
+ xmlns:opcontrol="sap.fe.templates.ObjectPage.controls"
11
+ template:require="{
12
+ fpm: 'sap/fe/macros/fpm/fpm',
13
+ MODEL: 'sap/ui/model/odata/v4/AnnotationHelper',
14
+ OP: 'sap/fe/templates/ObjectPage/AnnotationHelper',
15
+ COMMON: 'sap/fe/macros/CommonHelper',
16
+ ID: 'sap/fe/core/helpers/StableIdHelper'
17
+ }"
18
+ >
19
+ <!-- We want to ensure that statically non visible sections are non visible-->
20
+ <template:if test="{subSection>visible}">
21
+ <template:if test="{= ${subSection>type} === 'XMLFragment'}">
22
+ <template:then>
23
+ <core:Fragment fragmentName="sap.fe.templates.ObjectPage.view.fragments.FormActions" type="XML" />
24
+ <uxap:blocks>
25
+ <uxap:ObjectPageLazyLoader stashed="true" id="{= ID.generate(['fe', ${subSection>key}])}">
26
+ <opcontrol:SubSectionBlock>
27
+ <opcontrol:content>
28
+ <template:if test="{= ${subSection>sideContent} !== undefined}">
29
+ <template:then>
30
+ <layout:DynamicSideContent
31
+ id="{= ID.generate(['fe', ${subSection>key}, 'SideContentLayout'])}"
32
+ showMainContent="true"
33
+ showSideContent="{subSection>sideContent/visible}"
34
+ sideContentFallDown="BelowM"
35
+ containerQuery="true"
36
+ equalSplit="{subSection>sideContent/equalSplit}"
37
+ >
38
+ <layout:mainContent>
39
+ <core:Fragment
40
+ fragmentName="sap.fe.templates.ObjectPage.view.fragments.SectionCustomSection"
41
+ type="XML"
42
+ />
43
+ </layout:mainContent>
44
+ <layout:sideContent>
45
+ <core:Fragment
46
+ fragmentName="sap.fe.templates.ObjectPage.view.fragments.SideContentCustomContainer"
47
+ type="XML"
48
+ />
49
+ </layout:sideContent>
50
+ </layout:DynamicSideContent>
51
+ </template:then>
52
+ <template:else>
53
+ <core:Fragment
54
+ fragmentName="sap.fe.templates.ObjectPage.view.fragments.SectionCustomSection"
55
+ type="XML"
56
+ />
57
+ </template:else>
58
+ </template:if>
59
+ </opcontrol:content>
60
+ </opcontrol:SubSectionBlock>
61
+ </uxap:ObjectPageLazyLoader>
62
+ </uxap:blocks>
63
+
64
+ </template:then>
65
+ <template:elseif test="{= ${subSection>type} === 'Form'}">
66
+ <core:Fragment fragmentName="sap.fe.templates.ObjectPage.view.fragments.FormActions" type="XML" />
67
+ <uxap:blocks>
68
+ <uxap:ObjectPageLazyLoader stashed="true" id="{= ID.generate(['fe', ${subSection>key}])}">
69
+ <opcontrol:SubSectionBlock>
70
+ <opcontrol:content>
71
+ <template:if test="{= ${subSection>sideContent} !== undefined}">
72
+ <template:then>
73
+ <layout:DynamicSideContent
74
+ id="{= ID.generate(['fe', ${subSection>key}, 'SideContentLayout'])}"
75
+ showMainContent="true"
76
+ showSideContent="{subSection>sideContent/visible}"
77
+ sideContentFallDown="BelowM"
78
+ containerQuery="true"
79
+ equalSplit="{subSection>sideContent/equalSplit}"
80
+ >
81
+ <layout:mainContent>
82
+ <core:Fragment fragmentName="sap.fe.templates.ObjectPage.view.fragments.SectionFormContent" type="XML" />
83
+ </layout:mainContent>
84
+ <layout:sideContent>
85
+ <core:Fragment fragmentName="sap.fe.templates.ObjectPage.view.fragments.SideContentCustomContainer" type="XML" />
86
+ </layout:sideContent>
87
+ </layout:DynamicSideContent>
88
+
89
+ </template:then>
90
+ <template:else>
91
+ <core:Fragment fragmentName="sap.fe.templates.ObjectPage.view.fragments.SectionFormContent" type="XML" />
92
+ </template:else>
93
+ </template:if>
94
+ </opcontrol:content>
95
+ </opcontrol:SubSectionBlock>
96
+ </uxap:ObjectPageLazyLoader>
97
+ </uxap:blocks>
98
+ <template:if test="{subSection>formDefinition/hasFacetsNotPartOfPreview}">
99
+ <template:then>
100
+ <!-- Button "Show More / Less" is displayed for a collection facets that contains at least one reference facets with annotation "PartOfPreview === TRUE" -->
101
+ <uxap:moreBlocks>
102
+ <template:if test="{= ${subSection>level} === 2}">
103
+ <Title text="{subSection>title}" />
104
+ </template:if>
105
+ <opcontrol:SubSectionBlock>
106
+ <opcontrol:content>
107
+ <template:if test="{= ${subSection>sideContent} !== undefined}">
108
+ <template:then>
109
+ <layout:DynamicSideContent
110
+ id="{= ID.generate(['fe', ${subSection>key}, 'MoreSideContentLayout'])}"
111
+ showMainContent="true"
112
+ showSideContent="{subSection>sideContent/visible}"
113
+ sideContentFallDown="BelowM"
114
+ containerQuery="true"
115
+ equalSplit="{subSection>sideContent/equalSplit}"
116
+ >
117
+ <layout:mainContent>
118
+ <core:Fragment fragmentName="sap.fe.templates.ObjectPage.view.fragments.SectionMoreFormContent" type="XML" />
119
+ </layout:mainContent>
120
+ <layout:sideContent>
121
+ <!--No Side Content for MoreBlocks so far-->
122
+ </layout:sideContent>
123
+ </layout:DynamicSideContent>
124
+ </template:then>
125
+ <template:else>
126
+ <core:Fragment fragmentName="sap.fe.templates.ObjectPage.view.fragments.SectionMoreFormContent" type="XML" />
127
+ </template:else>
128
+ </template:if>
129
+ </opcontrol:content>
130
+ </opcontrol:SubSectionBlock>
131
+ </uxap:moreBlocks>
132
+ </template:then>
133
+ </template:if>
134
+ </template:elseif>
135
+ <template:elseif test="{= ${subSection>type} === 'DataVisualization'}">
136
+ <uxap:blocks>
137
+ <uxap:ObjectPageLazyLoader stashed="true" id="{= ID.generate(['fe', ${subSection>key}])}">
138
+ <template:if test="{= ${subSection>level} === 2}">
139
+ <Title
140
+ text="{subSection>title}"
141
+ visible="{= ${subSection>visible} &amp;&amp; ${subSection>title} !=='undefined' &amp;&amp; ${subSection>showTitle} ? true : false}"
142
+ />
143
+ </template:if>
144
+ <opcontrol:SubSectionBlock visible="{subSection>visible}">
145
+ <opcontrol:content>
146
+ <template:if test="{= ${subSection>sideContent} !== undefined}">
147
+ <template:then>
148
+ <layout:DynamicSideContent
149
+ id="{= ID.generate(['fe', ${subSection>key}, 'SideContentLayout'])}"
150
+ showMainContent="true"
151
+ showSideContent="{subSection>sideContent/visible}"
152
+ sideContentFallDown="BelowM"
153
+ containerQuery="true"
154
+ equalSplit="{subSection>sideContent/equalSplit}"
155
+ >
156
+ <layout:mainContent>
157
+ <core:Fragment fragmentName="sap.fe.templates.ObjectPage.view.fragments.SectionPresentationVisualization" type="XML" />
158
+ </layout:mainContent>
159
+ <layout:sideContent>
160
+ <core:Fragment fragmentName="sap.fe.templates.ObjectPage.view.fragments.SideContentCustomContainer" type="XML" />
161
+ </layout:sideContent>
162
+ </layout:DynamicSideContent>
163
+ </template:then>
164
+ <template:else>
165
+ <core:Fragment fragmentName="sap.fe.templates.ObjectPage.view.fragments.SectionPresentationVisualization" type="XML" />
166
+ </template:else>
167
+ </template:if>
168
+ </opcontrol:content>
169
+ </opcontrol:SubSectionBlock>
170
+ </uxap:ObjectPageLazyLoader>
171
+ </uxap:blocks>
172
+ </template:elseif>
173
+ <template:elseif test="{= ${subSection>type} === 'Unknown'}">
174
+ <Text text="{subSection>text}" />
175
+ </template:elseif>
176
+ <template:else>
177
+
178
+ </template:else>
179
+ </template:if>
180
+ </template:if>
181
+ </core:FragmentDefinition>
@@ -1,6 +1,6 @@
1
1
  <core:FragmentDefinition
2
2
  xmlns:core="sap.ui.core"
3
- xmlns:macro="sap.fe.macros"
3
+ xmlns:macro="sap.fe.macros.internal"
4
4
  xmlns="sap.m"
5
5
  xmlns:template="http://schemas.sap.com/sapui5/extension/sap.ui.core.template/1"
6
6
  template:require="{
@@ -9,10 +9,11 @@
9
9
  >
10
10
  <macro:Form
11
11
  id="{= ID.generate([${subSection>formDefinition/id}, 'Content']) }"
12
- facet="{subSection>annotationPath}"
13
- entitySet="{entitySet>}"
12
+ metaPath="{subSection>annotationPath}"
13
+ contextPath="{entitySet>}"
14
14
  useFormContainerLabels="{= ${subSection>formDefinition/useFormContainerLabels}}"
15
15
  partOfPreview="true"
16
16
  formContainers="{subSection>formDefinition/formContainers}"
17
+ isVisible="{subSection>formDefinition/isVisible}"
17
18
  />
18
19
  </core:FragmentDefinition>
@@ -1,7 +1,7 @@
1
1
  <core:FragmentDefinition
2
2
  xmlns:core="sap.ui.core"
3
3
  xmlns="sap.m"
4
- xmlns:macro="sap.fe.macros"
4
+ xmlns:macro="sap.fe.macros.internal"
5
5
  xmlns:template="http://schemas.sap.com/sapui5/extension/sap.ui.core.template/1"
6
6
  template:require="{
7
7
  ID: 'sap/fe/core/helpers/StableIdHelper'
@@ -9,10 +9,11 @@
9
9
  >
10
10
  <macro:Form
11
11
  id="{= ID.generate([${subSection>formDefinition/id}, 'MoreContent']) }"
12
- facet="{subSection>annotationPath}"
13
- entitySet="{entitySet>}"
12
+ metaPath="{subSection>annotationPath}"
13
+ contextPath="{entitySet>}"
14
14
  useFormContainerLabels="{= ${subSection>formDefinition/useFormContainerLabels}}"
15
15
  partOfPreview="false"
16
16
  formContainers="{subSection>formDefinition/formContainers}"
17
+ isVisible="{subSection>formDefinition/isVisible}"
17
18
  />
18
19
  </core:FragmentDefinition>
@@ -1,6 +1,7 @@
1
1
  /*!
2
- * SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
2
+ * SAP UI development toolkit for HTML5 (SAPUI5)
3
+ (c) Copyright 2009-2021 SAP SE. All rights reserved
4
+
4
5
  */
5
6
  sap.ui.define(
6
7
  [
@@ -1,6 +1,7 @@
1
1
  /*!
2
- * SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
2
+ * SAP UI development toolkit for HTML5 (SAPUI5)
3
+ (c) Copyright 2009-2021 SAP SE. All rights reserved
4
+
4
5
  */
5
6
  sap.ui.define(
6
7
  [
@@ -1,6 +1,7 @@
1
1
  /*!
2
- * SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
2
+ * SAP UI development toolkit for HTML5 (SAPUI5)
3
+ (c) Copyright 2009-2021 SAP SE. All rights reserved
4
+
4
5
  */
5
6
  sap.ui.define(
6
7
  [
@@ -156,14 +157,13 @@ sap.ui.define(
156
157
  }
157
158
 
158
159
  var oAppComponent = that.getAppComponent();
159
- var oData = { oView: oView, oAppComponent: oAppComponent };
160
160
  that._scrollTablesToLastNavigatedItems();
161
161
  if (oAppComponent.getEnvironmentCapabilities().getCapabilities().UShell) {
162
- that.computeTitleHierarchy(oData);
162
+ that._computeTitleHierarchy(oView);
163
163
  }
164
164
  var bForceFocus = oAppComponent.getRouterProxy().isFocusForced();
165
165
  oAppComponent.getRouterProxy().setFocusForced(false); // reset
166
- if (oView.getController() && oView.getController().onPageReady) {
166
+ if (oView.getController() && oView.getController().onPageReady && oView.getParent().onPageReady) {
167
167
  oView.getParent().onPageReady({ forceFocus: bForceFocus });
168
168
  }
169
169
  if (that.onContainerReady) {
@@ -182,12 +182,12 @@ sap.ui.define(
182
182
  /**
183
183
  * This function returns the TitleHierarchy cache ( or initializes it if undefined).
184
184
  *
185
- * @name sap.fe.templates.RootContainer.controller.BaseController#getTitleHierarchyCache
185
+ * @name sap.fe.templates.RootContainer.controller.BaseController#_getTitleHierarchyCache
186
186
  * @memberof sap.fe.templates.RootContainer.controller.BaseController
187
187
  *
188
188
  * @returns {object} The TitleHierarchy cache
189
189
  */
190
- getTitleHierarchyCache: function() {
190
+ _getTitleHierarchyCache: function() {
191
191
  if (!this.oTitleHierarchyCache) {
192
192
  this.oTitleHierarchyCache = {};
193
193
  }
@@ -219,53 +219,86 @@ sap.ui.define(
219
219
  },
220
220
 
221
221
  /**
222
- * This function is updating the cache to store Title Information
222
+ * Fetches the value of the HeaderInfo title for a given path.
223
223
  *
224
- * @name sap.fe.templates.RootContainer.controller.BaseController#addNewEntryINCacheTitle
225
- * @memberof sap.fe.templates.RootContainer.controller.BaseController
226
- * @param {*} sPath path of the context to retrieve title information from MetaModel
227
- * @param {*} oAppComponent reference to the oAppComponent
228
- *
229
- * @returns {promise} oTitleinformation returned as promise
224
+ * @param {string} sPath The path to the entity
225
+ * @returns {Promise} A promise containing the value of the title, or an empty string if no HeaderInfo title annotation is available
230
226
  */
227
+ _fetchTitleValue: function(sPath) {
228
+ var oAppComponent = this.getAppComponent(),
229
+ oModel = this.getView().getModel(),
230
+ oMetaModel = oAppComponent.getMetaModel(),
231
+ sMetaPath = oMetaModel.getMetaPath(sPath);
231
232
 
232
- addNewEntryInCacheTitle: function(sPath, oAppComponent) {
233
- var oTitleModel = this.getView().getModel();
234
- var that = this;
235
- var sEntityPath = sPath.replace(/ *\([^)]*\) */g, "");
236
233
  var sTitleExpression = AnnotationHelper.format(
237
- oAppComponent.getMetaModel().getProperty(sEntityPath + "/@com.sap.vocabularies.UI.v1.HeaderInfo/Title/Value"),
238
- { context: oAppComponent.getMetaModel().createBindingContext("/") }
234
+ oMetaModel.getProperty(sMetaPath + "/@com.sap.vocabularies.UI.v1.HeaderInfo/Title/Value"),
235
+ { context: oMetaModel.createBindingContext("/") }
239
236
  );
240
237
  var oTitleExpression = BindingParser.complexParser(sTitleExpression);
241
- var sTypeName = oAppComponent.getMetaModel().getProperty(sEntityPath + "/@com.sap.vocabularies.UI.v1.HeaderInfo/TypeName");
242
- var oBindingViewContext = oTitleModel.createBindingContext(sPath);
238
+
243
239
  if (oTitleExpression) {
244
240
  var sTitlePath = oTitleExpression.parts ? oTitleExpression.parts[0].path : oTitleExpression.path;
245
241
  var fnTitleFormatter = oTitleExpression.formatter;
246
- var oPropertyBinding = oTitleModel.bindProperty(sTitlePath, oBindingViewContext);
242
+ var oBindingViewContext = oModel.createBindingContext(sPath);
243
+ var oPropertyBinding = oModel.bindProperty(sTitlePath, oBindingViewContext);
244
+
247
245
  oPropertyBinding.initialize();
248
- }
249
- return new Promise(function(resolve, reject) {
250
- var sAppSpecificHash = HashChanger.getInstance().hrefForAppSpecificHash
251
- ? HashChanger.getInstance().hrefForAppSpecificHash("")
252
- : "";
253
- var sIntent = sAppSpecificHash + sPath.slice(1);
254
- var oTitleHierarchyCache = that.getTitleHierarchyCache();
255
- var fnChange = function(oEvent) {
256
- var sTargetValue = fnTitleFormatter
257
- ? fnTitleFormatter(oEvent.getSource().getValue())
258
- : oEvent.getSource().getValue();
259
- oTitleHierarchyCache[sPath] = that._computeTitleInfo(sTypeName, sTargetValue, sIntent);
260
- resolve(oTitleHierarchyCache[sPath]);
261
- oPropertyBinding.detachChange(fnChange);
262
- };
263
- if (oPropertyBinding) {
246
+
247
+ return new Promise(function(resolve) {
248
+ var fnChange = function(oEvent) {
249
+ var sTargetValue = fnTitleFormatter
250
+ ? fnTitleFormatter(oEvent.getSource().getValue())
251
+ : oEvent.getSource().getValue();
252
+
253
+ oPropertyBinding.detachChange(fnChange);
254
+ resolve(sTargetValue);
255
+ };
256
+
264
257
  oPropertyBinding.attachChange(fnChange);
265
- } else {
266
- oTitleHierarchyCache[sPath] = that._computeTitleInfo(sTypeName, "", sIntent);
267
- resolve(oTitleHierarchyCache[sPath]);
268
- }
258
+ });
259
+ } else {
260
+ return Promise.resolve("");
261
+ }
262
+ },
263
+
264
+ _getAppSpecificHash: function() {
265
+ return HashChanger.getInstance().hrefForAppSpecificHash ? HashChanger.getInstance().hrefForAppSpecificHash("") : "";
266
+ },
267
+
268
+ _getHash: function() {
269
+ return HashChanger.getInstance().getHash();
270
+ },
271
+
272
+ /**
273
+ * This function returns titleInformation from a path.
274
+ * It updates the cache to store Title Information if necessary
275
+ *
276
+ * @name sap.fe.templates.RootContainer.controller.BaseController#getTitleInfoFromPath
277
+ * @memberof sap.fe.templates.RootContainer.controller.BaseController
278
+ * @param {*} sPath path of the context to retrieve title information from MetaModel
279
+ *
280
+ * @returns {promise} oTitleinformation returned as promise
281
+ */
282
+
283
+ getTitleInfoFromPath: function(sPath) {
284
+ var oTitleHierarchyCache = this._getTitleHierarchyCache();
285
+
286
+ if (oTitleHierarchyCache[sPath]) {
287
+ // The title info is already stored in the cache
288
+ return Promise.resolve(oTitleHierarchyCache[sPath]);
289
+ }
290
+
291
+ var oMetaModel = this.getAppComponent().getMetaModel();
292
+ var that = this;
293
+ var sEntityPath = oMetaModel.getMetaPath(sPath);
294
+ var sTypeName = oMetaModel.getProperty(sEntityPath + "/@com.sap.vocabularies.UI.v1.HeaderInfo/TypeName");
295
+ var sAppSpecificHash = this._getAppSpecificHash();
296
+ var sIntent = sAppSpecificHash + sPath.slice(1);
297
+
298
+ return this._fetchTitleValue(sPath).then(function(sTitle) {
299
+ var oTitleInfo = that._computeTitleInfo(sTypeName, sTitle, sIntent);
300
+ oTitleHierarchyCache[sPath] = oTitleInfo;
301
+ return oTitleInfo;
269
302
  });
270
303
  },
271
304
  /**
@@ -281,7 +314,7 @@ sap.ui.define(
281
314
  * @param {*} aHierarchy Shell title hierarchy
282
315
  * @returns {*} Copy of shell title hierarchy containing all elements as strings
283
316
  */
284
- ensureHierarchyElementsAreStrings: function(aHierarchy) {
317
+ _ensureHierarchyElementsAreStrings: function(aHierarchy) {
285
318
  var aHierarchyShell = [];
286
319
  for (var level in aHierarchy) {
287
320
  var oHierarchy = aHierarchy[level];
@@ -294,113 +327,91 @@ sap.ui.define(
294
327
  return aHierarchyShell;
295
328
  },
296
329
 
330
+ _getTargetTypeFromHash: function(sHash) {
331
+ var oAppComponent = this.getAppComponent();
332
+ var sTargetType = "";
333
+
334
+ var aRoutes = oAppComponent.getManifestEntry("/sap.ui5/routing/routes");
335
+ for (var j = 0; j < aRoutes.length; j++) {
336
+ var oRoute = oAppComponent.getRouter().getRoute(aRoutes[j].name);
337
+ if (oRoute.match(sHash)) {
338
+ var sTarget = Array.isArray(aRoutes[j].target) ? aRoutes[j].target[0] : aRoutes[j].target;
339
+ sTargetType = oAppComponent.getRouter().getTarget(sTarget)._oOptions.name;
340
+ break;
341
+ }
342
+ }
343
+
344
+ return sTargetType;
345
+ },
346
+
297
347
  /**
298
348
  * This function is updating the shell title after each navigation.
299
349
  *
300
350
  * @memberof sap.fe.templates.RootContainer.controller.BaseController
301
- * @param {*} oData Object containing reference to view and to oAppComponent
351
+ * @param {*} oView The current view
352
+ * @returns {*} A Promise that is resolved when the menu is filled properly
302
353
  */
303
- computeTitleHierarchy: function(oData) {
354
+ _computeTitleHierarchy: function(oView) {
304
355
  var that = this,
305
- oView = oData.oView,
306
- oAppComponent = oData.oAppComponent,
356
+ oAppComponent = this.getAppComponent(),
307
357
  oContext = oView.getBindingContext(),
308
358
  oCurrentPage = oView.getParent(),
309
359
  aTitleInformationPromises = [],
310
- sAppSpecificHash = HashChanger.getInstance().hrefForAppSpecificHash
311
- ? HashChanger.getInstance().hrefForAppSpecificHash("")
312
- : "",
360
+ sAppSpecificHash = this._getAppSpecificHash(),
313
361
  sAppTitle = oAppComponent.getMetadata().getManifestEntry("sap.app").title || "",
314
362
  sAppSubTitle = oAppComponent.getMetadata().getManifestEntry("sap.app").appSubTitle || "",
315
- sAppRootPath = sAppSpecificHash,
316
- oPageTitleInformationPromise,
363
+ oPageTitleInformation,
317
364
  sNewPath;
318
365
 
319
- if (this.bIsComputingTitleHierachy === true) {
320
- Log.warning("computeTitleHierarchy already running ... this call is canceled");
321
- return;
322
- }
323
- this.bIsComputingTitleHierachy = true;
324
-
325
366
  if (oCurrentPage && oCurrentPage._getPageTitleInformation) {
326
367
  if (oContext) {
368
+ // If the first page of the application is a LR, use the title and subtitle from the manifest
369
+ if (this._getTargetTypeFromHash("") === "sap.fe.templates.ListReport") {
370
+ aTitleInformationPromises.push(
371
+ Promise.resolve(that._computeTitleInfo(sAppTitle, sAppSubTitle, sAppSpecificHash))
372
+ );
373
+ }
374
+
375
+ // Then manage other pages
327
376
  sNewPath = oContext.getPath();
328
377
  var aPathParts = sNewPath.split("/"),
329
- sTargetType,
330
- sPath = "",
331
- iNbPathParts = aPathParts.length;
332
- aPathParts.splice(-1, 1);
333
-
334
- aPathParts.forEach(function(sPathPart, i) {
335
- if (i === 0) {
336
- var aRoutes = oAppComponent.getManifestEntry("/sap.ui5/routing/routes"),
337
- aTargets = oAppComponent.getManifestEntry("/sap.ui5/routing/targets");
338
- var fnTargetTypeEval = function(sTarget) {
339
- if (typeof aRoutes[this.index].target === "string") {
340
- return sTarget === aRoutes[this.index].target;
341
- } else if (typeof aRoutes[this.index].target === "object") {
342
- for (var k = 0; k < aRoutes[this.index].target.length; k++) {
343
- return sTarget === aRoutes[this.index].target[k];
344
- }
345
- }
346
- };
347
- for (var j = 0; j < aRoutes.length; j++) {
348
- var oRoute = oAppComponent.getRouter().getRoute(aRoutes[j].name);
349
- if (oRoute.match(aPathParts[i])) {
350
- var sTarget = Object.keys(aTargets).find(fnTargetTypeEval, { index: j });
351
- sTargetType = oAppComponent.getRouter().getTarget(sTarget)._oOptions.name;
352
- break;
353
- }
354
- }
355
- if (sTargetType === "sap.fe.templates.ListReport") {
356
- aTitleInformationPromises.push(
357
- Promise.resolve(that._computeTitleInfo(sAppTitle, sAppSubTitle, sAppRootPath))
358
- );
359
- }
360
- } else if (i < iNbPathParts) {
361
- sPath += "/" + sPathPart;
362
- var oMetaModel = oAppComponent.getMetaModel(),
363
- sParameterPath = oMetaModel.getMetaPath(sPath),
364
- bIsParameterized = oMetaModel.getObject(
365
- sParameterPath + "/@com.sap.vocabularies.Common.v1.ResultContext"
366
- );
367
- if (bIsParameterized) {
368
- return;
369
- }
370
- if (!that.getTitleHierarchyCache()[sPath]) {
371
- aTitleInformationPromises.push(that.addNewEntryInCacheTitle(sPath, oAppComponent));
372
- } else {
373
- aTitleInformationPromises.push(Promise.resolve(that.getTitleHierarchyCache()[sPath]));
374
- }
378
+ sPath = "";
379
+
380
+ aPathParts.shift(); // Remove the first segment (empty string) as it has been managed above
381
+ aPathParts.pop(); // Remove the last segment as it corresponds to the current page and shouldn't appear in the menu
382
+
383
+ aPathParts.forEach(function(sPathPart) {
384
+ sPath += "/" + sPathPart;
385
+ var oMetaModel = oAppComponent.getMetaModel(),
386
+ sParameterPath = oMetaModel.getMetaPath(sPath),
387
+ bIsParameterized = oMetaModel.getObject(sParameterPath + "/@com.sap.vocabularies.Common.v1.ResultContext");
388
+ if (!bIsParameterized) {
389
+ aTitleInformationPromises.push(that.getTitleInfoFromPath(sPath));
375
390
  }
376
391
  });
377
392
  }
378
- oPageTitleInformationPromise = oCurrentPage._getPageTitleInformation().then(function(oPageTitleInformation) {
379
- var sPageHash = HashChanger.getInstance().getHash();
380
- var aParts = sPageHash.split("/");
381
- if (aParts[aParts.length - 1].indexOf("?") === -1) {
382
- sPageHash += "?restoreHistory=true";
383
- } else {
384
- sPageHash += "&restoreHistory=true";
385
- }
386
393
 
387
- oPageTitleInformation.intent = sAppSpecificHash + sPageHash;
388
- if (oContext) {
389
- that.getTitleHierarchyCache()[sNewPath] = oPageTitleInformation;
390
- } else {
391
- that.getTitleHierarchyCache()[sAppRootPath] = oPageTitleInformation;
392
- }
393
- return oPageTitleInformation;
394
- });
395
- aTitleInformationPromises.push(oPageTitleInformationPromise);
394
+ // Current page
395
+ oPageTitleInformation = oCurrentPage._getPageTitleInformation();
396
+ oPageTitleInformation = that._computeTitleInfo(
397
+ oPageTitleInformation.title,
398
+ oPageTitleInformation.subtitle,
399
+ sAppSpecificHash + this._getHash()
400
+ );
401
+
402
+ if (oContext) {
403
+ that._getTitleHierarchyCache()[sNewPath] = oPageTitleInformation;
404
+ } else {
405
+ that._getTitleHierarchyCache()[sAppSpecificHash] = oPageTitleInformation;
406
+ }
396
407
  } else {
397
408
  aTitleInformationPromises.push(Promise.reject("Title information missing in HeaderInfo"));
398
409
  }
399
- Promise.all(aTitleInformationPromises)
410
+ return Promise.all(aTitleInformationPromises)
400
411
  .then(function(aTitleInfoHierarchy) {
401
412
  // workaround for shell which is expecting all elements being of type string
402
- var aTitleInfoHierarchyShell = that.ensureHierarchyElementsAreStrings(aTitleInfoHierarchy),
403
- sTitle = aTitleInfoHierarchyShell.pop().title;
413
+ var aTitleInfoHierarchyShell = that._ensureHierarchyElementsAreStrings(aTitleInfoHierarchy),
414
+ sTitle = oPageTitleInformation.title;
404
415
  oAppComponent.getShellServices().setHierarchy(aTitleInfoHierarchyShell.reverse());
405
416
  oAppComponent.getShellServices().setTitle(sTitle);
406
417
  })
@@ -1,6 +1,7 @@
1
1
  /*!
2
- * SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
2
+ * SAP UI development toolkit for HTML5 (SAPUI5)
3
+ (c) Copyright 2009-2021 SAP SE. All rights reserved
4
+
4
5
  */
5
6
  sap.ui.define([], function() {
6
7
  "use strict";
@@ -1,6 +1,7 @@
1
1
  /*!
2
- * SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
2
+ * SAP UI development toolkit for HTML5 (SAPUI5)
3
+ (c) Copyright 2009-2021 SAP SE. All rights reserved
4
+
4
5
  */
5
6
  sap.ui.define(
6
7
  [],
@@ -20,7 +20,7 @@
20
20
  visible="{= ${converterContext>hasMultiVisualizations} ? '{= ${pageInternal>alpContentView} !== \'Chart\'}' : 'true' }"
21
21
  tabTitle="{view>title}"
22
22
  fieldMode='{= ${converterContext>templateType} === "ListReport" ? "nowrapper" : ""}'
23
- stateChanged='{= ${converterContext>template} !== "ObjectPage" ? ".handlers.onTableStateChanged" : undefined}'
23
+ stateChanged='{= ${converterContext>template} !== "ObjectPage" ? ".handlers.onStateChanged" : undefined}'
24
24
  >
25
25
  </macro:Table>
26
26
  </core:FragmentDefinition>
@@ -1,6 +1,7 @@
1
1
  /*!
2
- * SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
2
+ * SAP UI development toolkit for HTML5 (SAPUI5)
3
+ (c) Copyright 2009-2021 SAP SE. All rights reserved
4
+
4
5
  */
5
6
  /**
6
7
  * Initialization Code and shared classes of library sap.fe.templates
@@ -46,7 +47,7 @@ sap.ui.define(
46
47
  interfaces: [],
47
48
  controls: [],
48
49
  elements: [],
49
- version: "1.97.0",
50
+ version: "1.99.1",
50
51
  noLibraryCSS: true
51
52
  });
52
53
  if (!sap.fe.templates.ObjectPage) {