@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.
Files changed (109) hide show
  1. package/package.json +1 -1
  2. package/src/sap/fe/templates/.library +1 -1
  3. package/src/sap/fe/templates/AnalyticalListPage/Component.js +1 -1
  4. package/src/sap/fe/templates/AnalyticalListPage/chart/FEChartDelegate.js +1 -1
  5. package/src/sap/fe/templates/AnalyticalListPage/manifest.json +6 -0
  6. package/src/sap/fe/templates/ListComponent.js +1 -1
  7. package/src/sap/fe/templates/ListReport/Component.js +1 -1
  8. package/src/sap/fe/templates/ListReport/ExtensionAPI.js +20 -5
  9. package/src/sap/fe/templates/ListReport/ListReport.view.xml +3 -2
  10. package/src/sap/fe/templates/ListReport/ListReportController.controller.js +183 -170
  11. package/src/sap/fe/templates/ListReport/manifest.json +11 -1
  12. package/src/sap/fe/templates/ListReport/overrides/IntentBasedNavigation.js +7 -3
  13. package/src/sap/fe/templates/ListReport/overrides/Share.js +37 -22
  14. package/src/sap/fe/templates/ListReport/overrides/ViewState.js +124 -27
  15. package/src/sap/fe/templates/ListReport/view/fragments/MultipleMode.fragment.xml +3 -3
  16. package/src/sap/fe/templates/ObjectPage/AnnotationHelper.js +25 -5
  17. package/src/sap/fe/templates/ObjectPage/Component.js +1 -7
  18. package/src/sap/fe/templates/ObjectPage/ExtensionAPI.js +1 -1
  19. package/src/sap/fe/templates/ObjectPage/ObjectPage.view.xml +69 -60
  20. package/src/sap/fe/templates/ObjectPage/ObjectPageController.controller.js +154 -231
  21. package/src/sap/fe/templates/ObjectPage/controls/StashableHBox.js +1 -1
  22. package/src/sap/fe/templates/ObjectPage/controls/StashableVBox.js +1 -1
  23. package/src/sap/fe/templates/ObjectPage/controls/SubSectionBlock.js +2 -2
  24. package/src/sap/fe/templates/ObjectPage/designtime/FlexBox.designtime.js +1 -1
  25. package/src/sap/fe/templates/ObjectPage/designtime/StashableHBox.designtime.js +1 -1
  26. package/src/sap/fe/templates/ObjectPage/designtime/StashableVBox.designtime.js +1 -1
  27. package/src/sap/fe/templates/ObjectPage/flexibility/StashableHBox.flexibility.js +1 -1
  28. package/src/sap/fe/templates/ObjectPage/flexibility/StashableVBox.flexibility.js +1 -1
  29. package/src/sap/fe/templates/ObjectPage/overrides/IntentBasedNavigation.js +1 -1
  30. package/src/sap/fe/templates/ObjectPage/overrides/InternalRouting.js +1 -1
  31. package/src/sap/fe/templates/ObjectPage/overrides/MessageHandler.js +1 -1
  32. package/src/sap/fe/templates/ObjectPage/overrides/Paginator.js +13 -0
  33. package/src/sap/fe/templates/ObjectPage/overrides/Share.js +87 -63
  34. package/src/sap/fe/templates/ObjectPage/overrides/ViewState.js +23 -2
  35. package/src/sap/fe/templates/ObjectPage/templating/ObjectPageTemplating.js +14 -11
  36. package/src/sap/fe/templates/ObjectPage/templating/ObjectPageTemplating.ts +26 -12
  37. package/src/sap/fe/templates/ObjectPage/view/fragments/Actions.fragment.xml +3 -3
  38. package/src/sap/fe/templates/ObjectPage/view/fragments/EditableHeaderFacet.fragment.xml +3 -3
  39. package/src/sap/fe/templates/ObjectPage/view/fragments/HeaderContent.fragment.xml +34 -38
  40. package/src/sap/fe/templates/ObjectPage/view/fragments/Section.fragment.xml +9 -2
  41. package/src/sap/fe/templates/ObjectPage/view/fragments/SectionContent.fragment.xml +1 -4
  42. package/src/sap/fe/templates/ObjectPage/view/fragments/SectionFormContent.fragment.xml +1 -0
  43. package/src/sap/fe/templates/ObjectPage/view/fragments/SectionMoreFormContent.fragment.xml +1 -0
  44. package/src/sap/fe/templates/RootContainer/controller/Fcl.controller.js +117 -116
  45. package/src/sap/fe/templates/RootContainer/controller/NavContainer.controller.js +63 -71
  46. package/src/sap/fe/templates/RootContainer/controller/RootContainerBaseController.js +33 -22
  47. package/src/sap/fe/templates/RootContainer/overrides/EditFlow.js +1 -1
  48. package/src/sap/fe/templates/RootContainer/view/Fcl.view.xml +2 -1
  49. package/src/sap/fe/templates/RootContainer/view/NavContainer.view.xml +1 -1
  50. package/src/sap/fe/templates/TableScroller.js +61 -0
  51. package/src/sap/fe/templates/controls/Chart.fragment.xml +6 -2
  52. package/src/sap/fe/templates/controls/Table.fragment.xml +1 -0
  53. package/src/sap/fe/templates/library.js +2 -2
  54. package/src/sap/fe/templates/messagebundle.properties +1 -1
  55. package/src/sap/fe/templates/messagebundle_ar.properties +2 -2
  56. package/src/sap/fe/templates/messagebundle_bg.properties +1 -1
  57. package/src/sap/fe/templates/messagebundle_ca.properties +1 -1
  58. package/src/sap/fe/templates/messagebundle_cs.properties +1 -1
  59. package/src/sap/fe/templates/messagebundle_cy.properties +1 -1
  60. package/src/sap/fe/templates/messagebundle_da.properties +2 -2
  61. package/src/sap/fe/templates/messagebundle_de.properties +1 -1
  62. package/src/sap/fe/templates/messagebundle_el.properties +1 -1
  63. package/src/sap/fe/templates/messagebundle_en.properties +1 -1
  64. package/src/sap/fe/templates/messagebundle_en_GB.properties +1 -1
  65. package/src/sap/fe/templates/messagebundle_en_US_sappsd.properties +1 -1
  66. package/src/sap/fe/templates/messagebundle_en_US_saprigi.properties +1 -1
  67. package/src/sap/fe/templates/messagebundle_en_US_saptrc.properties +1 -1
  68. package/src/sap/fe/templates/messagebundle_es.properties +1 -1
  69. package/src/sap/fe/templates/messagebundle_es_MX.properties +1 -1
  70. package/src/sap/fe/templates/messagebundle_et.properties +1 -1
  71. package/src/sap/fe/templates/messagebundle_fi.properties +1 -1
  72. package/src/sap/fe/templates/messagebundle_fr.properties +2 -2
  73. package/src/sap/fe/templates/messagebundle_fr_CA.properties +2 -2
  74. package/src/sap/fe/templates/messagebundle_hi.properties +1 -1
  75. package/src/sap/fe/templates/messagebundle_hr.properties +2 -2
  76. package/src/sap/fe/templates/messagebundle_hu.properties +1 -1
  77. package/src/sap/fe/templates/messagebundle_id.properties +1 -1
  78. package/src/sap/fe/templates/messagebundle_it.properties +1 -1
  79. package/src/sap/fe/templates/messagebundle_iw.properties +1 -1
  80. package/src/sap/fe/templates/messagebundle_ja.properties +1 -1
  81. package/src/sap/fe/templates/messagebundle_kk.properties +1 -1
  82. package/src/sap/fe/templates/messagebundle_ko.properties +1 -1
  83. package/src/sap/fe/templates/messagebundle_lt.properties +1 -1
  84. package/src/sap/fe/templates/messagebundle_lv.properties +1 -1
  85. package/src/sap/fe/templates/messagebundle_ms.properties +1 -1
  86. package/src/sap/fe/templates/messagebundle_nl.properties +1 -1
  87. package/src/sap/fe/templates/messagebundle_no.properties +2 -2
  88. package/src/sap/fe/templates/messagebundle_pl.properties +2 -2
  89. package/src/sap/fe/templates/messagebundle_pt.properties +1 -1
  90. package/src/sap/fe/templates/messagebundle_pt_PT.properties +1 -1
  91. package/src/sap/fe/templates/messagebundle_ro.properties +1 -1
  92. package/src/sap/fe/templates/messagebundle_ru.properties +1 -1
  93. package/src/sap/fe/templates/messagebundle_sh.properties +1 -1
  94. package/src/sap/fe/templates/messagebundle_sk.properties +2 -2
  95. package/src/sap/fe/templates/messagebundle_sl.properties +1 -1
  96. package/src/sap/fe/templates/messagebundle_sv.properties +1 -1
  97. package/src/sap/fe/templates/messagebundle_th.properties +2 -2
  98. package/src/sap/fe/templates/messagebundle_tr.properties +1 -1
  99. package/src/sap/fe/templates/messagebundle_uk.properties +1 -1
  100. package/src/sap/fe/templates/messagebundle_vi.properties +1 -1
  101. package/src/sap/fe/templates/messagebundle_zh_CN.properties +2 -2
  102. package/src/sap/fe/templates/messagebundle_zh_TW.properties +1 -1
  103. package/src/sap/fe/templates/ObjectPage/overrides/Routing.js +0 -20
  104. package/src/sap/fe/templates/ObjectPage/view/fragments/TitleAndSubtitle.fragment.xml +0 -24
  105. package/src/sap/fe/templates/RootContainer/view/PlaceholderLR.view.xml +0 -617
  106. package/src/sap/fe/templates/RootContainer/view/PlaceholderOP.view.xml +0 -588
  107. package/src/sap/fe/templates/controls/OverflowToolbarButtonHover.js +0 -25
  108. package/src/sap/fe/templates/controls/Paginator.control.xml +0 -24
  109. package/src/sap/fe/templates/controls/Paginator.js +0 -173
