@sapui5/sap.fe.templates 1.102.3 → 1.105.0

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 (145) hide show
  1. package/package.json +4 -5
  2. package/src/sap/fe/templates/.library +1 -1
  3. package/src/sap/fe/templates/AnalyticalListPage/Component.js +2 -2
  4. package/src/sap/fe/templates/AnalyticalListPage/chart/FEChartDelegate.js +2 -2
  5. package/src/sap/fe/templates/AnalyticalListPage/chart/FEChartDelegate.ts +1 -1
  6. package/src/sap/fe/templates/Feedback.js +18 -18
  7. package/src/sap/fe/templates/Feedback.ts +12 -12
  8. package/src/sap/fe/templates/ListComponent.js +2 -2
  9. package/src/sap/fe/templates/ListReport/Component.js +2 -2
  10. package/src/sap/fe/templates/ListReport/ExtensionAPI.js +13 -14
  11. package/src/sap/fe/templates/ListReport/ExtensionAPI.ts +11 -13
  12. package/src/sap/fe/templates/ListReport/ListReport.view.xml +12 -74
  13. package/src/sap/fe/templates/ListReport/ListReportController.controller.js +95 -392
  14. package/src/sap/fe/templates/ListReport/ListReportController.controller.ts +99 -367
  15. package/src/sap/fe/templates/ListReport/ListReportTemplating.js +1 -1
  16. package/src/sap/fe/templates/ListReport/controls/MultipleModeControl.js +471 -0
  17. package/src/sap/fe/templates/ListReport/controls/MultipleModeControl.ts +347 -0
  18. package/src/sap/fe/templates/ListReport/overrides/IntentBasedNavigation.js +16 -9
  19. package/src/sap/fe/templates/ListReport/overrides/IntentBasedNavigation.ts +17 -11
  20. package/src/sap/fe/templates/ListReport/overrides/Share.js +3 -4
  21. package/src/sap/fe/templates/ListReport/overrides/Share.ts +6 -7
  22. package/src/sap/fe/templates/ListReport/overrides/ViewState.js +22 -31
  23. package/src/sap/fe/templates/ListReport/overrides/ViewState.ts +33 -37
  24. package/src/sap/fe/templates/ListReport/view/fragments/Chart.fragment.xml +3 -0
  25. package/src/sap/fe/templates/ListReport/view/fragments/CollectionVisualization.fragment.xml +11 -5
  26. package/src/sap/fe/templates/{controls → ListReport/view/fragments}/MacroChart.fragment.xml +3 -2
  27. package/src/sap/fe/templates/ListReport/view/fragments/MultipleMode.fragment.js +20 -4
  28. package/src/sap/fe/templates/ListReport/view/fragments/MultipleMode.fragment.ts +80 -48
  29. package/src/sap/fe/templates/{controls → ListReport/view/fragments}/Table.fragment.xml +6 -5
  30. package/src/sap/fe/templates/ListReport/view/fragments/VariantManagement.fragment.xml +31 -0
  31. package/src/sap/fe/templates/ObjectPage/Component.js +2 -2
  32. package/src/sap/fe/templates/ObjectPage/ExtensionAPI.js +21 -20
  33. package/src/sap/fe/templates/ObjectPage/ExtensionAPI.ts +23 -22
  34. package/src/sap/fe/templates/ObjectPage/ObjectPage.view.xml +52 -146
  35. package/src/sap/fe/templates/ObjectPage/ObjectPageController.controller.js +303 -268
  36. package/src/sap/fe/templates/ObjectPage/ObjectPageController.controller.ts +191 -242
  37. package/src/sap/fe/templates/ObjectPage/ObjectPageTemplating.js +72 -71
  38. package/src/sap/fe/templates/ObjectPage/ObjectPageTemplating.ts +81 -88
  39. package/src/sap/fe/templates/ObjectPage/components/DraftHandlerButton.js +178 -0
  40. package/src/sap/fe/templates/ObjectPage/components/DraftHandlerButton.tsx +132 -0
  41. package/src/sap/fe/templates/ObjectPage/controls/StashableHBox.js +2 -2
  42. package/src/sap/fe/templates/ObjectPage/controls/StashableVBox.js +2 -2
  43. package/src/sap/fe/templates/ObjectPage/controls/SubSectionBlock.js +3 -4
  44. package/src/sap/fe/templates/ObjectPage/controls/SubSectionBlock.ts +4 -4
  45. package/src/sap/fe/templates/ObjectPage/designtime/FlexBox.designtime.js +1 -1
  46. package/src/sap/fe/templates/ObjectPage/designtime/StashableHBox.designtime.js +1 -1
  47. package/src/sap/fe/templates/ObjectPage/designtime/StashableHBox.designtime.ts +1 -1
  48. package/src/sap/fe/templates/ObjectPage/designtime/StashableVBox.designtime.js +1 -1
  49. package/src/sap/fe/templates/ObjectPage/designtime/StashableVBox.designtime.ts +1 -1
  50. package/src/sap/fe/templates/ObjectPage/flexibility/StashableHBox.flexibility.js +1 -1
  51. package/src/sap/fe/templates/ObjectPage/flexibility/StashableVBox.flexibility.js +1 -1
  52. package/src/sap/fe/templates/ObjectPage/overrides/IntentBasedNavigation.js +1 -1
  53. package/src/sap/fe/templates/ObjectPage/overrides/IntentBasedNavigation.ts +6 -6
  54. package/src/sap/fe/templates/ObjectPage/overrides/InternalRouting.js +1 -1
  55. package/src/sap/fe/templates/ObjectPage/overrides/InternalRouting.ts +2 -2
  56. package/src/sap/fe/templates/ObjectPage/overrides/MessageHandler.js +1 -1
  57. package/src/sap/fe/templates/ObjectPage/overrides/MessageHandler.ts +2 -2
  58. package/src/sap/fe/templates/ObjectPage/overrides/Paginator.js +1 -1
  59. package/src/sap/fe/templates/ObjectPage/overrides/Paginator.ts +1 -1
  60. package/src/sap/fe/templates/ObjectPage/overrides/Share.js +67 -41
  61. package/src/sap/fe/templates/ObjectPage/overrides/Share.ts +44 -56
  62. package/src/sap/fe/templates/ObjectPage/overrides/ViewState.js +2 -2
  63. package/src/sap/fe/templates/ObjectPage/overrides/ViewState.ts +4 -4
  64. package/src/sap/fe/templates/ObjectPage/view/fragments/Actions.fragment.xml +3 -10
  65. package/src/sap/fe/templates/ObjectPage/view/fragments/Chart.fragment.xml +13 -0
  66. package/src/sap/fe/templates/ObjectPage/view/fragments/EditableHeaderFacet.fragment.xml +15 -5
  67. package/src/sap/fe/templates/ObjectPage/view/fragments/FooterContent.fragment.xml +1 -1
  68. package/src/sap/fe/templates/ObjectPage/view/fragments/HeaderDataPoint.fragment.xml +1 -1
  69. package/src/sap/fe/templates/ObjectPage/view/fragments/HeaderFacet.fragment.xml +1 -14
  70. package/src/sap/fe/templates/ObjectPage/view/fragments/Heading.fragment.xml +2 -2
  71. package/src/sap/fe/templates/ObjectPage/view/fragments/HeadingTitle.fragment.xml +3 -0
  72. package/src/sap/fe/templates/ObjectPage/view/fragments/MacroChart.fragment.xml +22 -0
  73. package/src/sap/fe/templates/ObjectPage/view/fragments/ObjectPageHeaderAddress.fragment.xml +7 -2
  74. package/src/sap/fe/templates/ObjectPage/view/fragments/ObjectPageHeaderContact.fragment.xml +26 -0
  75. package/src/sap/fe/templates/ObjectPage/view/fragments/ObjectPageHeaderForm.fragment.xml +8 -3
  76. package/src/sap/fe/templates/ObjectPage/view/fragments/Section.fragment.xml +12 -50
  77. package/src/sap/fe/templates/ObjectPage/view/fragments/SectionContent.fragment.xml +6 -2
  78. package/src/sap/fe/templates/ObjectPage/view/fragments/SectionFormContent.fragment.xml +1 -0
  79. package/src/sap/fe/templates/ObjectPage/view/fragments/SectionMoreFormContent.fragment.xml +1 -0
  80. package/src/sap/fe/templates/ObjectPage/view/fragments/SectionPresentationVisualization.fragment.xml +1 -1
  81. package/src/sap/fe/templates/ObjectPage/view/fragments/Table.fragment.xml +23 -0
  82. package/src/sap/fe/templates/RootContainer/controller/Fcl.controller.js +26 -29
  83. package/src/sap/fe/templates/RootContainer/controller/Fcl.controller.ts +30 -33
  84. package/src/sap/fe/templates/RootContainer/controller/NavContainer.controller.js +4 -5
  85. package/src/sap/fe/templates/RootContainer/controller/NavContainer.controller.ts +4 -5
  86. package/src/sap/fe/templates/RootContainer/controller/RootContainerBaseController.js +141 -53
  87. package/src/sap/fe/templates/RootContainer/controller/RootContainerBaseController.ts +108 -54
  88. package/src/sap/fe/templates/RootContainer/overrides/EditFlow.js +1 -1
  89. package/src/sap/fe/templates/RootContainer/overrides/EditFlow.ts +3 -3
  90. package/src/sap/fe/templates/TableScroller.js +3 -3
  91. package/src/sap/fe/templates/TableScroller.ts +2 -2
  92. package/src/sap/fe/templates/library.js +7 -3
  93. package/src/sap/fe/templates/library.ts +5 -0
  94. package/src/sap/fe/templates/messagebundle.properties +7 -22
  95. package/src/sap/fe/templates/messagebundle_ar.properties +3 -12
  96. package/src/sap/fe/templates/messagebundle_bg.properties +2 -11
  97. package/src/sap/fe/templates/messagebundle_ca.properties +2 -11
  98. package/src/sap/fe/templates/messagebundle_cs.properties +3 -12
  99. package/src/sap/fe/templates/messagebundle_cy.properties +2 -11
  100. package/src/sap/fe/templates/messagebundle_da.properties +3 -12
  101. package/src/sap/fe/templates/messagebundle_de.properties +2 -11
  102. package/src/sap/fe/templates/messagebundle_el.properties +2 -11
  103. package/src/sap/fe/templates/messagebundle_en.properties +2 -11
  104. package/src/sap/fe/templates/messagebundle_en_GB.properties +2 -11
  105. package/src/sap/fe/templates/messagebundle_en_US_sappsd.properties +2 -11
  106. package/src/sap/fe/templates/messagebundle_en_US_saprigi.properties +2 -11
  107. package/src/sap/fe/templates/messagebundle_en_US_saptrc.properties +2 -11
  108. package/src/sap/fe/templates/messagebundle_es.properties +0 -9
  109. package/src/sap/fe/templates/messagebundle_es_MX.properties +2 -11
  110. package/src/sap/fe/templates/messagebundle_et.properties +0 -9
  111. package/src/sap/fe/templates/messagebundle_fi.properties +2 -11
  112. package/src/sap/fe/templates/messagebundle_fr.properties +3 -12
  113. package/src/sap/fe/templates/messagebundle_fr_CA.properties +2 -11
  114. package/src/sap/fe/templates/messagebundle_hi.properties +2 -11
  115. package/src/sap/fe/templates/messagebundle_hr.properties +2 -11
  116. package/src/sap/fe/templates/messagebundle_hu.properties +2 -11
  117. package/src/sap/fe/templates/messagebundle_id.properties +2 -11
  118. package/src/sap/fe/templates/messagebundle_it.properties +2 -11
  119. package/src/sap/fe/templates/messagebundle_iw.properties +2 -11
  120. package/src/sap/fe/templates/messagebundle_ja.properties +2 -11
  121. package/src/sap/fe/templates/messagebundle_kk.properties +2 -11
  122. package/src/sap/fe/templates/messagebundle_ko.properties +2 -11
  123. package/src/sap/fe/templates/messagebundle_lt.properties +2 -11
  124. package/src/sap/fe/templates/messagebundle_lv.properties +2 -11
  125. package/src/sap/fe/templates/messagebundle_ms.properties +2 -11
  126. package/src/sap/fe/templates/messagebundle_nl.properties +2 -11
  127. package/src/sap/fe/templates/messagebundle_no.properties +0 -9
  128. package/src/sap/fe/templates/messagebundle_pl.properties +0 -9
  129. package/src/sap/fe/templates/messagebundle_pt.properties +3 -12
  130. package/src/sap/fe/templates/messagebundle_pt_PT.properties +2 -11
  131. package/src/sap/fe/templates/messagebundle_ro.properties +0 -9
  132. package/src/sap/fe/templates/messagebundle_ru.properties +2 -11
  133. package/src/sap/fe/templates/messagebundle_sh.properties +2 -11
  134. package/src/sap/fe/templates/messagebundle_sk.properties +2 -11
  135. package/src/sap/fe/templates/messagebundle_sl.properties +2 -11
  136. package/src/sap/fe/templates/messagebundle_sv.properties +2 -11
  137. package/src/sap/fe/templates/messagebundle_th.properties +1 -10
  138. package/src/sap/fe/templates/messagebundle_tr.properties +2 -11
  139. package/src/sap/fe/templates/messagebundle_uk.properties +2 -11
  140. package/src/sap/fe/templates/messagebundle_vi.properties +0 -9
  141. package/src/sap/fe/templates/messagebundle_zh_CN.properties +0 -9
  142. package/src/sap/fe/templates/messagebundle_zh_TW.properties +2 -11
  143. package/src/sap/fe/templates/ListReport/view/fragments/MultipleModeOld.fragment.xml +0 -50
  144. package/src/sap/fe/templates/ObjectPage/view/fragments/SwitchDraftAndActiveObjectPopOver.fragment.xml +0 -27
  145. package/src/sap/fe/templates/controls/Chart.fragment.xml +0 -25
