@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
@@ -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
  [
@@ -12,9 +13,27 @@ sap.ui.define(
12
13
  "sap/ui/mdc/p13n/StateUtil",
13
14
  "sap/ui/Device",
14
15
  "sap/ui/mdc/enum/ConditionValidated",
16
+ "sap/fe/macros/DelegateUtil",
17
+ "sap/fe/core/helpers/ModelHelper",
18
+ "sap/fe/macros/filter/FilterUtils",
19
+ "sap/fe/core/templating/PropertyFormatters",
15
20
  "sap/base/Log"
16
21
  ],
17
- function(CoreLibrary, NavLibrary, CommonUtils, KeepAliveHelper, ControlVariantApplyAPI, StateUtil, Device, ConditionValidated, Log) {
22
+ function(
23
+ CoreLibrary,
24
+ NavLibrary,
25
+ CommonUtils,
26
+ KeepAliveHelper,
27
+ ControlVariantApplyAPI,
28
+ StateUtil,
29
+ Device,
30
+ ConditionValidated,
31
+ DelegateUtil,
32
+ ModelHelper,
33
+ FilterUtils,
34
+ PropertyFormatters,
35
+ Log
36
+ ) {
18
37
  "use strict";
19
38
 
20
39
  var NavType = NavLibrary.NavType,
@@ -22,6 +41,9 @@ sap.ui.define(
22
41
  TemplateContentView = CoreLibrary.TemplateContentView,
23
42
  InitialLoadMode = CoreLibrary.InitialLoadMode;
24
43
 
44
+ var FilterRestrictions = CommonUtils.FilterRestrictions,
45
+ CONDITION_PATH_TO_PROPERTY_PATH_REGEX = /\+|\*/g;
46
+
25
47
  return {
26
48
  applyInitialStateOnly: function() {
27
49
  return true;
@@ -31,19 +53,33 @@ sap.ui.define(
31
53
  oController = oView.getController(),
32
54
  oFilterBar = oController._getFilterBarControl(),
33
55
  aTables = oController._getControls("table");
34
-
35
- oFilterBar.setSuspendSelection(true);
56
+ if (oFilterBar) {
57
+ oFilterBar.setSuspendSelection(true);
58
+ aPromises.push(oFilterBar.initialized());
59
+ }
36
60
  aTables.forEach(function(oTable) {
37
61
  aPromises.push(oTable.initialized());
38
62
  });
39
- aPromises.push(oFilterBar.initialized());
40
63
 
41
64
  delete this._bSearchTriggered;
42
65
  },
43
66
  onAfterStateApplied: function() {
44
- var oView = this.getView(),
45
- oController = oView.getController();
46
- oController._getFilterBarControl().setSuspendSelection(false);
67
+ var oController = this.getView().getController();
68
+ var oFilterBar = oController._getFilterBarControl();
69
+ if (oFilterBar) {
70
+ oFilterBar.setSuspendSelection(false);
71
+ } else if (oController._isFilterBarHidden()) {
72
+ var oInternalModelContext = oController.getView().getBindingContext("internal"),
73
+ aControls = oController._getControls();
74
+ oInternalModelContext.setProperty("hasPendingFilters", false);
75
+ if (oController._isMultiMode()) {
76
+ oController._setCountsOutDated();
77
+ var sDisplayedControlId = oController._getCurrentControl().getId();
78
+ aControls.forEach(function(oControl) {
79
+ oControl.data("outdatedRows", oControl.getId() !== sDisplayedControlId);
80
+ });
81
+ }
82
+ }
47
83
  },
48
84
  adaptBindingRefreshControls: function(aControls) {
49
85
  var oView = this.getView(),
@@ -57,17 +93,15 @@ sap.ui.define(
57
93
  var oView = this.getView(),
58
94
  oController = oView.getController(),
59
95
  oViewData = oView.getViewData(),
60
- bControlVM = oViewData.variantManagement === VariantManagement.Control,
61
- that = this;
62
-
63
- if (oController._isMultiMode()) {
64
- aStateControls.push(oController._getMultiModeControl());
65
- }
96
+ bControlVM = oViewData.variantManagement === VariantManagement.Control;
66
97
 
67
98
  var oFilterBarVM = this._getFilterBarVM(oView);
68
99
  if (oFilterBarVM) {
69
100
  aStateControls.push(oFilterBarVM);
70
101
  }
102
+ if (oController._isMultiMode()) {
103
+ aStateControls.push(oController._getMultiModeControl());
104
+ }
71
105
  oController._getControls("table").forEach(function(oTable) {
72
106
  var oQuickFilter = oTable.getQuickFilter();
73
107
  if (oQuickFilter) {
@@ -76,33 +110,18 @@ sap.ui.define(
76
110
  if (bControlVM) {
77
111
  aStateControls.push(oTable.getVariant());
78
112
  }
79
- if (that.getView().getController().bTestAppState) {
80
- aStateControls.push(oTable);
81
- }
113
+ aStateControls.push(oTable);
82
114
  });
83
115
 
84
116
  if (oController._hasMultiVisualizations()) {
85
117
  aStateControls.push(oController._getSegmentedButton(TemplateContentView.Chart));
86
118
  aStateControls.push(oController._getSegmentedButton(TemplateContentView.Table));
87
119
  }
88
- aStateControls.push(oController._getFilterBarControl());
89
- aStateControls.push(oView.byId("fe::ListReport"));
90
- },
91
- adaptControlStateHandler: function(oControl, aControlHandler) {
92
- if (oControl.isA("sap.ui.fl.variants.VariantManagement")) {
93
- aControlHandler.push({
94
- retrieve: function(oVM) {
95
- return {
96
- "variantId": oVM.getCurrentVariantKey()
97
- };
98
- },
99
- apply: function(oVM, oControlState) {
100
- if (oControlState && oControlState.variantId !== undefined) {
101
- oVM.setModified(true);
102
- }
103
- }
104
- });
120
+ var oFilterBar = oController._getFilterBarControl();
121
+ if (oFilterBar) {
122
+ aStateControls.push(oFilterBar);
105
123
  }
124
+ aStateControls.push(oView.byId("fe::ListReport"));
106
125
  },
107
126
  retrieveAdditionalStates: function(mAdditionalStates) {
108
127
  var oView = this.getView(),
@@ -124,10 +143,13 @@ sap.ui.define(
124
143
 
125
144
  if (oAdditionalStates) {
126
145
  // explicit check for boolean values - 'undefined' should not alter the triggered search property
127
- if (oAdditionalStates.dataLoaded === false) {
146
+ if (oAdditionalStates.dataLoaded === false && oFilterBar) {
147
+ // without this, the data is loaded on navigating back
128
148
  oFilterBar._bSearchTriggered = false;
129
149
  } else if (oAdditionalStates.dataLoaded === true) {
130
- oController._getFilterBarControl().triggerSearch();
150
+ if (oFilterBar) {
151
+ oFilterBar.triggerSearch();
152
+ }
131
153
  this._bSearchTriggered = true;
132
154
  }
133
155
  if (oController._hasMultiVisualizations()) {
@@ -145,42 +167,44 @@ sap.ui.define(
145
167
  var oView = this.getView(),
146
168
  that = this,
147
169
  oController = oView.getController(),
148
- oComponent = oController.getOwnerComponent(),
149
- oAppComponent = sap.ui.core.Component.getOwnerComponentFor(oComponent),
170
+ oAppComponent = oController.getAppComponent(oView),
150
171
  oComponentData = oAppComponent.getComponentData(),
151
172
  oStartupParameters = (oComponentData && oComponentData.startupParameters) || {},
152
173
  oVariantPromise = that.handleVariantIdPassedViaURLParams(oStartupParameters),
153
174
  bFilterVariantApplied;
154
- oVariantPromise
155
- .then(function(aVariants) {
156
- if (aVariants && aVariants.length > 0) {
157
- if (aVariants[0] === true || aVariants[1] === true) {
158
- bFilterVariantApplied = true;
159
- }
160
- }
161
- var oRes = that._applySelectionVariant(oView, oNavigationParameter, bFilterVariantApplied).then(function() {
162
- var oController = oView.getController();
163
- var oDynamicPage = oView.byId("fe::ListReport");
164
- var bPreventInitialSearch = false;
165
- var oFilterBarVM = that._getFilterBarVM(oView);
166
- var oFilterBarControl = oController._getFilterBarControl();
167
- if (
168
- (oNavigationParameter.navigationType !== NavType.initial && oNavigationParameter.requiresStandardVariant) ||
169
- (!oFilterBarVM && oView.getViewData().initialLoad === InitialLoadMode.Enabled) ||
170
- oController._shouldAutoTriggerSearch(oFilterBarVM)
171
- ) {
172
- oFilterBarControl.triggerSearch();
173
- } else {
174
- bPreventInitialSearch = that._preventInitialSearch(oFilterBarVM);
175
+ aResults.push(
176
+ oVariantPromise
177
+ .then(function(aVariants) {
178
+ if (aVariants && aVariants.length > 0) {
179
+ if (aVariants[0] === true || aVariants[1] === true) {
180
+ bFilterVariantApplied = true;
181
+ }
175
182
  }
176
- that._bSearchTriggered = !bPreventInitialSearch;
177
- oDynamicPage.setHeaderExpanded(Device.system.desktop || bPreventInitialSearch);
178
- });
179
- aResults.push(oRes);
180
- })
181
- .catch(function() {
182
- Log.error("Variant ID cannot be applied");
183
- });
183
+ return that._applySelectionVariant(oView, oNavigationParameter, bFilterVariantApplied).then(function() {
184
+ var oDynamicPage = oView.byId("fe::ListReport");
185
+ var bPreventInitialSearch = false;
186
+ var oFilterBarVM = that._getFilterBarVM(oView);
187
+ var oFilterBarControl = oController._getFilterBarControl();
188
+ if (oFilterBarControl) {
189
+ if (
190
+ (oNavigationParameter.navigationType !== NavType.initial &&
191
+ oNavigationParameter.requiresStandardVariant) ||
192
+ (!oFilterBarVM && oView.getViewData().initialLoad === InitialLoadMode.Enabled) ||
193
+ oController._shouldAutoTriggerSearch(oFilterBarVM)
194
+ ) {
195
+ oFilterBarControl.triggerSearch();
196
+ } else {
197
+ bPreventInitialSearch = that._preventInitialSearch(oFilterBarVM);
198
+ }
199
+ that._bSearchTriggered = !bPreventInitialSearch;
200
+ oDynamicPage.setHeaderExpanded(Device.system.desktop || bPreventInitialSearch);
201
+ }
202
+ });
203
+ })
204
+ .catch(function() {
205
+ Log.error("Variant ID cannot be applied");
206
+ })
207
+ );
184
208
  },
185
209
 
186
210
  handleVariantIdPassedViaURLParams: function(oUrlParams) {
@@ -213,11 +237,13 @@ sap.ui.define(
213
237
  } else if (oVariantIDs && sVariantManagement === "Control") {
214
238
  if (oVariantIDs.sFilterBarVariantId) {
215
239
  var oVM = oView.byId(oView.getContent()[0].data("filterBarVariantId"));
216
- oVM.getVariants().forEach(function(oVariant) {
217
- if (oVariant.key === oVariantIDs.sFilterBarVariantId) {
218
- aPromises.push(that._applyControlVariant(oVM, oVariantIDs.sFilterBarVariantId, true));
219
- }
220
- });
240
+ if (oVM) {
241
+ oVM.getVariants().forEach(function(oVariant) {
242
+ if (oVariant.key === oVariantIDs.sFilterBarVariantId) {
243
+ aPromises.push(that._applyControlVariant(oVM, oVariantIDs.sFilterBarVariantId, true));
244
+ }
245
+ });
246
+ }
221
247
  }
222
248
  if (oVariantIDs.sTableVariantId) {
223
249
  var oController = oView.getController(),
@@ -277,17 +303,16 @@ sap.ui.define(
277
303
  },
278
304
 
279
305
  _applySelectionVariant: function(oView, oNavigationParameter, bFilterVariantApplied) {
280
- var oSelectionVariant = oNavigationParameter.selectionVariant,
306
+ var oFilterBar = oView.getController()._getFilterBarControl(),
307
+ oSelectionVariant = oNavigationParameter.selectionVariant,
281
308
  oSelectionVariantDefaults = oNavigationParameter.selectionVariantDefaults;
282
- if (!oSelectionVariant) {
309
+ if (!oFilterBar || !oSelectionVariant) {
283
310
  return Promise.resolve();
284
311
  }
285
-
286
312
  var oConditions = {},
287
313
  oMetaModel = oView.getModel().getMetaModel(),
288
314
  oViewData = oView.getViewData(),
289
315
  sContextPath = oViewData.contextPath || "/" + oViewData.entitySet,
290
- oFilterBar = oView.byId(oView.getContent()[0].data("filterBarId")),
291
316
  aMandatoryFilterFields = CommonUtils.getMandatoryFilterFields(oMetaModel, sContextPath),
292
317
  oVariant,
293
318
  bRequiresStandardVariant = oNavigationParameter.requiresStandardVariant;
@@ -330,10 +355,7 @@ sap.ui.define(
330
355
  }
331
356
  return oPromise.then(function(bClearFilterAndReplaceWithAppState) {
332
357
  if (bClearFilterAndReplaceWithAppState) {
333
- if (that.getView().getController().bTestAppState) {
334
- return that._fnApplyConditions(oFilterBar, oConditions);
335
- }
336
- return that._fnClearFilterAndReplaceWithAppState(oFilterBar, oConditions);
358
+ return that._fnApplyConditions(oFilterBar, oConditions);
337
359
  }
338
360
  });
339
361
  },
@@ -352,9 +374,35 @@ sap.ui.define(
352
374
  }
353
375
  delete oCondition.isEmpty;
354
376
  };
377
+ var fnGetPropertyInfo = function(oFilterControl, sEntityTypePath) {
378
+ var sEntitySetPath = ModelHelper.getEntitySetPath(sEntityTypePath),
379
+ oMetaModel = oFilterControl.getModel().getMetaModel(),
380
+ oFR = CommonUtils.getFilterRestrictionsByPath(sEntitySetPath, oMetaModel),
381
+ aNonFilterableProps = oFR[FilterRestrictions.NON_FILTERABLE_PROPERTIES],
382
+ mFilterFields = FilterUtils.getConvertedFilterFields(oFilterControl, sEntityTypePath),
383
+ aPropertyInfo = [];
384
+ Object.keys(mFilterFields).forEach(function(sFilterFieldKey) {
385
+ var oConvertedProperty = mFilterFields[sFilterFieldKey];
386
+ var sPropertyPath = oConvertedProperty.conditionPath.replace(CONDITION_PATH_TO_PROPERTY_PATH_REGEX, "");
387
+ if (aNonFilterableProps.indexOf(sPropertyPath) === -1) {
388
+ var sAnnotationPath = oConvertedProperty.annotationPath;
389
+ var oPropertyContext = oMetaModel.createBindingContext(sAnnotationPath);
390
+ aPropertyInfo.push({
391
+ path: oConvertedProperty.conditionPath,
392
+ hiddenFilter: oConvertedProperty.availability === "Hidden",
393
+ hasValueHelp: !sAnnotationPath
394
+ ? false
395
+ : PropertyFormatters.hasValueHelp(oPropertyContext.getObject(), { context: oPropertyContext })
396
+ });
397
+ return;
398
+ }
399
+ });
400
+ return aPropertyInfo;
401
+ };
355
402
  return oFilterBar.initialized().then(function() {
356
- oFilterBar
357
- .getPropertyInfoSet()
403
+ var sEntityTypePath = DelegateUtil.getCustomData(oFilterBar, "entityType");
404
+ var aPropertyInfo = fnGetPropertyInfo(oFilterBar, sEntityTypePath);
405
+ aPropertyInfo
358
406
  .filter(function(oPropertyInfo) {
359
407
  return oPropertyInfo.path !== "$editState" && oPropertyInfo.path !== "$search";
360
408
  })
@@ -377,9 +425,6 @@ sap.ui.define(
377
425
  });
378
426
  return StateUtil.applyExternalState(oFilterBar, { filter: mFilter, items: aItems });
379
427
  });
380
- },
381
- _fnClearFilterAndReplaceWithAppState: function(oFilterBar, oConditions) {
382
- return this._fnApplyConditions(oFilterBar, {}).then(this._fnApplyConditions.bind(this, oFilterBar, oConditions));
383
428
  }
384
429
  };
385
430
  }
@@ -10,6 +10,14 @@
10
10
  <template:repeat list="{converterContext>views}" var="view">
11
11
  <template:with path="view>primaryVisualization" var="presentationContext">
12
12
  <template:repeat list="{presentationContext>visualizations}" var="visualizationDefinition">
13
+ <m:MessageStrip
14
+ text="{= '{path:\'internal>controls/ignoredFields' + (${visualizationDefinition>collection}) + (${visualizationDefinition>type}) + '\', formatter: \'.formatters.setChartMessageStrip\'}'}"
15
+ type="Information"
16
+ showIcon="true"
17
+ showCloseButton="true"
18
+ class="sapUiSmallMargin"
19
+ visible="{= '{= (${internal>controls/ignoredFields' + (${visualizationDefinition>collection}) + (${visualizationDefinition>type}) + '} || []).length>0 &amp;&amp; ${pageInternal>alpContentView} !== \'Table\'}' }"
20
+ />
13
21
  <core:Fragment fragmentName="sap.fe.templates.controls.{visualizationDefinition>type}" type="XML" />
14
22
  </template:repeat>
15
23
  </template:with>
@@ -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
  sap.ui.define(
@@ -48,7 +49,7 @@ sap.ui.define(
48
49
  */
49
50
  getSwitchToActiveVisibility: function(oAnnotations) {
50
51
  if (this.checkDraftState(oAnnotations)) {
51
- return "{= (${ui>/editMode} === 'Editable') && !${ui>createMode} && %{DraftAdministrativeData/DraftIsCreatedByMe} }";
52
+ return "{= (%{DraftAdministrativeData/DraftIsCreatedByMe}) ? ( (${ui>/editMode} === 'Editable') && !${ui>createMode} && %{DraftAdministrativeData/DraftIsCreatedByMe} ) : false }";
52
53
  } else {
53
54
  return false;
54
55
  }
@@ -62,7 +63,7 @@ sap.ui.define(
62
63
  */
63
64
  getSwitchToDraftVisibility: function(oAnnotations) {
64
65
  if (this.checkDraftState(oAnnotations)) {
65
- return "{= !(${ui>/editMode} === 'Editable') && !${ui>createMode} && (${HasDraftEntity} && %{DraftAdministrativeData/DraftIsCreatedByMe}) }";
66
+ return "{= (%{DraftAdministrativeData/DraftIsCreatedByMe}) ? ( !(${ui>/editMode} === 'Editable') && !${ui>createMode} && ${HasDraftEntity} && %{DraftAdministrativeData/DraftIsCreatedByMe} ) : false }";
66
67
  } else {
67
68
  return false;
68
69
  }
@@ -447,6 +448,26 @@ sap.ui.define(
447
448
  return undefined;
448
449
  }
449
450
  }
451
+ },
452
+ isSubSectionTitleVisible: function(sSubSectionvisible, sSubSectiontitle, sSubSectionshowTitle) {
453
+ if (sSubSectionvisible.indexOf("{=") === 0) {
454
+ // Dynamic expression
455
+ var sExpressionResult = sSubSectionvisible.substring(
456
+ sSubSectionvisible.indexOf("{=") + 2,
457
+ sSubSectionvisible.lastIndexOf("}")
458
+ );
459
+ return (
460
+ "{= (" +
461
+ sExpressionResult +
462
+ ") && ('" +
463
+ sSubSectiontitle +
464
+ "' !=='undefined') && (" +
465
+ sSubSectionshowTitle +
466
+ " ? true : false) }"
467
+ );
468
+ } else {
469
+ return sSubSectionvisible && sSubSectiontitle !== "undefined" && (sSubSectionshowTitle ? "true" : "false");
470
+ }
450
471
  }
451
472
  };
452
473
 
@@ -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
  [
@@ -15,6 +16,7 @@ sap.ui.define(
15
16
  "use strict";
16
17
 
17
18
  var VariantManagement = CoreLibrary.VariantManagement,
19
+ CreationMode = CoreLibrary.CreationMode,
18
20
  ObjectPageComponent = TemplateComponent.extend("sap.fe.templates.ObjectPage.Component", {
19
21
  metadata: {
20
22
  properties: {
@@ -86,32 +88,33 @@ sap.ui.define(
86
88
 
87
89
  // TODO: this should be ideally be handled by the editflow/routing without the need to have this method in the
88
90
  // object page - for now keep it here
89
- createDeferredContext: function(sPath, bActionCreate) {
91
+ createDeferredContext: function(sPath, oListBinding, bActionCreate) {
90
92
  if (!this.DeferredContextCreated) {
91
93
  this.DeferredContextCreated = true;
92
- var oListBinding,
93
- that = this,
94
+ var that = this,
94
95
  oParamters = {
95
96
  "$$groupId": "$auto.Heroes",
96
97
  "$$updateGroupId": "$auto"
97
98
  };
98
-
99
- oListBinding = new ODataListBinding(
100
- this.getModel(),
101
- sPath.replace("(...)", ""),
102
- undefined,
103
- undefined,
104
- undefined,
105
- oParamters
106
- );
107
-
99
+ if (!oListBinding || oListBinding.isRelative() === false) {
100
+ oListBinding = new ODataListBinding(
101
+ this.getModel(),
102
+ sPath.replace("(...)", ""),
103
+ undefined,
104
+ undefined,
105
+ undefined,
106
+ oParamters
107
+ );
108
+ } else {
109
+ oListBinding.mParameters = oParamters;
110
+ }
108
111
  var oStartUpParams =
109
112
  this.oAppComponent &&
110
113
  this.oAppComponent.getComponentData() &&
111
114
  this.oAppComponent.getComponentData().startupParameters,
112
115
  oInboundParameters = this.getViewData().inboundParameters,
113
116
  createParams;
114
- if (oStartUpParams.preferredMode && oStartUpParams.preferredMode[0].indexOf("create") !== -1) {
117
+ if (oStartUpParams && oStartUpParams.preferredMode && oStartUpParams.preferredMode[0].indexOf("create") !== -1) {
115
118
  createParams = CommonUtils.getAdditionalParamsForCreate(oStartUpParams, oInboundParameters);
116
119
  }
117
120
 
@@ -119,7 +122,7 @@ sap.ui.define(
119
122
  that.getRootControl()
120
123
  .getController()
121
124
  .editFlow.createDocument(oListBinding, {
122
- creationMode: "Sync",
125
+ creationMode: CreationMode.Sync,
123
126
  createAction: bActionCreate,
124
127
  data: createParams
125
128
  })
@@ -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(["sap/fe/core/ExtensionAPI", "sap/fe/core/CommonUtils", "sap/fe/core/converters/helpers/ID"], function(
6
7
  ExtensionAPI,
@@ -105,6 +106,9 @@ sap.ui.define(["sap/fe/core/ExtensionAPI", "sap/fe/core/CommonUtils", "sap/fe/co
105
106
  */
106
107
  getSelectedContexts: function(sTableId) {
107
108
  var oTable = this._view.byId(sTableId);
109
+ if (oTable && oTable.isA("sap.fe.macros.TableAPI")) {
110
+ oTable = oTable.getContent();
111
+ }
108
112
  return (oTable && oTable.isA("sap.ui.mdc.Table") && oTable.getSelectedContexts()) || [];
109
113
  },
110
114
 
@@ -122,6 +126,18 @@ sap.ui.define(["sap/fe/core/ExtensionAPI", "sap/fe/core/CommonUtils", "sap/fe/co
122
126
  oBlock = this._view.byId(sBlockID),
123
127
  bBlockState = bShow === undefined ? !oBlock.getShowSideContent() : bShow;
124
128
  oBlock.setShowSideContent(bBlockState);
129
+ },
130
+
131
+ /**
132
+ * Gets the bound context of the current object page.
133
+ *
134
+ * @alias sap.fe.templates.ObjectPage.ExtensionAPI#getBindingContext
135
+ * @returns {sap.ui.model.odata.v4.Context} Context bound to the object page
136
+ *
137
+ * @public
138
+ */
139
+ getBindingContext: function() {
140
+ return this._view.getBindingContext();
125
141
  }
126
142
  });
127
143