@@ -1,8 +1,8 @@
1
1
  /*!
2
2
  * SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
4
  */
5
- sap.ui.define(["sap/fe/core/CommonUtils"], function(CommonUtils) {
5
+ sap.ui.define(["sap/fe/core/CommonUtils", "sap/fe/macros/filter/FilterUtils"], function(CommonUtils, FilterUtils) {
6
6
  "use strict";
7
7
  return {
8
8
  adaptNavigationContext: function(oSelectionVariant, oTargetInfo) {
@@ -28,6 +28,10 @@ sap.ui.define(["sap/fe/core/CommonUtils"], function(CommonUtils) {
28
28
  sRootPath,
29
29
  aParameters
30
30
  );
31
+ var oFilterBar = oController._getFilterBarControl();
32
+ var oFilterInfo = FilterUtils.getFilterInfo(oFilterBar, {
33
+ targetControl: oController._getTable()
34
+ }).filters;
31
35
  var oInternalModelContext = oView.getBindingContext("internal");
32
36
  var mTabs = oInternalModelContext.getProperty("tabs");
33
37
  // Do we need to exclude Fields (mutli tables mode)?
@@ -40,7 +44,7 @@ sap.ui.define(["sap/fe/core/CommonUtils"], function(CommonUtils) {
40
44
  }
41
45
  }
42
46
  // TODO: move this also into the intent based navigation controller extension
43
- CommonUtils.addExternalStateFiltersToSelectionVariant(oSelectionVariant, oFilterBarConditions, oTargetInfo);
47
+ CommonUtils.addExternalStateFiltersToSelectionVariant(oSelectionVariant, oFilterBarConditions, oTargetInfo, oFilterInfo);
44
48
  delete oTargetInfo.propertiesWithoutConflict;
45
49
  }
46
50
  },
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
4
  */
5
5
  sap.ui.define(
6
6
  ["sap/fe/core/helpers/SemanticDateOperators", "sap/ui/core/routing/HashChanger", "sap/fe/core/CommonUtils", "sap/base/Log"],
@@ -52,11 +52,19 @@ sap.ui.define(
52
52
  }
53
53
 
54
54
  function getShareUrl() {
55
- var sShareUrl;
56
- var sHash = HashChanger.getInstance().getHash();
57
- var sBasePath = HashChanger.getInstance().hrefForAppSpecificHash ? HashChanger.getInstance().hrefForAppSpecificHash("") : "";
58
- sShareUrl = sHash ? sBasePath + sHash : window.location.hash;
59
- return sShareUrl;
55
+ var oUShellContainer = sap.ushell && sap.ushell.Container;
56
+ if (oUShellContainer) {
57
+ return oUShellContainer
58
+ .getFLPUrlAsync(true)
59
+ .then(function(sFLPUrl) {
60
+ return sFLPUrl;
61
+ })
62
+ .catch(function(sError) {
63
+ Log.error("Could not retrieve cFLP URL for the sharing dialog (dialog will not be opened)", sError);
64
+ });
65
+ } else {
66
+ return Promise.resolve(document.URL);
67
+ }
60
68
  }
61
69
 
62
70
  function getSaveAsTileServiceUrl(oController) {
@@ -99,22 +107,29 @@ sap.ui.define(
99
107
  return {
100
108
  adaptShareMetadata: function(oShareMetadata) {
101
109
  var that = this;
102
- return Promise.resolve(getJamUrl()).then(function(sJamUrl) {
103
- var oAppComponent = CommonUtils.getAppComponent(that.base.getView());
104
- var oMetadata = oAppComponent.getMetadata();
105
- var oUIManifest = oMetadata.getManifestEntry("sap.ui");
106
- var sIcon = (oUIManifest && oUIManifest.icons && oUIManifest.icons.icon) || "";
107
- var oAppManifest = oMetadata.getManifestEntry("sap.app");
108
- var sTitle = (oAppManifest && oAppManifest.title) || "";
109
- // TODO: check if there is any semantic date used before adding serviceURL as BLI:FIORITECHP1-18023
110
- oShareMetadata.tile = {
111
- icon: sIcon,
112
- title: sTitle,
113
- queryUrl: getSaveAsTileServiceUrl(that.base)
114
- };
115
- oShareMetadata.title = document.title;
116
- oShareMetadata.url = getShareUrl();
117
- oShareMetadata.jam.url = sJamUrl;
110
+ Promise.resolve(getJamUrl())
111
+ .then(function(sJamUrl) {
112
+ var oAppComponent = CommonUtils.getAppComponent(that.base.getView());
113
+ var oMetadata = oAppComponent.getMetadata();
114
+ var oUIManifest = oMetadata.getManifestEntry("sap.ui");
115
+ var sIcon = (oUIManifest && oUIManifest.icons && oUIManifest.icons.icon) || "";
116
+ var oAppManifest = oMetadata.getManifestEntry("sap.app");
117
+ var sTitle = (oAppManifest && oAppManifest.title) || "";
118
+ // TODO: check if there is any semantic date used before adding serviceURL as BLI:FIORITECHP1-18023
119
+ oShareMetadata.tile = {
120
+ icon: sIcon,
121
+ title: sTitle,
122
+ queryUrl: getSaveAsTileServiceUrl(that.base)
123
+ };
124
+ oShareMetadata.title = document.title;
125
+ oShareMetadata.jam.url = sJamUrl;
126
+ })
127
+ .catch(function(error) {
128
+ Log.error(error);
129
+ });
130
+
131
+ return Promise.resolve(getShareUrl()).then(function(sFLPUrl) {
132
+ oShareMetadata.url = sFLPUrl;
118
133
  return oShareMetadata;
119
134
  });
120
135
  }
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
4
  */
5
5
  sap.ui.define(
6
6
  [
@@ -10,9 +10,10 @@ sap.ui.define(
10
10
  "sap/ui/fl/apply/api/ControlVariantApplyAPI",
11
11
  "sap/ui/mdc/p13n/StateUtil",
12
12
  "sap/ui/Device",
13
- "sap/ui/mdc/enum/ConditionValidated"
13
+ "sap/ui/mdc/enum/ConditionValidated",
14
+ "sap/base/Log"
14
15
  ],
15
- function(CoreLibrary, NavLibrary, CommonUtils, ControlVariantApplyAPI, StateUtil, Device, ConditionValidated) {
16
+ function(CoreLibrary, NavLibrary, CommonUtils, ControlVariantApplyAPI, StateUtil, Device, ConditionValidated, Log) {
16
17
  "use strict";
17
18
 
18
19
  var NavType = NavLibrary.NavType,
@@ -28,7 +29,7 @@ sap.ui.define(
28
29
  var oView = this.getView(),
29
30
  oController = oView.getController(),
30
31
  oFilterBar = oController._getFilterBarControl(),
31
- aTables = oController._getTables();
32
+ aTables = oController._getControls("table");
32
33
 
33
34
  oFilterBar.setSuspendSelection(true);
34
35
  aTables.forEach(function(oTable) {
@@ -43,6 +44,14 @@ sap.ui.define(
43
44
  oController = oView.getController();
44
45
  oController._getFilterBarControl().setSuspendSelection(false);
45
46
  },
47
+ adaptBindingRefreshControls: function(aControls) {
48
+ var oView = this.getView(),
49
+ oController = oView.getController(),
50
+ aViewControls = oController._getControls(),
51
+ aControlsToRefresh = CommonUtils.getControlsForRefresh(oView, aViewControls);
52
+
53
+ Array.prototype.push.apply(aControls, aControlsToRefresh);
54
+ },
46
55
  adaptStateControls: function(aStateControls) {
47
56
  var oView = this.getView(),
48
57
  oController = oView.getController(),
@@ -57,7 +66,7 @@ sap.ui.define(
57
66
  if (oFilterBarVM) {
58
67
  aStateControls.push(oFilterBarVM);
59
68
  }
60
- oController._getTables().forEach(function(oTable) {
69
+ oController._getControls("table").forEach(function(oTable) {
61
70
  var oQuickFilter = oTable.getQuickFilter();
62
71
  if (oQuickFilter) {
63
72
  aStateControls.push(oQuickFilter);
@@ -113,28 +122,109 @@ sap.ui.define(
113
122
  },
114
123
  applyNavigationParameters: function(oNavigationParameter, aResults) {
115
124
  var oView = this.getView(),
125
+ that = this,
126
+ oController = oView.getController(),
127
+ oComponent = oController.getOwnerComponent(),
128
+ oAppComponent = sap.ui.core.Component.getOwnerComponentFor(oComponent),
129
+ oComponentData = oAppComponent.getComponentData(),
130
+ oStartupParameters = (oComponentData && oComponentData.startupParameters) || {},
131
+ oVariantPromise = that.handleVariantIdPassedViaURLParams(oStartupParameters),
132
+ bFilterVariantApplied;
133
+ oVariantPromise
134
+ .then(function(aVariants) {
135
+ if (aVariants && aVariants.length > 0) {
136
+ if (aVariants[0] === true || aVariants[1] === true) {
137
+ bFilterVariantApplied = true;
138
+ }
139
+ }
140
+ var oRes = that._applySelectionVariant(oView, oNavigationParameter, bFilterVariantApplied).then(function() {
141
+ var oController = oView.getController();
142
+ var oDynamicPage = oView.byId("fe::ListReport");
143
+ var bPreventInitialSearch = false;
144
+ var oFilterBarVM = that._getFilterBarVM(oView);
145
+ var oFilterBarControl = oController._getFilterBarControl();
146
+ if (
147
+ (oNavigationParameter.navigationType !== NavType.initial && oNavigationParameter.requiresStandardVariant) ||
148
+ (!oFilterBarVM && oView.getViewData().initialLoad === InitialLoadMode.Enabled) ||
149
+ oController._shouldAutoTriggerSearch(oFilterBarVM)
150
+ ) {
151
+ oFilterBarControl.triggerSearch();
152
+ } else {
153
+ bPreventInitialSearch = that._preventInitialSearch(oFilterBarVM);
154
+ }
155
+ that._bSearchTriggered = !bPreventInitialSearch;
156
+ oDynamicPage.setHeaderExpanded(Device.system.desktop || bPreventInitialSearch);
157
+ });
158
+ aResults.push(oRes);
159
+ })
160
+ .catch(function() {
161
+ Log.error("Variant ID cannot be applied");
162
+ });
163
+ },
164
+
165
+ handleVariantIdPassedViaURLParams: function(oUrlParams) {
166
+ var aPageVariantId = oUrlParams["sap-ui-fe-variant-id"],
167
+ aFilterBarVariantId = oUrlParams["sap-ui-fe-filterbar-variant-id"],
168
+ aTableVariantId = oUrlParams["sap-ui-fe-table-variant-id"],
169
+ oVariant;
170
+ if (aPageVariantId || aFilterBarVariantId || aTableVariantId) {
171
+ oVariant = {
172
+ sPageVariantId: aPageVariantId && aPageVariantId[0],
173
+ sFilterBarVariantId: aFilterBarVariantId && aFilterBarVariantId[0],
174
+ sTableVariantId: aTableVariantId && aTableVariantId[0]
175
+ };
176
+ }
177
+ return this._handleControlVariantId(oVariant);
178
+ },
179
+
180
+ _handleControlVariantId: function(oVariantIDs) {
181
+ var oView = this.getView(),
182
+ aPromises = [],
116
183
  that = this;
117
- var oRes = this._applySelectionVariant(oView, oNavigationParameter).then(function() {
118
- var oController = oView.getController();
119
- var oDynamicPage = oView.byId("fe::ListReport");
120
- var bPreventInitialSearch = false;
121
- var oFilterBarVM = that._getFilterBarVM(oView);
122
- var oFilterBarControl = oController._getFilterBarControl();
123
- if (
124
- oNavigationParameter.navigationType !== NavType.initial ||
125
- (!oFilterBarVM && oView.getViewData().initialLoad === InitialLoadMode.Enabled) ||
126
- oController._shouldAutoTriggerSearch(oFilterBarVM)
127
- ) {
128
- oFilterBarControl.triggerSearch();
129
- } else {
130
- bPreventInitialSearch = that._preventInitialSearch(oFilterBarVM);
184
+ var sVariantManagement = oView.getViewData().variantManagement;
185
+ if (oVariantIDs && oVariantIDs.sPageVariantId && sVariantManagement === "Page") {
186
+ var oVM = oView.byId("fe::PageVariantManagement");
187
+ oVM.getVariants().forEach(function(oVariant) {
188
+ if (oVariant.key === oVariantIDs.sPageVariantId) {
189
+ aPromises.push(that._applyControlVariant(oVM, oVariantIDs.sPageVariantId, true));
190
+ }
191
+ });
192
+ } else if (oVariantIDs && sVariantManagement === "Control") {
193
+ if (oVariantIDs.sFilterBarVariantId) {
194
+ var oVM = oView.byId(oView.getContent()[0].data("filterBarVariantId"));
195
+ oVM.getVariants().forEach(function(oVariant) {
196
+ if (oVariant.key === oVariantIDs.sFilterBarVariantId) {
197
+ aPromises.push(that._applyControlVariant(oVM, oVariantIDs.sFilterBarVariantId, true));
198
+ }
199
+ });
131
200
  }
132
- that._bSearchTriggered = !bPreventInitialSearch;
133
- oDynamicPage.setHeaderExpanded(Device.system.desktop || bPreventInitialSearch);
134
- });
135
- aResults.push(oRes);
201
+ if (oVariantIDs.sTableVariantId) {
202
+ var oController = oView.getController(),
203
+ aTables = oController._getControls("table");
204
+ aTables.forEach(function(oTable) {
205
+ var oTableVariant = oTable.getVariant();
206
+ if (oTable && oTableVariant) {
207
+ oTableVariant.getVariants().forEach(function(oVariant) {
208
+ if (oVariant.key === oVariantIDs.sTableVariantId) {
209
+ aPromises.push(that._applyControlVariant(oTableVariant, oVariantIDs.sTableVariantId));
210
+ }
211
+ });
212
+ }
213
+ });
214
+ }
215
+ }
216
+ return Promise.all(aPromises);
136
217
  },
137
218
 
219
+ _applyControlVariant: function(oVariant, sVariantID, bFilterVariantApplied) {
220
+ var oVM = ControlVariantApplyAPI.activateVariant({
221
+ element: oVariant,
222
+ variantReference: sVariantID
223
+ });
224
+ return oVM.then(function() {
225
+ return bFilterVariantApplied;
226
+ });
227
+ },
138
228
  /************************************* private helper *****************************************/
139
229
 
140
230
  _getFilterBarVM: function(oView) {
@@ -162,7 +252,7 @@ sap.ui.define(
162
252
  return !oCurrentVariant.executeOnSelect;
163
253
  },
164
254
 
165
- _applySelectionVariant: function(oView, oNavigationParameter) {
255
+ _applySelectionVariant: function(oView, oNavigationParameter, bFilterVariantApplied) {
166
256
  var oSelectionVariant = oNavigationParameter.selectionVariant,
167
257
  oSelectionVariantDefaults = oNavigationParameter.selectionVariantDefaults;
168
258
  if (!oSelectionVariant) {
@@ -178,6 +268,9 @@ sap.ui.define(
178
268
  oVariant,
179
269
  bRequiresStandardVariant = oNavigationParameter.requiresStandardVariant;
180
270
 
271
+ if (bFilterVariantApplied) {
272
+ oConditions = oFilterBar.getConditions();
273
+ }
181
274
  CommonUtils.addDefaultDisplayCurrency(aMandatoryFilterFields, oSelectionVariant, oSelectionVariantDefaults);
182
275
  CommonUtils.addSelectionVariantToConditions(oSelectionVariant, oConditions, oMetaModel, sContextPath);
183
276
  switch (oViewData.variantManagement) {
@@ -191,13 +284,13 @@ sap.ui.define(
191
284
  default:
192
285
  break;
193
286
  }
194
- return this._activateSelectionVariant(oFilterBar, oConditions, oVariant, bRequiresStandardVariant);
287
+ return this._activateSelectionVariant(oFilterBar, oConditions, oVariant, bRequiresStandardVariant, bFilterVariantApplied);
195
288
  },
196
- _activateSelectionVariant: function(oFilterBar, oConditions, oVariant, bRequiresStandardVariant) {
289
+ _activateSelectionVariant: function(oFilterBar, oConditions, oVariant, bRequiresStandardVariant, bFilterVariantApplied) {
197
290
  var that = this,
198
291
  oPromise;
199
292
 
200
- if (oVariant) {
293
+ if (oVariant && !bFilterVariantApplied) {
201
294
  var oVariantKey = bRequiresStandardVariant ? oVariant.getStandardVariantKey() : oVariant.getDefaultVariantKey();
202
295
  if (oVariantKey === null) {
203
296
  oVariantKey = oVariant.getId();
@@ -247,6 +340,10 @@ sap.ui.define(
247
340
  }
248
341
  if (oPropertyInfo.hasValueHelp) {
249
342
  mFilter[oPropertyInfo.path].forEach(fnAdjustValueHelpCondition);
343
+ } else {
344
+ mFilter[oPropertyInfo.path].forEach(function(oCondition) {
345
+ oCondition.validated = ConditionValidated.NotValidated;
346
+ });
250
347
  }
251
348
  } else {
252
349
  mFilter[oPropertyInfo.path] = [];
@@ -19,7 +19,7 @@
19
19
  <template:with path="view>presentation" var="presentationContext">
20
20
  <IconTabFilter
21
21
  text="{view>title}"
22
- key="{= ${view>tableControlId} || ${view>customTabId} }"
22
+ key="{= ${view>tableControlId} || ${view>customTabId} || ${view>chartControlId}}"
23
23
  customData:selectionVariant="{view>selectionVariantPath}"
24
24
  >
25
25
  <content>
@@ -29,12 +29,12 @@
29
29
  </template:then>
30
30
  <template:else>
31
31
  <MessageStrip
32
- text="{= '{parts: [{path: \'internal>tabs/ignoredFields/' + ${view>tableControlId} + '\'}, {path: \'\', value: \'' + ${view>title} + '\' }], formatter: \'.formatters.setTabMessageStrip\'}' }"
32
+ text="{= '{parts: [{path: \'internal>tabs/ignoredFields/' + (${view>tableControlId} || ${view>chartControlId}) + '\'}, {path: \'\', value: \'' + ${view>title} + '\' }], formatter: \'.formatters.setTabMessageStrip\'}' }"
33
33
  type="Information"
34
34
  showIcon="true"
35
35
  showCloseButton="true"
36
36
  class="sapUiSmallMargin"
37
- visible="{= '{= (${internal>tabs/ignoredFields/' + ${view>tableControlId} + '} || []).length>0 }' }"
37
+ visible="{= '{= (${internal>tabs/ignoredFields/' +(${view>tableControlId} || ${view>chartControlId}) + '} || []).length>0 }' }"
38
38
  >
39
39
  </MessageStrip>
40
40
  <core:Fragment fragmentName="sap.fe.templates.ListReport.view.fragments.CollectionVisualization" type="XML" />
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
4
  */
5
5
 
6
6
  sap.ui.define(
@@ -331,8 +331,8 @@ sap.ui.define(
331
331
  */
332
332
  getPressExpressionForDelete: function(sEntitySetName) {
333
333
  var sDeletableContexts = "${$view>/getBindingContext}",
334
- sTitle = "${$view>/#fe::ObjectPage/getHeaderTitle/getExpandedHeading/getItems/1/getItems/0/getText}",
335
- sDescription = "${$view>/#fe::ObjectPage/getHeaderTitle/getExpandedHeading/getItems/1/getItems/1/getText}";
334
+ sTitle = "${$view>/#fe::ObjectPage/getHeaderTitle/getExpandedHeading/getItems/1/getText}",
335
+ sDescription = "${$view>/#fe::ObjectPage/getHeaderTitle/getExpandedContent/0/getItems/0/getText}";
336
336
  var oParams = {
337
337
  title: sTitle,
338
338
  entitySetName: CommonHelper.addSingleQuotes(sEntitySetName),
@@ -359,7 +359,7 @@ sap.ui.define(
359
359
  entitySetName: CommonHelper.addSingleQuotes(sEntitySetName),
360
360
  invocationGrouping: CommonHelper.addSingleQuotes(sInvocationGroup),
361
361
  model: "${$source>/}.getModel()",
362
- label: CommonHelper.addSingleQuotes(oDataField && oDataField.Label),
362
+ label: CommonHelper.addSingleQuotes(oDataField && oDataField.Label, true),
363
363
  isNavigable: oHeaderAction && oHeaderAction.isNavigable,
364
364
  defaultValuesExtensionFunction:
365
365
  oHeaderAction && oHeaderAction.defaultValuesExtensionFunction
@@ -392,7 +392,7 @@ sap.ui.define(
392
392
  entitySetName: CommonHelper.addSingleQuotes(sEntitySetName),
393
393
  invocationGrouping: CommonHelper.addSingleQuotes(sInvocationGroup),
394
394
  model: "${$source>/}.getModel()",
395
- label: CommonHelper.addSingleQuotes(oDataField && oDataField.Label),
395
+ label: CommonHelper.addSingleQuotes(oDataField && oDataField.Label, true),
396
396
  isNavigable: oHeaderAction && oHeaderAction.isNavigable,
397
397
  defaultValuesExtensionFunction:
398
398
  oHeaderAction && oHeaderAction.defaultValuesExtensionFunction
@@ -447,6 +447,26 @@ sap.ui.define(
447
447
  return undefined;
448
448
  }
449
449
  }
450
+ },
451
+ isSubSectionTitleVisible: function(sSubSectionvisible, sSubSectiontitle, sSubSectionshowTitle) {
452
+ if (sSubSectionvisible.indexOf("{=") === 0) {
453
+ // Dynamic expression
454
+ var sExpressionResult = sSubSectionvisible.substring(
455
+ sSubSectionvisible.indexOf("{=") + 2,
456
+ sSubSectionvisible.lastIndexOf("}")
457
+ );
458
+ return (
459
+ "{= (" +
460
+ sExpressionResult +
461
+ ") && ('" +
462
+ sSubSectiontitle +
463
+ "' !=='undefined') && (" +
464
+ sSubSectionshowTitle +
465
+ " ? true : false) }"
466
+ );
467
+ } else {
468
+ return sSubSectionvisible && sSubSectiontitle !== "undefined" && (sSubSectionshowTitle ? true : false);
469
+ }
450
470
  }
451
471
  };
452
472
 
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
4
  */
5
5
  sap.ui.define(
6
6
  [
@@ -68,12 +68,6 @@ sap.ui.define(
68
68
  prepareOnEdit: {
69
69
  type: "boolean",
70
70
  defaultValue: false
71
- },
72
- /**
73
- * Temporary fix to avoid activating all bindings when a message doesn't have a controlId at first
74
- */
75
- _disableLazyLoadingForMessages: {
76
- type: "boolean"
77
71
  }
78
72
  },
79
73
  library: "sap.fe.templates",
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * SAPUI5
3
- * (c) Copyright 2009-2021 SAP SE. All rights reserved.
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
4
  */
5
5
  sap.ui.define(["sap/fe/core/ExtensionAPI", "sap/fe/core/CommonUtils", "sap/fe/core/converters/helpers/ID"], function(
6
6
  ExtensionAPI,
@@ -14,7 +14,9 @@
14
14
  template:require="{
15
15
  MODEL: 'sap/ui/model/odata/v4/AnnotationHelper',
16
16
  OP: 'sap/fe/templates/ObjectPage/AnnotationHelper',
17
- CONTACT: 'sap/fe/macros/ContactHelper'
17
+ CONTACT: 'sap/fe/macros/ContactHelper',
18
+ OPTemplating: 'sap/fe/templates/ObjectPage/templating/ObjectPageTemplating',
19
+ UI: 'sap/fe/core/templating/UIFormatters'
18
20
  }"
19
21
  >
20
22
  <template:with path="entitySet>./" var="entityType">
@@ -28,7 +30,7 @@
28
30
  customdata:showRelatedApps="{viewData>/showRelatedApps}"
29
31
  customdata:ObjectPageTitle="{headerInfo>TypeName}"
30
32
  customdata:ObjectPageSubtitle="{headerInfo>Title/Value@@MODEL.value}"
31
- showHeaderContent="{= ${viewData>/editableHeaderContent} === false ? true : '{= !(${ui>/editMode} === \'Editable\') }' }"
33
+ showHeaderContent="{converterContext>header/showContent}"
32
34
  showFooter="true"
33
35
  busy="{ui>/busy}"
34
36
  busyIndicatorDelay="0"
@@ -45,8 +47,8 @@
45
47
  <control:CommandExecution execute="_executeTabShortCut" command="PreviousTab" />
46
48
  <control:CommandExecution
47
49
  execute="._editDocument(${$view>/getBindingContext})"
48
- enabled="{= OP.getEditCommandExecutionEnabled(${converterContext>headerActions}) }"
49
- visible="{= OP.getEditCommandExecutionVisible(${converterContext>headerActions}) }"
50
+ enabled="{= OP.getEditCommandExecutionEnabled(${converterContext>header/actions}) }"
51
+ visible="{= OP.getEditCommandExecutionVisible(${converterContext>header/actions}) }"
50
52
  command="Edit"
51
53
  />
52
54
  <control:CommandExecution
@@ -61,8 +63,8 @@
61
63
  />
62
64
  <control:CommandExecution
63
65
  execute="{= OP.getPressExpressionForDelete(${entitySet>@sapui.name}) }"
64
- visible="{= OP.getDeleteCommandExecutionVisible(${converterContext>headerActions}) }"
65
- enabled="{= OP.getDeleteCommandExecutionEnabled(${converterContext>headerActions}) }"
66
+ visible="{= OP.getDeleteCommandExecutionVisible(${converterContext>header/actions}) }"
67
+ enabled="{= OP.getDeleteCommandExecutionEnabled(${converterContext>header/actions}) }"
66
68
  command="DeleteObject"
67
69
  />
68
70
  <control:CommandExecution
@@ -76,23 +78,53 @@
76
78
  command="Cancel"
77
79
  />
78
80
  </uxap:dependents>
79
- <template:if test="{converterContext>showHeader}">
81
+ <template:if test="{converterContext>header/visible}">
80
82
  <uxap:headerTitle>
81
83
  <uxap:ObjectPageDynamicHeaderTitle primaryArea="Begin">
82
84
  <uxap:expandedHeading>
83
85
  <FlexBox>
84
- <FlexBox visible="{= ${viewData>/editableHeaderContent} ? '{= (${ui>/editMode} === \'Editable\') }' : false}">
86
+ <FlexBox visible="{converterContext>header/title/expandedImageVisible}">
85
87
  <core:Fragment fragmentName="sap.fe.templates.ObjectPage.view.fragments.HeaderImage" type="XML" />
86
88
  </FlexBox>
87
- <core:Fragment fragmentName="sap.fe.templates.ObjectPage.view.fragments.TitleAndSubtitle" type="XML" />
89
+ <template:with path="entityType>@com.sap.vocabularies.UI.v1.HeaderInfo" var="headerInfo">
90
+ <Title
91
+ text="{= OPTemplating.getExpressionForTitle(${headerInfo>@@UI.getConverterContext}, ${viewData>}, ${fullContextPath>@@UI.getDataModelObjectPath}, ${entitySet>@com.sap.vocabularies.Common.v1.DraftRoot})}"
92
+ wrapping="true"
93
+ />
94
+ </template:with>
88
95
  </FlexBox>
89
96
  </uxap:expandedHeading>
90
97
  <uxap:snappedHeading>
91
98
  <FlexBox>
92
99
  <core:Fragment fragmentName="sap.fe.templates.ObjectPage.view.fragments.HeaderImage" type="XML" />
93
- <core:Fragment fragmentName="sap.fe.templates.ObjectPage.view.fragments.TitleAndSubtitle" type="XML" />
100
+ <template:with path="entityType>@com.sap.vocabularies.UI.v1.HeaderInfo" var="headerInfo">
101
+ <Title
102
+ text="{= OPTemplating.getExpressionForTitle(${headerInfo>@@UI.getConverterContext}, ${viewData>}, ${fullContextPath>@@UI.getDataModelObjectPath}, ${entitySet>@com.sap.vocabularies.Common.v1.DraftRoot})}"
103
+ wrapping="true"
104
+ />
105
+ </template:with>
94
106
  </FlexBox>
95
107
  </uxap:snappedHeading>
108
+ <uxap:expandedContent>
109
+ <FlexBox>
110
+ <template:if test="{entityType>@com.sap.vocabularies.UI.v1.HeaderInfo/Description}">
111
+ <Label
112
+ text="{= OPTemplating.getExpressionForDescription(${headerInfo>@@UI.getConverterContext}, ${fullContextPath>@@UI.getDataModelObjectPath})}"
113
+ wrapping="true"
114
+ />
115
+ </template:if>
116
+ </FlexBox>
117
+ </uxap:expandedContent>
118
+ <uxap:snappedContent>
119
+ <FlexBox>
120
+ <template:if test="{entityType>@com.sap.vocabularies.UI.v1.HeaderInfo/Description}">
121
+ <Label
122
+ text="{= OPTemplating.getExpressionForDescription(${headerInfo>@@UI.getConverterContext}, ${fullContextPath>@@UI.getDataModelObjectPath})}"
123
+ wrapping="true"
124
+ />
125
+ </template:if>
126
+ </FlexBox>
127
+ </uxap:snappedContent>
96
128
  <uxap:content>
97
129
  <template:if test="{entitySet>@com.sap.vocabularies.Common.v1.DraftRoot}">
98
130
  <macro:DraftIndicator DraftIndicatorType="IconOnly" class="sapUiTinyMarginBegin sapMTB sapMTBNewFlex" entitySet="{entitySet>}" />
@@ -100,12 +132,7 @@
100
132
  </uxap:content>
101
133
  <uxap:navigationActions>
102
134
  <template:if test="{= ${viewData>/viewLevel} > 1}">
103
- <fe:Paginator
104
- id="fe::Paginator"
105
- width="auto"
106
- navigate="._routing.navigateToContext(${$parameters>context} , { callExtension: true, oEvent: ${$parameters>oEvent} })"
107
- >
108
- </fe:Paginator>
135
+ <macro:Paginator id="fe::Paginator" />
109
136
  </template:if>
110
137
  <!-- Flexible column layout menu-->
111
138
  <template:if test="{= ${viewData>/fclEnabled} }">
@@ -126,51 +153,33 @@
126
153
  </uxap:breadcrumbs>
127
154
  </uxap:ObjectPageDynamicHeaderTitle>
128
155
  </uxap:headerTitle>
129
- <uxap:headerContent>
130
- <FlexBox
131
- id="fe::HeaderContentContainer"
132
- unittest:id="FlexBoxTest"
133
- dt:designtime="sap/fe/templates/ObjectPage/designtime/FlexBox.designtime"
134
- wrap="Wrap"
135
- fitContainer="true"
136
- alignItems="Stretch"
137
- >
138
- <template:if test="{entityType>@com.sap.vocabularies.UI.v1.HeaderInfo/ImageUrl}">
139
- <template:then>
140
- <Avatar
141
- unittest:id="AvatarImageUrlTest"
142
- class="sapUiSmallMarginEnd sapUiSmallMarginBottom"
143
- src="{entityType>@com.sap.vocabularies.UI.v1.HeaderInfo/ImageUrl@@MODEL.value}"
144
- initials="{= CONTACT.getAvatarInitials(${entityType>@com.sap.vocabularies.UI.v1.HeaderInfo/Initials@@MODEL.format})}"
145
- fallbackIcon="{= ${entityType>@com.sap.vocabularies.UI.v1.HeaderInfo/TypeImageUrl} !== undefined ? ${entityType>@com.sap.vocabularies.UI.v1.HeaderInfo/TypeImageUrl} : (${entityType>./@com.sap.vocabularies.Common.v1.IsNaturalPerson} ? 'sap-icon://person-placeholder' : 'sap-icon://product') }"
146
- displayShape="{= ${entityType>./@com.sap.vocabularies.Common.v1.IsNaturalPerson} ? 'Circle' : 'Square'}"
147
- displaySize="XL"
148
- />
149
- </template:then>
150
- <template:elseif test="{entityType>@com.sap.vocabularies.UI.v1.HeaderInfo/TypeImageUrl}">
156
+ <template:if test="{converterContext>header/hasContent}">
157
+ <uxap:headerContent>
158
+ <FlexBox
159
+ id="fe::HeaderContentContainer"
160
+ unittest:id="FlexBoxTest"
161
+ dt:designtime="sap/fe/templates/ObjectPage/designtime/FlexBox.designtime"
162
+ wrap="Wrap"
163
+ fitContainer="true"
164
+ alignItems="Stretch"
165
+ >
166
+ <template:if test="{converterContext>header/avatar}">
167
+ <template:with path="converterContext>header/avatar" var="avatar">
151
168
  <Avatar
152
- unittest:id="AvatarTypeImageUrlTest"
153
- class="sapUiSmallMarginEnd sapUiSmallMarginBottom"
154
- src="{entityType>@com.sap.vocabularies.UI.v1.HeaderInfo/TypeImageUrl@@MODEL.value}"
155
- initials="{= CONTACT.getAvatarInitials(${entityType>@com.sap.vocabularies.UI.v1.HeaderInfo/Initials@@MODEL.format})}"
156
- fallbackIcon="{= ${entityType>./@com.sap.vocabularies.Common.v1.IsNaturalPerson} ? 'sap-icon://person-placeholder' : 'sap-icon://product'}"
157
- displayShape="{= ${entityType>./@com.sap.vocabularies.Common.v1.IsNaturalPerson} ? 'Circle' : 'Square'}"
158
- displaySize="XL"
159
- />
160
- </template:elseif>
161
- <template:elseif test="{entityType>@com.sap.vocabularies.UI.v1.HeaderInfo/Initials}">
162
- <Avatar
163
- unittest:id="AvatarTypeInitialsTest"
164
- class="sapUiSmallMarginEnd sapUiSmallMarginBottom"
165
- initials="{= CONTACT.getAvatarInitials(${entityType>@com.sap.vocabularies.UI.v1.HeaderInfo/Initials@@MODEL.format})}"
166
- displayShape="{= ${entityType>./@com.sap.vocabularies.Common.v1.IsNaturalPerson} ? 'Circle' : 'Square'}"
167
- displaySize="XL"
168
- />
169
- </template:elseif>
170
- </template:if>
171
- <core:Fragment fragmentName="sap.fe.templates.ObjectPage.view.fragments.HeaderContent" type="XML" />
172
- </FlexBox>
173
- </uxap:headerContent>
169
+ unittest:id="AvatarOPHeaderContent"
170
+ class="sapUiSmallMarginEnd sapUiSmallMarginBottom"
171
+ src="{avatar>src}"
172
+ initials="{avatar>initials}"
173
+ fallbackIcon="{avatar>fallbackIcon}"
174
+ displayShape="{avatar>displayShape}"
175
+ displaySize="XL"
176
+ />
177
+ </template:with>
178
+ </template:if>
179
+ <core:Fragment fragmentName="sap.fe.templates.ObjectPage.view.fragments.HeaderContent" type="XML" />
180
+ </FlexBox>
181
+ </uxap:headerContent>
182
+ </template:if>
174
183
  </template:if>
175
184
  <uxap:sections>
176
185
  <core:Fragment fragmentName="sap.fe.templates.ObjectPage.view.fragments.Section" type="XML" />