@@ -1,7 +1,8 @@
1
- import ResourceBundle from "sap/base/i18n/ResourceBundle";
1
+ import type ResourceBundle from "sap/base/i18n/ResourceBundle";
2
2
  import Log from "sap/base/Log";
3
3
  import ObjectPath from "sap/base/util/ObjectPath";
4
- import DynamicPage from "sap/f/DynamicPage";
4
+ import type DynamicPage from "sap/f/DynamicPage";
5
+ import ActionRuntime from "sap/fe/core/ActionRuntime";
5
6
  import CommonUtils from "sap/fe/core/CommonUtils";
6
7
  import EditFlow from "sap/fe/core/controllerextensions/EditFlow";
7
8
  import IntentBasedNavigation from "sap/fe/core/controllerextensions/IntentBasedNavigation";
@@ -13,7 +14,7 @@ import Placeholder from "sap/fe/core/controllerextensions/Placeholder";
13
14
  import Share from "sap/fe/core/controllerextensions/Share";
14
15
  import SideEffects from "sap/fe/core/controllerextensions/SideEffects";
15
16
  import ViewState from "sap/fe/core/controllerextensions/ViewState";
16
- import FilterBar from "sap/fe/core/controls/FilterBar";
17
+ import type FilterBar from "sap/fe/core/controls/FilterBar";
17
18
  import {
18
19
  defineUI5Class,
19
20
  extensible,
@@ -23,6 +24,7 @@ import {
23
24
  usingExtension
24
25
  } from "sap/fe/core/helpers/ClassSupport";
25
26
  import EditState from "sap/fe/core/helpers/EditState";
27
+ import MessageStrip from "sap/fe/core/helpers/MessageStrip";
26
28
  import { InternalModelContext } from "sap/fe/core/helpers/ModelHelper";
27
29
  import CoreLibrary from "sap/fe/core/library";
28
30
  import PageController from "sap/fe/core/PageController";
@@ -31,22 +33,20 @@ import ChartUtils from "sap/fe/macros/chart/ChartUtils";
31
33
  import CommonHelper from "sap/fe/macros/CommonHelper";
32
34
  import DelegateUtil from "sap/fe/macros/DelegateUtil";
33
35
  import FilterUtils from "sap/fe/macros/filter/FilterUtils";
34
- import TableUtils from "sap/fe/macros/table/Utils";
36
+ import MultipleModeControl from "sap/fe/templates/ListReport/controls/MultipleModeControl";
35
37
  import ExtensionAPI from "sap/fe/templates/ListReport/ExtensionAPI";
36
38
  import EditFlowOverrides from "sap/fe/templates/RootContainer/overrides/EditFlow";
37
39
  import TableScroller from "sap/fe/templates/TableScroller";
38
- import IconTabBar from "sap/m/IconTabBar";
39
- import SegmentedButton from "sap/m/SegmentedButton";
40
- import Control from "sap/ui/core/Control";
41
- import Core from "sap/ui/core/Core";
40
+ import type SegmentedButton from "sap/m/SegmentedButton";
41
+ import type Control from "sap/ui/core/Control";
42
42
  import OverrideExecution from "sap/ui/core/mvc/OverrideExecution";
43
43
  import { system } from "sap/ui/Device";
44
- import ControlPersonalizationWriteAPI from "sap/ui/fl/write/api/ControlPersonalizationWriteAPI";
45
44
  import StateUtil from "sap/ui/mdc/p13n/StateUtil";
46
- import Table from "sap/ui/mdc/Table";
47
- import JSONModel from "sap/ui/model/json/JSONModel";
48
- import ResourceModel from "sap/ui/model/resource/ResourceModel";
45
+ import type Table from "sap/ui/mdc/Table";
46
+ import type JSONModel from "sap/ui/model/json/JSONModel";
47
+ import type ResourceModel from "sap/ui/model/resource/ResourceModel";
49
48
  import hasher from "sap/ui/thirdparty/hasher";
49
+ import type { V4Context } from "types/extension_types";
50
50
  import IntentBasedNavigationOverride from "./overrides/IntentBasedNavigation";
51
51
  import ShareOverrides from "./overrides/Share";
52
52
  import ViewStateOverrides from "./overrides/ViewState";
@@ -94,12 +94,9 @@ class ListReportController extends PageController {
94
94
  @usingExtension(MassEdit)
95
95
  massEdit!: MassEdit;
96
96
  private extensionAPI?: ExtensionAPI;
97
- private _oListReportControl?: Control;
98
97
  private filterBarConditions?: any;
99
- private _bMultiMode?: boolean;
100
98
  private sUpdateTimer?: any;
101
99
  private oResourceBundle?: ResourceBundle;
102
- private _sEntitySet?: string;
103
100
  private hasPendingChartChanges?: boolean;
104
101
  private hasPendingTableChanges?: boolean;
105
102
 
@@ -114,21 +111,7 @@ class ListReportController extends PageController {
114
111
 
115
112
  onInit() {
116
113
  PageController.prototype.onInit.apply(this);
117
- const aControls = this._getControls();
118
114
  const oInternalModelContext = this.getView().getBindingContext("internal") as InternalModelContext;
119
- if (this._isMultiMode()) {
120
- const oMultiModeTab = this._getMultiModeControl();
121
- oInternalModelContext.setProperty("tabs", {
122
- selected: oMultiModeTab.getSelectedKey() || (oMultiModeTab.getItems()[0] as any).getKey()
123
- });
124
- aControls.forEach((oControl: any) => {
125
- const oUpdateCounts = () => {
126
- this._updateCounts();
127
- };
128
- CommonUtils.addEventToBindingInfo(oControl, "dataRequested", oUpdateCounts);
129
- });
130
- }
131
- //TODO: This is only a temporary approach and will be removed once app state behaviour is finalized.
132
115
 
133
116
  oInternalModelContext.setProperty("hasPendingFilters", true);
134
117
  oInternalModelContext.setProperty("appliedFilters", "");
@@ -154,22 +137,22 @@ class ListReportController extends PageController {
154
137
  // happen after the routeMatch event has been processed (otherwise the router gets broken)
155
138
  this.getAppComponent().getRouterProxy().waitForRouteMatchBeforeNavigation();
156
139
 
157
- this._isMultiMode() && this._updateMultiControlHiddenStatus();
158
-
159
140
  // Configure the initial load settings
160
141
  this._setInitLoad();
161
142
  }
162
143
 
163
144
  onExit() {
164
145
  delete this.filterBarConditions;
165
- delete this._oListReportControl;
166
- this.extensionAPI && this.extensionAPI.destroy();
146
+ if (this.extensionAPI) {
147
+ this.extensionAPI.destroy();
148
+ }
167
149
  delete this.extensionAPI;
168
150
  }
169
151
 
170
152
  _onAfterBinding() {
171
153
  const aTables = this._getControls("table");
172
154
  if (EditState.isEditStateDirty()) {
155
+ this._getMultiModeControl()?.invalidateContent();
173
156
  const oTableBinding = this._getTableBinding();
174
157
  if (oTableBinding) {
175
158
  if (CommonUtils.getAppComponent(this.getView())._isFclEnabled()) {
@@ -179,10 +162,6 @@ class ListReportController extends PageController {
179
162
  if (!this.sUpdateTimer) {
180
163
  this.sUpdateTimer = setTimeout(() => {
181
164
  oTableBinding.refresh();
182
- if (this._isMultiMode()) {
183
- this._setCountsOutDated();
184
- this._updateCounts();
185
- }
186
165
  delete this.sUpdateTimer;
187
166
  }, 0);
188
167
  }
@@ -253,7 +232,7 @@ class ListReportController extends PageController {
253
232
  * or when a tab with custom content is selected.
254
233
  * This method can be overwritten by the controller extension in case of customization.
255
234
  *
256
- * @param {map} mParameters Map containing the filter conditions of the FilterBar, the currentTabID
235
+ * @param mParameters Map containing the filter conditions of the FilterBar, the currentTabID
257
236
  * and the view refresh cause (tabChanged or search).
258
237
  * The map looks like this:
259
238
  * <code><pre>
@@ -273,7 +252,6 @@ class ListReportController extends PageController {
273
252
  * refreshCause: "tabChanged" | "search"
274
253
  * }
275
254
  * </pre></code>
276
- *
277
255
  * @public
278
256
  */
279
257
  @publicExtension()
@@ -298,15 +276,14 @@ class ListReportController extends PageController {
298
276
  }
299
277
 
300
278
  getCurrentEntitySet() {
301
- if (!this._sEntitySet) {
302
- const oDisplayedControl = (this._isMultiMode() && this._getCurrentControl()) || this._getTable();
303
- this._sEntitySet = oDisplayedControl?.data("targetCollectionPath").slice(1);
304
- }
305
- return this._sEntitySet;
279
+ return this._isMultiMode()
280
+ ? this._getMultiModeControl()?.getDisplayedEntitySet()
281
+ : this._getTable()?.data("targetCollectionPath").slice(1);
306
282
  }
307
283
 
308
284
  /**
309
285
  * This method initiates the update of the enabled state of the DataFieldForAction and the visible state of the DataFieldForIBN buttons.
286
+ *
310
287
  * @param aTables Array of tables in the list report
311
288
  * @private
312
289
  */
@@ -318,11 +295,11 @@ class ListReportController extends PageController {
318
295
  // The same is also performed on Table selectionChange event
319
296
  const oInternalModelContext = oTable.getBindingContext("internal"),
320
297
  oActionOperationAvailableMap = JSON.parse(
321
- CommonHelper.parseCustomData(DelegateUtil.getCustomData(oTable, "operationAvailableMap")) as any
298
+ CommonHelper.parseCustomData(DelegateUtil.getCustomData(oTable, "operationAvailableMap"))
322
299
  ),
323
300
  aSelectedContexts = oTable.getSelectedContexts();
324
301
 
325
- CommonUtils.setActionEnablement(oInternalModelContext, oActionOperationAvailableMap, aSelectedContexts);
302
+ ActionRuntime.setActionEnablement(oInternalModelContext, oActionOperationAvailableMap, aSelectedContexts, "table");
326
303
  });
327
304
  CommonUtils.updateDataFieldForIBNButtonsVisibility(aIBNActions, this.getView());
328
305
  }
@@ -332,7 +309,7 @@ class ListReportController extends PageController {
332
309
  *
333
310
  * @function
334
311
  * @name sap.fe.templates.ListReport.ListReportController.controller#_scrollTablesToRow
335
- * @param {string} sRowPath The path of the table row context to be scrolled to
312
+ * @param sRowPath The path of the table row context to be scrolled to
336
313
  */
337
314
  _scrollTablesToRow(sRowPath: string) {
338
315
  this._getControls("table").forEach(function (oTable: any) {
@@ -349,7 +326,7 @@ class ListReportController extends PageController {
349
326
 
350
327
  _getPageOrFilterBarVariantManagement() {
351
328
  return (
352
- this.getView().byId("fe::PageVariantManagement") || this.getView().byId(this._getFilterBarControlId() + "::VariantManagement")
329
+ this.getView().byId("fe::PageVariantManagement") || this.getView().byId(`${this._getFilterBarControlId()}::VariantManagement`)
353
330
  );
354
331
  }
355
332
 
@@ -397,27 +374,17 @@ class ListReportController extends PageController {
397
374
  }
398
375
 
399
376
  _getMultiModeControl() {
400
- return this.getView().byId("fe::TabMultipleMode") as IconTabBar;
377
+ return this.getView().byId("fe::TabMultipleMode::Control") as MultipleModeControl;
401
378
  }
402
379
 
403
380
  _getTableControlId() {
404
381
  return this.getView().getContent()[0].data("singleTableId");
405
382
  }
406
383
 
407
- _getCurrentControl(): Control {
408
- if (!this._oListReportControl) {
409
- const oMultiModeTab = this._getMultiModeControl();
410
- this._oListReportControl = this.getView().byId(
411
- oMultiModeTab.getSelectedKey() || (oMultiModeTab.getItems()[0] as any).getKey()
412
- ) as Control;
413
- }
414
- return this._oListReportControl as Control;
415
- }
416
-
417
384
  _getTable(): Table | undefined {
418
385
  if (this._isMultiMode()) {
419
- const oControl = this._getCurrentControl();
420
- return oControl && oControl.isA("sap.ui.mdc.Table") ? (oControl as Table) : undefined;
386
+ const oControl = this._getMultiModeControl()?.getSelectedInnerControl()?.content;
387
+ return oControl?.isA("sap.ui.mdc.Table") ? (oControl as Table) : undefined;
421
388
  }
422
389
  return this.getView().byId(this._getTableControlId()) as Table;
423
390
  }
@@ -428,23 +395,21 @@ class ListReportController extends PageController {
428
395
 
429
396
  _getTableBinding(sTableId?: any) {
430
397
  const oTableControl = sTableId ? this.getView().byId(sTableId) : this._getTable();
431
- const oBinding = oTableControl && (oTableControl as any)._getRowBinding();
432
-
433
- return oBinding;
398
+ return oTableControl && (oTableControl as any)._getRowBinding();
434
399
  }
435
400
 
436
401
  _getControls(sKey?: any) {
437
402
  if (this._isMultiMode()) {
438
403
  const aControls: any[] = [];
439
- const oTabMultiMode = this._getMultiModeControl();
404
+ const oTabMultiMode = this._getMultiModeControl().content;
440
405
  oTabMultiMode.getItems().forEach((oItem: any) => {
441
406
  const oControl = this.getView().byId(oItem.getKey());
442
- if (sKey) {
443
- if (oItem.getKey().indexOf("fe::" + sKey) > -1) {
444
- oControl && aControls.push(oControl);
407
+ if (oControl && sKey) {
408
+ if (oItem.getKey().indexOf(`fe::${sKey}`) > -1) {
409
+ aControls.push(oControl);
445
410
  }
446
- } else {
447
- oControl && aControls.push(oControl);
411
+ } else if (oControl) {
412
+ aControls.push(oControl);
448
413
  }
449
414
  });
450
415
  return aControls;
@@ -475,13 +440,10 @@ class ListReportController extends PageController {
475
440
  *
476
441
  * @function
477
442
  * @name _isMultiMode
478
- * @returns {boolean} Is Multiple Table mode set?
443
+ * @returns Is Multiple Table mode set?
479
444
  */
480
- _isMultiMode() {
481
- if (!this._oListReportControl) {
482
- this._bMultiMode = !!this._getMultiModeControl();
483
- }
484
- return this._bMultiMode;
445
+ _isMultiMode(): boolean {
446
+ return !!this.getView().getModel("_pageModel")?.getProperty("/multiViewsControl");
485
447
  }
486
448
 
487
449
  /**
@@ -489,24 +451,13 @@ class ListReportController extends PageController {
489
451
  *
490
452
  * @function
491
453
  * @name _isInitLoadDisabled
492
- * @returns {boolean} Is InitLoad enabled?
454
+ * @returns Is InitLoad enabled?
493
455
  */
494
456
  _isInitLoadEnabled() {
495
457
  const initLoadMode = (this.getView().getViewData() as any).initialLoad;
496
458
  return initLoadMode === InitialLoadMode.Enabled;
497
459
  }
498
460
 
499
- /**
500
- * Method to know if ListReport is configured with Multiple EntitySets.
501
- *
502
- * @function
503
- * @name _isMultiEntitySets
504
- * @returns {boolean} Is Multiple EntitySets configuration?
505
- */
506
- _isMultiEntitySets() {
507
- return this.getView().getContent()[0].data("isMultiEntitySets") === "true";
508
- }
509
-
510
461
  _hasMultiVisualizations() {
511
462
  return this.getView().getContent()[0].data("hasMultiVisualizations") === "true";
512
463
  }
@@ -567,7 +518,7 @@ class ListReportController extends PageController {
567
518
  bookmarkTitle: document.title, //To name the bookmark according to the app title.
568
519
  bookmarkCustomUrl: function () {
569
520
  const sHash = hasher.getHash();
570
- return sHash ? "#" + sHash : window.location.href;
521
+ return sHash ? `#${sHash}` : window.location.href;
571
522
  },
572
523
  /*
573
524
  To be activated once the FLP shows the count - see comment above
@@ -584,75 +535,13 @@ class ListReportController extends PageController {
584
535
  oTemplatePrivateModel.setProperty("/listReport/share", oShareInfo);
585
536
  }
586
537
 
587
- /**
588
- * Hidden tables must be marked as hidden to avoid sending
589
- * requests when FilterBar is changed or LR is initialized
590
- * Best workflow would be to suspend table binding but
591
- * if the user switch quickly between tabs the batch response of previous
592
- * is received when previous tab is already disabled (binding is suspended) and
593
- * generates error.
594
- * A temporary solution (if we find better workflow) is to set a customData and don't trigger
595
- * rebindTable if this customData is set to true.
596
- */
597
- _updateMultiControlHiddenStatus() {
598
- const oDisplayedControl = this._getCurrentControl();
599
- if (this._isMultiMode() && oDisplayedControl) {
600
- const sDisplayControlId = oDisplayedControl.getId();
601
- const aControls = this._getControls();
602
- aControls.forEach(function (oControl: any) {
603
- const sControlId = oControl.getId();
604
- oControl.data("controlHidden", sControlId !== sDisplayControlId);
605
- });
606
- }
607
- }
608
-
609
- /**
610
- * Method to update the local UI model of the page with the fields that are not applicable to the filter bar (this is specific to the multiple table scenario).
611
- *
612
- * @param {sap.ui.model.context} oInternalModelContext The internal model context
613
- * @param {sap.ui.mdc.FilterBar} oFilterBar MDC filter bar
614
- */
615
- _updateMultiTabNotApplicableFields(oInternalModelContext: any, oFilterBar: any) {
616
- const mCache: any = {};
617
- const ignoredFields: any = {},
618
- ignoredFieldsTitle: any = {},
619
- aTables = this._getControls("table"),
620
- aCharts = this._getControls("Chart");
621
- aTables.forEach((oTable: any) => {
622
- const sTableEntityPath = oTable.data("targetCollectionPath"),
623
- sTableEntitySet = sTableEntityPath.slice(1),
624
- sTabId = oTable.getParent().getParent().getKey(),
625
- sTabTitle = oTable.getParent().getParent().getText(),
626
- sCacheKey = sTableEntitySet + (oTable.data("enableAnalytics") === "true" ? "Analytical" : "Regular");
627
- if (!mCache[sCacheKey]) {
628
- mCache[sCacheKey] = FilterUtils.getNotApplicableFilters(oFilterBar, oTable);
629
- }
630
- ignoredFields[sTabId] = mCache[sCacheKey];
631
- ignoredFieldsTitle[sTabId] = this.formatters.setTabMessageStrip.call(this, mCache[sCacheKey], sTabTitle, "false", {});
632
- });
633
- aCharts.forEach((oChart: any) => {
634
- const sChartEntityPath = oChart.data("targetCollectionPath"),
635
- sChartEntitySet = sChartEntityPath.slice(1),
636
- sTabId = oChart.getParent().getParent().getKey(),
637
- sTabTitle = oChart.getParent().getParent().getText(),
638
- sCacheKey = sChartEntitySet + "Chart";
639
- if (!mCache[sCacheKey]) {
640
- mCache[sCacheKey] = FilterUtils.getNotApplicableFilters(oFilterBar, oChart);
641
- }
642
- ignoredFields[sTabId] = mCache[sCacheKey];
643
- ignoredFieldsTitle[sTabId] = this.formatters.setTabMessageStrip.call(this, mCache[sCacheKey], sTabTitle, "false", {});
644
- });
645
- oInternalModelContext.setProperty("tabs/ignoredFields", ignoredFields);
646
- oInternalModelContext.setProperty("tabs/ignoredFieldsTitle", ignoredFieldsTitle);
647
- }
648
-
649
538
  /**
650
539
  * Method to update the local UI model of the page with the fields that are not applicable to the filter bar (this is specific to the ALP scenario).
651
540
  *
652
- * @param {sap.ui.model.context} oInternalModelContext The internal model context
653
- * @param {sap.ui.mdc.FilterBar} oFilterBar MDC filter bar
541
+ * @param oInternalModelContext The internal model context
542
+ * @param oFilterBar MDC filter bar
654
543
  */
655
- _updateALPNotApplicableFields(oInternalModelContext: any, oFilterBar: any) {
544
+ _updateALPNotApplicableFields(oInternalModelContext: InternalModelContext, oFilterBar: FilterBar) {
656
545
  const mCache: any = {};
657
546
  const ignoredFields: any = {},
658
547
  aTables = this._getControls("table"),
@@ -667,7 +556,7 @@ class ListReportController extends PageController {
667
556
  aCharts.forEach(function (oChart: any) {
668
557
  const sChartEntityPath = oChart.data("targetCollectionPath"),
669
558
  sChartEntitySet = sChartEntityPath.slice(1),
670
- sCacheKey = sChartEntitySet + "Chart";
559
+ sCacheKey = `${sChartEntitySet}Chart`;
671
560
  if (!mCache[sCacheKey]) {
672
561
  mCache[sCacheKey] = FilterUtils.getNotApplicableFilters(oFilterBar, oChart);
673
562
  }
@@ -676,88 +565,19 @@ class ListReportController extends PageController {
676
565
  oInternalModelContext.setProperty("controls/ignoredFields", ignoredFields);
677
566
  }
678
567
 
679
- _updateMultiModeSelectedControl() {
680
- this._sEntitySet = undefined;
681
- this._oListReportControl = undefined;
682
- this._getCurrentControl();
683
- }
684
-
685
- _updateCounts() {
686
- this._updateMultiModeCounts();
687
- }
688
-
689
- /**
690
- * Method to determine if a tab from the list report is a custom tab.
691
- *
692
- * @function
693
- * @name _isCustomTab
694
- * @returns {boolean} Determines if the tab is a custom tab.
695
- */
696
- _isCustomTab() {
697
- const oMultiModeControl = this._getMultiModeControl();
698
- return oMultiModeControl && oMultiModeControl.getSelectedKey().indexOf("::CustomTab::") > -1;
699
- }
700
-
701
- _setCountsOutDated() {
702
- const oMultiModeControl = this._getMultiModeControl();
703
- if (oMultiModeControl && oMultiModeControl.data("showCounts") === "true") {
704
- const aItems = oMultiModeControl.getItems();
705
- aItems.forEach(function (oItem: any) {
706
- if (oItem.getKey().indexOf("fe::Chart") === -1) {
707
- oItem.data("outdatedCounts", true);
708
- }
709
- });
710
- }
568
+ _isFilterBarHidden() {
569
+ return (this.getView().getViewData() as any).hideFilterBar;
711
570
  }
712
571
 
713
- _updateMultiModeCounts() {
714
- let aBindingPromises = [];
715
- const oMultiModeControl = this._getMultiModeControl();
716
- if (oMultiModeControl && oMultiModeControl.data("showCounts") === "true" && !this._isCustomTab()) {
717
- const oDisplayedControl = this._getCurrentControl();
718
- const sDisplayedControlId = oDisplayedControl.getId();
719
- const aCompliantTabs: any[] = [];
720
- const aItems = oMultiModeControl.getItems();
721
- aItems.forEach((oItem: any) => {
722
- const oControl = this.getView().byId(oItem.getKey());
723
- if (
724
- oControl &&
725
- !oControl.isA("sap.ui.mdc.Chart") &&
726
- (oItem.data("outdatedCounts") || oControl.getId() === sDisplayedControlId)
727
- ) {
728
- aCompliantTabs.push({
729
- control: oControl,
730
- item: oItem
731
- });
732
- }
733
- });
734
-
735
- aBindingPromises = aCompliantTabs.map((mTab: any) => {
736
- mTab.item.setCount("...");
737
- const oControl = mTab.control;
738
- const oFilterInfos = TableUtils.getFiltersInfoForSV(oControl, mTab.item.data("selectionVariant")) as any;
739
- return TableUtils.getListBindingForCount(oControl, this.getView().getBindingContext(), {
740
- batchGroupId: oControl.getId() === sDisplayedControlId ? oControl.data("batchGroupId") : "$auto",
741
- additionalFilters: oFilterInfos.filters
742
- });
743
- });
744
-
745
- Promise.all(aBindingPromises)
746
- .then(function (aCounts: any[]) {
747
- for (const k in aCounts) {
748
- const oItem = aCompliantTabs[k].item;
749
- oItem.setCount(TableUtils.getCountFormatted(aCounts[k]));
750
- oItem.data("outdatedCounts", false);
751
- }
752
- })
753
- .catch(function (oError: any) {
754
- Log.error("Error while retrieving the values for the icon tab bar", oError);
755
- });
572
+ _getApplyAutomaticallyOnVariant(VariantManagement: any, key: string): Boolean {
573
+ if (!VariantManagement || !key) {
574
+ return false;
756
575
  }
757
- }
758
-
759
- _isFilterBarHidden() {
760
- return (this.getView().getViewData() as any).hideFilterBar;
576
+ const variants = VariantManagement.getVariants();
577
+ const currentVariant = variants.find(function (variant: any) {
578
+ return variant && variant.key === key;
579
+ });
580
+ return (currentVariant && currentVariant.executeOnSelect) || false;
761
581
  }
762
582
 
763
583
  _shouldAutoTriggerSearch(oVM: any) {
@@ -799,64 +619,6 @@ class ListReportController extends PageController {
799
619
  }
800
620
 
801
621
  handlers = {
802
- onTabMultiModeChange(this: ListReportController, oEvent: any) {
803
- this._updateMultiModeSelectedControl();
804
- this._updateMultiControlHiddenStatus();
805
-
806
- const oFilterBar = this._getFilterBarControl();
807
- const oInternalModelContext = this.getView().getBindingContext("internal") as InternalModelContext;
808
- const oDisplayedControl = this._getCurrentControl() as any;
809
- const oMultiModeControl = this._getMultiModeControl();
810
- const sSelectedKey = oMultiModeControl.getSelectedKey();
811
- const sPreviousSelectedKey = oEvent && oEvent.mParameters ? oEvent.mParameters.previousKey : undefined;
812
-
813
- oInternalModelContext.setProperty("tabs/selected", sSelectedKey);
814
- if (oInternalModelContext.getProperty("hasPendingFilters") !== true) {
815
- // No pending filters into FilterBar
816
- if (oFilterBar && this._isCustomTab()) {
817
- const oFilterConditions = oFilterBar.getFilterConditions();
818
- this.onViewNeedsRefresh({
819
- filterConditions: oFilterConditions,
820
- currentTabId: sSelectedKey,
821
- refreshCause: "tabChanged"
822
- });
823
- } else if (
824
- !oDisplayedControl.isA("sap.ui.mdc.Chart") &&
825
- (!oDisplayedControl.getRowBinding() || // first time the tab/table is displayed
826
- oDisplayedControl.data("outdatedRows") === true)
827
- ) {
828
- // Search has been triggered on a different tab {}
829
- oDisplayedControl.rebind();
830
- oDisplayedControl.data("outdatedRows", false);
831
- } else if (
832
- oDisplayedControl.isA("sap.ui.mdc.Chart") &&
833
- (!oDisplayedControl.getControlDelegate()._getChart(oDisplayedControl).getBinding("data") || // first time the tab/chart is displayed
834
- oDisplayedControl.data("outdatedRows") === true)
835
- ) {
836
- const oInnerChart = oDisplayedControl.getControlDelegate()._getChart(oDisplayedControl);
837
- oDisplayedControl.getControlDelegate().rebind(oDisplayedControl, oInnerChart.getBindingInfo("data"));
838
- oDisplayedControl.data("outdatedRows", false);
839
- }
840
- }
841
-
842
- if (oEvent && oEvent.mParameters && sPreviousSelectedKey !== oEvent.mParameters.selectedKey) {
843
- ControlPersonalizationWriteAPI.add({
844
- changes: [
845
- {
846
- changeSpecificData: {
847
- changeType: "selectIconTabBarFilter",
848
- content: {
849
- selectedKey: sSelectedKey,
850
- previousSelectedKey: sPreviousSelectedKey
851
- }
852
- },
853
- selectorElement: oMultiModeControl
854
- }
855
- ]
856
- });
857
- }
858
- this.getExtensionAPI().updateAppState();
859
- },
860
622
  onFiltersChanged(this: ListReportController, oEvent: any) {
861
623
  const oFilterBar = this._getFilterBarControl();
862
624
  if (oFilterBar) {
@@ -871,15 +633,17 @@ class ListReportController extends PageController {
871
633
  },
872
634
  onVariantSelected(this: ListReportController, oEvent: any) {
873
635
  const oVM = oEvent.getSource();
636
+ const currentVariantKey = oEvent.getParameter("key");
637
+ const oMultiModeControl = this._getMultiModeControl();
638
+
639
+ oMultiModeControl?.invalidateContent();
640
+ oMultiModeControl?.setFreezeContent(true);
874
641
  // setTimeout cause the variant needs to be applied before judging the auto search or updating the app state
875
642
  setTimeout(() => {
876
- if (this._isMultiMode()) {
877
- (this.handlers as any).onTabMultiModeChange.apply(this, [oEvent]);
878
- }
879
643
  if (this._shouldAutoTriggerSearch(oVM)) {
880
644
  // the app state will be updated via onSearch handler
881
645
  return this._getFilterBarControl().triggerSearch();
882
- } else {
646
+ } else if (!this._getApplyAutomaticallyOnVariant(oVM, currentVariantKey)) {
883
647
  this.getExtensionAPI().updateAppState();
884
648
  }
885
649
  }, 0);
@@ -897,28 +661,8 @@ class ListReportController extends PageController {
897
661
  const bHideDraft = FilterUtils.getEditStateIsHideDraft(oFilterBar.getConditions());
898
662
  oInternalModelContext.setProperty("hasPendingFilters", false);
899
663
  oInternalModelContext.setProperty("hideDraftInfo", bHideDraft);
900
- if (this._isMultiMode()) {
901
- const aControls = this._getControls(),
902
- oMultiModeControl = this._getMultiModeControl();
903
- this._setCountsOutDated();
904
- if (!this._isCustomTab()) {
905
- const sDisplayedControlId = this._getCurrentControl().getId();
906
- this._updateMultiTabNotApplicableFields(oInternalModelContext, oFilterBar);
907
- // This should be done outside the search event handler of the filter bar.
908
- // The same logic is required when filter bar is hidden and multiple tables exist on the LR.
909
- // This is currently done in ListReport/overrides/ViewState.js#onAfterStateApplied()
910
- aControls.forEach(function (oControl: any) {
911
- oControl.data("outdatedRows", oControl.getId() !== sDisplayedControlId);
912
- });
913
- } else {
914
- const oFilterConditions = oFilterBar.getFilterConditions();
915
- this.onViewNeedsRefresh({
916
- filterConditions: oFilterConditions,
917
- currentTabId: oMultiModeControl.getSelectedKey(),
918
- refreshCause: "search"
919
- });
920
- }
921
- } else {
664
+
665
+ if (!this._getMultiModeControl()) {
922
666
  this._updateALPNotApplicableFields(oInternalModelContext, oFilterBar);
923
667
  }
924
668
  if (oMdcChart) {
@@ -926,7 +670,7 @@ class ListReportController extends PageController {
926
670
  (oMdcChart.getBindingContext("internal") as InternalModelContext).setProperty("", {});
927
671
 
928
672
  const oPageInternalModelContext = oMdcChart.getBindingContext("pageInternal") as InternalModelContext;
929
- const sTemplateContentView = oPageInternalModelContext.getProperty(oPageInternalModelContext.getPath() + "/alpContentView");
673
+ const sTemplateContentView = oPageInternalModelContext.getProperty(`${oPageInternalModelContext.getPath()}/alpContentView`);
930
674
  if (sTemplateContentView === TemplateContentView.Chart) {
931
675
  this.hasPendingChartChanges = true;
932
676
  }
@@ -954,15 +698,20 @@ class ListReportController extends PageController {
954
698
  /**
955
699
  * Triggers an outbound navigation when a user chooses the chevron.
956
700
  *
957
- * @param {object} oController
958
- * @param {string} sOutboundTarget Name of the outbound target (needs to be defined in the manifest)
959
- * @param {sap.ui.model.odata.v4.Context} oContext The context that contains the data for the target app
960
- * @param {string} sCreatePath Create path when the chevron is created.
961
- * @returns {Promise} Promise which is resolved once the navigation is triggered
701
+ * @param oController
702
+ * @param sOutboundTarget Name of the outbound target (needs to be defined in the manifest)
703
+ * @param oContext The context that contains the data for the target app
704
+ * @param sCreatePath Create path when the chevron is created.
705
+ * @returns Promise which is resolved once the navigation is triggered
962
706
  * @ui5-restricted
963
707
  * @final
964
708
  */
965
- onChevronPressNavigateOutBound(oController: ListReportController, sOutboundTarget: string, oContext: any, sCreatePath: string) {
709
+ onChevronPressNavigateOutBound(
710
+ oController: ListReportController,
711
+ sOutboundTarget: string,
712
+ oContext: V4Context,
713
+ sCreatePath: string
714
+ ) {
966
715
  return oController._intentBasedNavigation.onChevronPressNavigateOutBound(oController, sOutboundTarget, oContext, sCreatePath);
967
716
  },
968
717
  onChartSelectionChanged(this: ListReportController, oEvent: any) {
@@ -976,11 +725,11 @@ class ListReportController extends PageController {
976
725
  // update selections on selection or deselection
977
726
  ChartUtils.setChartFilters(oMdcChart);
978
727
  }
979
- const sTemplateContentView = oInternalModelContext.getProperty(oInternalModelContext.getPath() + "/alpContentView");
728
+ const sTemplateContentView = oInternalModelContext.getProperty(`${oInternalModelContext.getPath()}/alpContentView`);
980
729
  if (sTemplateContentView === TemplateContentView.Chart) {
981
730
  this.hasPendingChartChanges = true;
982
- } else {
983
- oTable && (oTable as any).rebind();
731
+ } else if (oTable) {
732
+ (oTable as any).rebind();
984
733
  this.hasPendingChartChanges = false;
985
734
  }
986
735
  },
@@ -1034,53 +783,36 @@ class ListReportController extends PageController {
1034
783
  },
1035
784
  onStateChange(this: ListReportController) {
1036
785
  this.getExtensionAPI().updateAppState();
786
+ },
787
+ onDynamicPageTitleStateChanged(this: ListReportController, oEvent: any) {
788
+ const filterBar: any = this._getFilterBarControl();
789
+ if (filterBar && filterBar.getSegmentedButton()) {
790
+ if (oEvent.getParameter("isExpanded")) {
791
+ filterBar.getSegmentedButton().setVisible(true);
792
+ } else {
793
+ filterBar.getSegmentedButton().setVisible(false);
794
+ }
795
+ }
1037
796
  }
1038
797
  };
1039
798
  formatters = {
1040
- /**
1041
- * Method to set the message text for the multiple entity sets when fields in the FilterBar need to be ignored.
1042
- *
1043
- * @param this
1044
- * @param {Array} aIgnoredFields Array of ignored fields in the FilterBar for the current tab (multiple entity sets)
1045
- * @param {string} sTabTitle Tab title
1046
- * @param {boolean} bIsChart Flag that indicates whether the control is a chart or not
1047
- * @param {object} oApplySupported ApplySupported for the control
1048
- * @returns {string} Message text
1049
- */
1050
- setTabMessageStrip(this: ListReportController, aIgnoredFields: any[], sTabTitle: string, bIsChart?: any, oApplySupported?: any) {
799
+ setALPControlMessageStrip(this: ListReportController, aIgnoredFields: any[], bIsChart: any, oApplySupported?: any) {
1051
800
  let sText = "";
1052
801
  bIsChart = bIsChart === "true" || bIsChart === true;
1053
802
  const oFilterBar = this._getFilterBarControl();
1054
- if (oFilterBar && Array.isArray(aIgnoredFields) && aIgnoredFields.length > 0 && (sTabTitle || bIsChart)) {
1055
- const sFilterBarEntityPath = oFilterBar.data("entityType"),
1056
- oMetaModel = this.getView().getModel().getMetaModel(),
1057
- oResourceBundle = Core.getLibraryResourceBundle("sap.fe.templates") as ResourceBundle,
1058
- aIgnoredLabels = aIgnoredFields.map(function (sProperty) {
1059
- const oMacroResourceBundle = Core.getLibraryResourceBundle("sap.fe.macros") as ResourceBundle;
1060
- if (sProperty === "$search") {
1061
- return oMacroResourceBundle ? oMacroResourceBundle.getText("M_FILTERBAR_SEARCH") : "";
1062
- }
1063
- if (sProperty === "$editState") {
1064
- return oMacroResourceBundle ? oMacroResourceBundle.getText("M_COMMON_FILTERBAR_EDITING_STATUS") : "";
1065
- }
1066
- const sLabel = oMetaModel.getObject(sFilterBarEntityPath + sProperty + "@com.sap.vocabularies.Common.v1.Label");
1067
- return DelegateUtil.getLocalizedText(sLabel, oFilterBar);
1068
- });
803
+ if (oFilterBar && Array.isArray(aIgnoredFields) && aIgnoredFields.length > 0 && bIsChart) {
804
+ const aIgnoredLabels = MessageStrip.getLabels(
805
+ aIgnoredFields,
806
+ oFilterBar.data("entityType"),
807
+ oFilterBar,
808
+ this.oResourceBundle as ResourceBundle
809
+ );
1069
810
  const bIsSearchIgnored = !oApplySupported.enableSearch;
1070
- if (oResourceBundle) {
1071
- sText = CommonUtils.getMessageStripText(
1072
- this.getView(),
1073
- aIgnoredLabels,
1074
- oFilterBar,
1075
- bIsChart,
1076
- bIsSearchIgnored,
1077
- sTabTitle,
1078
- oResourceBundle,
1079
- DelegateUtil.getLocalizedText
1080
- );
1081
- }
811
+ sText = bIsChart
812
+ ? MessageStrip.getALPText(aIgnoredLabels, oFilterBar, bIsSearchIgnored)
813
+ : MessageStrip.getText(aIgnoredLabels, oFilterBar, "", DelegateUtil.getLocalizedText);
814
+ return sText;
1082
815
  }
1083
- return sText;
1084
816
  }
1085
817
  };
1086
818
  }