@sapui5/sap.fe.templates 1.103.0 → 1.104.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.
- package/package.json +3 -4
- package/src/sap/fe/templates/.library +1 -1
- package/src/sap/fe/templates/ListReport/ListReport.view.xml +1 -2
- package/src/sap/fe/templates/ListReport/ListReportController.controller.js +60 -296
- package/src/sap/fe/templates/ListReport/ListReportController.controller.ts +52 -264
- package/src/sap/fe/templates/ListReport/controls/MultipleModeControl.js +367 -0
- package/src/sap/fe/templates/ListReport/controls/MultipleModeControl.ts +259 -0
- package/src/sap/fe/templates/ListReport/overrides/IntentBasedNavigation.js +16 -9
- package/src/sap/fe/templates/ListReport/overrides/IntentBasedNavigation.ts +15 -9
- package/src/sap/fe/templates/ListReport/overrides/ViewState.js +19 -27
- package/src/sap/fe/templates/ListReport/overrides/ViewState.ts +23 -27
- package/src/sap/fe/templates/ListReport/view/fragments/CollectionVisualization.fragment.xml +1 -1
- package/src/sap/fe/templates/ListReport/view/fragments/MultipleMode.fragment.js +19 -3
- package/src/sap/fe/templates/ListReport/view/fragments/MultipleMode.fragment.ts +75 -47
- package/src/sap/fe/templates/ObjectPage/ObjectPage.view.xml +1 -1
- package/src/sap/fe/templates/ObjectPage/ObjectPageController.controller.js +149 -108
- package/src/sap/fe/templates/ObjectPage/ObjectPageController.controller.ts +56 -62
- package/src/sap/fe/templates/ObjectPage/components/DraftHandlerButton.tsx +132 -0
- package/src/sap/fe/templates/ObjectPage/overrides/IntentBasedNavigation.js +1 -1
- package/src/sap/fe/templates/ObjectPage/overrides/IntentBasedNavigation.ts +1 -1
- package/src/sap/fe/templates/ObjectPage/overrides/Share.js +55 -29
- package/src/sap/fe/templates/ObjectPage/overrides/Share.ts +28 -29
- package/src/sap/fe/templates/ObjectPage/view/fragments/Actions.fragment.xml +2 -14
- package/src/sap/fe/templates/ObjectPage/view/fragments/EditableHeaderFacet.fragment.xml +5 -3
- package/src/sap/fe/templates/ObjectPage/view/fragments/FooterContent.fragment.xml +1 -1
- package/src/sap/fe/templates/controls/Table.fragment.xml +1 -1
- package/src/sap/fe/templates/library.js +4 -3
- package/src/sap/fe/templates/library.ts +2 -0
- package/src/sap/fe/templates/messagebundle.properties +2 -5
- package/src/sap/fe/templates/messagebundle_ar.properties +3 -12
- package/src/sap/fe/templates/messagebundle_bg.properties +0 -9
- package/src/sap/fe/templates/messagebundle_ca.properties +2 -11
- package/src/sap/fe/templates/messagebundle_cs.properties +3 -12
- package/src/sap/fe/templates/messagebundle_cy.properties +0 -9
- package/src/sap/fe/templates/messagebundle_da.properties +3 -12
- package/src/sap/fe/templates/messagebundle_de.properties +2 -11
- package/src/sap/fe/templates/messagebundle_el.properties +2 -11
- package/src/sap/fe/templates/messagebundle_en.properties +2 -11
- package/src/sap/fe/templates/messagebundle_en_GB.properties +2 -11
- package/src/sap/fe/templates/messagebundle_en_US_sappsd.properties +2 -11
- package/src/sap/fe/templates/messagebundle_en_US_saprigi.properties +2 -11
- package/src/sap/fe/templates/messagebundle_en_US_saptrc.properties +1 -5
- package/src/sap/fe/templates/messagebundle_es.properties +0 -9
- package/src/sap/fe/templates/messagebundle_es_MX.properties +2 -11
- package/src/sap/fe/templates/messagebundle_et.properties +0 -9
- package/src/sap/fe/templates/messagebundle_fi.properties +2 -11
- package/src/sap/fe/templates/messagebundle_fr.properties +3 -12
- package/src/sap/fe/templates/messagebundle_fr_CA.properties +2 -11
- package/src/sap/fe/templates/messagebundle_hi.properties +2 -11
- package/src/sap/fe/templates/messagebundle_hr.properties +2 -11
- package/src/sap/fe/templates/messagebundle_hu.properties +2 -11
- package/src/sap/fe/templates/messagebundle_id.properties +2 -11
- package/src/sap/fe/templates/messagebundle_it.properties +2 -11
- package/src/sap/fe/templates/messagebundle_iw.properties +2 -11
- package/src/sap/fe/templates/messagebundle_ja.properties +2 -11
- package/src/sap/fe/templates/messagebundle_kk.properties +2 -11
- package/src/sap/fe/templates/messagebundle_ko.properties +2 -11
- package/src/sap/fe/templates/messagebundle_lt.properties +2 -11
- package/src/sap/fe/templates/messagebundle_lv.properties +0 -9
- package/src/sap/fe/templates/messagebundle_ms.properties +2 -11
- package/src/sap/fe/templates/messagebundle_nl.properties +2 -11
- package/src/sap/fe/templates/messagebundle_no.properties +0 -9
- package/src/sap/fe/templates/messagebundle_pl.properties +0 -9
- package/src/sap/fe/templates/messagebundle_pt.properties +2 -11
- package/src/sap/fe/templates/messagebundle_pt_PT.properties +2 -11
- package/src/sap/fe/templates/messagebundle_ro.properties +0 -9
- package/src/sap/fe/templates/messagebundle_ru.properties +2 -11
- package/src/sap/fe/templates/messagebundle_sh.properties +2 -11
- package/src/sap/fe/templates/messagebundle_sk.properties +2 -11
- package/src/sap/fe/templates/messagebundle_sl.properties +2 -11
- package/src/sap/fe/templates/messagebundle_sv.properties +2 -11
- package/src/sap/fe/templates/messagebundle_th.properties +1 -10
- package/src/sap/fe/templates/messagebundle_tr.properties +2 -11
- package/src/sap/fe/templates/messagebundle_uk.properties +2 -11
- package/src/sap/fe/templates/messagebundle_vi.properties +0 -9
- package/src/sap/fe/templates/messagebundle_zh_CN.properties +0 -9
- package/src/sap/fe/templates/messagebundle_zh_TW.properties +2 -11
- package/src/sap/fe/templates/ObjectPage/handler/DraftHandler.js +0 -103
- package/src/sap/fe/templates/ObjectPage/handler/DraftHandler.ts +0 -97
- package/src/sap/fe/templates/ObjectPage/view/fragments/SwitchDraftAndActiveObjectPopOver.fragment.xml +0 -27
|
@@ -23,7 +23,8 @@ import {
|
|
|
23
23
|
usingExtension
|
|
24
24
|
} from "sap/fe/core/helpers/ClassSupport";
|
|
25
25
|
import EditState from "sap/fe/core/helpers/EditState";
|
|
26
|
-
import
|
|
26
|
+
import MessageStrip from "sap/fe/core/helpers/MessageStrip";
|
|
27
|
+
import { InternalModelContext } from "sap/fe/core/helpers/ModelHelper";
|
|
27
28
|
import CoreLibrary from "sap/fe/core/library";
|
|
28
29
|
import PageController from "sap/fe/core/PageController";
|
|
29
30
|
import ChartRuntime from "sap/fe/macros/chart/ChartRuntime";
|
|
@@ -31,14 +32,12 @@ import ChartUtils from "sap/fe/macros/chart/ChartUtils";
|
|
|
31
32
|
import CommonHelper from "sap/fe/macros/CommonHelper";
|
|
32
33
|
import DelegateUtil from "sap/fe/macros/DelegateUtil";
|
|
33
34
|
import FilterUtils from "sap/fe/macros/filter/FilterUtils";
|
|
34
|
-
import
|
|
35
|
+
import MultipleModeControl from "sap/fe/templates/ListReport/controls/MultipleModeControl";
|
|
35
36
|
import ExtensionAPI from "sap/fe/templates/ListReport/ExtensionAPI";
|
|
36
37
|
import EditFlowOverrides from "sap/fe/templates/RootContainer/overrides/EditFlow";
|
|
37
38
|
import TableScroller from "sap/fe/templates/TableScroller";
|
|
38
|
-
import type IconTabBar from "sap/m/IconTabBar";
|
|
39
39
|
import type SegmentedButton from "sap/m/SegmentedButton";
|
|
40
40
|
import type Control from "sap/ui/core/Control";
|
|
41
|
-
import Core from "sap/ui/core/Core";
|
|
42
41
|
import OverrideExecution from "sap/ui/core/mvc/OverrideExecution";
|
|
43
42
|
import { system } from "sap/ui/Device";
|
|
44
43
|
import ControlPersonalizationWriteAPI from "sap/ui/fl/write/api/ControlPersonalizationWriteAPI";
|
|
@@ -115,21 +114,7 @@ class ListReportController extends PageController {
|
|
|
115
114
|
|
|
116
115
|
onInit() {
|
|
117
116
|
PageController.prototype.onInit.apply(this);
|
|
118
|
-
const aControls = this._getControls();
|
|
119
117
|
const oInternalModelContext = this.getView().getBindingContext("internal") as InternalModelContext;
|
|
120
|
-
if (this._isMultiMode()) {
|
|
121
|
-
const oMultiModeTab = this._getMultiModeControl();
|
|
122
|
-
oInternalModelContext.setProperty("tabs", {
|
|
123
|
-
selected: oMultiModeTab.getSelectedKey() || (oMultiModeTab.getItems()[0] as any).getKey()
|
|
124
|
-
});
|
|
125
|
-
aControls.forEach((oControl: any) => {
|
|
126
|
-
const oUpdateCounts = () => {
|
|
127
|
-
this._updateCounts();
|
|
128
|
-
};
|
|
129
|
-
CommonUtils.addEventToBindingInfo(oControl, "dataRequested", oUpdateCounts);
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
//TODO: This is only a temporary approach and will be removed once app state behaviour is finalized.
|
|
133
118
|
|
|
134
119
|
oInternalModelContext.setProperty("hasPendingFilters", true);
|
|
135
120
|
oInternalModelContext.setProperty("appliedFilters", "");
|
|
@@ -155,10 +140,6 @@ class ListReportController extends PageController {
|
|
|
155
140
|
// happen after the routeMatch event has been processed (otherwise the router gets broken)
|
|
156
141
|
this.getAppComponent().getRouterProxy().waitForRouteMatchBeforeNavigation();
|
|
157
142
|
|
|
158
|
-
if (this._isMultiMode()) {
|
|
159
|
-
this._updateMultiControlHiddenStatus();
|
|
160
|
-
}
|
|
161
|
-
|
|
162
143
|
// Configure the initial load settings
|
|
163
144
|
this._setInitLoad();
|
|
164
145
|
}
|
|
@@ -175,6 +156,8 @@ class ListReportController extends PageController {
|
|
|
175
156
|
_onAfterBinding() {
|
|
176
157
|
const aTables = this._getControls("table");
|
|
177
158
|
if (EditState.isEditStateDirty()) {
|
|
159
|
+
const oMultiModeControl = this._getMultiModeControl();
|
|
160
|
+
oMultiModeControl?.invalidateContent();
|
|
178
161
|
const oTableBinding = this._getTableBinding();
|
|
179
162
|
if (oTableBinding) {
|
|
180
163
|
if (CommonUtils.getAppComponent(this.getView())._isFclEnabled()) {
|
|
@@ -184,11 +167,6 @@ class ListReportController extends PageController {
|
|
|
184
167
|
if (!this.sUpdateTimer) {
|
|
185
168
|
this.sUpdateTimer = setTimeout(() => {
|
|
186
169
|
oTableBinding.refresh();
|
|
187
|
-
if (this._isMultiMode()) {
|
|
188
|
-
this._invalidateMultipleModeContent();
|
|
189
|
-
this._setCountsOutDated();
|
|
190
|
-
this._updateCounts();
|
|
191
|
-
}
|
|
192
170
|
delete this.sUpdateTimer;
|
|
193
171
|
}, 0);
|
|
194
172
|
}
|
|
@@ -403,7 +381,7 @@ class ListReportController extends PageController {
|
|
|
403
381
|
}
|
|
404
382
|
|
|
405
383
|
_getMultiModeControl() {
|
|
406
|
-
return this.getView().byId("fe::TabMultipleMode") as
|
|
384
|
+
return this.getView().byId("fe::TabMultipleMode::Control") as MultipleModeControl;
|
|
407
385
|
}
|
|
408
386
|
|
|
409
387
|
_getTableControlId() {
|
|
@@ -412,7 +390,7 @@ class ListReportController extends PageController {
|
|
|
412
390
|
|
|
413
391
|
_getCurrentControl(): Control {
|
|
414
392
|
if (!this._oListReportControl) {
|
|
415
|
-
const oMultiModeTab = this._getMultiModeControl();
|
|
393
|
+
const oMultiModeTab = this._getMultiModeControl().content;
|
|
416
394
|
this._oListReportControl = this.getView().byId(
|
|
417
395
|
oMultiModeTab.getSelectedKey() || (oMultiModeTab.getItems()[0] as any).getKey()
|
|
418
396
|
) as Control;
|
|
@@ -440,7 +418,7 @@ class ListReportController extends PageController {
|
|
|
440
418
|
_getControls(sKey?: any) {
|
|
441
419
|
if (this._isMultiMode()) {
|
|
442
420
|
const aControls: any[] = [];
|
|
443
|
-
const oTabMultiMode = this._getMultiModeControl();
|
|
421
|
+
const oTabMultiMode = this._getMultiModeControl().content;
|
|
444
422
|
oTabMultiMode.getItems().forEach((oItem: any) => {
|
|
445
423
|
const oControl = this.getView().byId(oItem.getKey());
|
|
446
424
|
if (oControl && sKey) {
|
|
@@ -500,17 +478,6 @@ class ListReportController extends PageController {
|
|
|
500
478
|
return initLoadMode === InitialLoadMode.Enabled;
|
|
501
479
|
}
|
|
502
480
|
|
|
503
|
-
/**
|
|
504
|
-
* Method to know if ListReport is configured with Multiple EntitySets.
|
|
505
|
-
*
|
|
506
|
-
* @function
|
|
507
|
-
* @name _isMultiEntitySets
|
|
508
|
-
* @returns Is Multiple EntitySets configuration?
|
|
509
|
-
*/
|
|
510
|
-
_isMultiEntitySets() {
|
|
511
|
-
return this.getView().getContent()[0].data("isMultiEntitySets") === "true";
|
|
512
|
-
}
|
|
513
|
-
|
|
514
481
|
_hasMultiVisualizations() {
|
|
515
482
|
return this.getView().getContent()[0].data("hasMultiVisualizations") === "true";
|
|
516
483
|
}
|
|
@@ -588,68 +555,6 @@ class ListReportController extends PageController {
|
|
|
588
555
|
oTemplatePrivateModel.setProperty("/listReport/share", oShareInfo);
|
|
589
556
|
}
|
|
590
557
|
|
|
591
|
-
/**
|
|
592
|
-
* Hidden tables must be marked as hidden to avoid sending
|
|
593
|
-
* requests when FilterBar is changed or LR is initialized
|
|
594
|
-
* Best workflow would be to suspend table binding but
|
|
595
|
-
* if the user switch quickly between tabs the batch response of previous
|
|
596
|
-
* is received when previous tab is already disabled (binding is suspended) and
|
|
597
|
-
* generates error.
|
|
598
|
-
* A temporary solution (if we find better workflow) is to set a customData and don't trigger
|
|
599
|
-
* rebindTable if this customData is set to true.
|
|
600
|
-
*/
|
|
601
|
-
_updateMultiControlHiddenStatus() {
|
|
602
|
-
const oDisplayedControl = this._getCurrentControl();
|
|
603
|
-
if (this._isMultiMode() && oDisplayedControl) {
|
|
604
|
-
const sDisplayControlId = oDisplayedControl.getId();
|
|
605
|
-
const aControls = this._getControls();
|
|
606
|
-
aControls.forEach(function (oControl: any) {
|
|
607
|
-
const sControlId = oControl.getId();
|
|
608
|
-
oControl.data("controlHidden", sControlId !== sDisplayControlId);
|
|
609
|
-
});
|
|
610
|
-
}
|
|
611
|
-
}
|
|
612
|
-
|
|
613
|
-
/**
|
|
614
|
-
* 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).
|
|
615
|
-
*
|
|
616
|
-
* @param oInternalModelContext The internal model context
|
|
617
|
-
* @param oFilterBar MDC filter bar
|
|
618
|
-
*/
|
|
619
|
-
_updateMultiTabNotApplicableFields(oInternalModelContext: InternalModelContext, oFilterBar: FilterBar) {
|
|
620
|
-
const mCache: any = {};
|
|
621
|
-
const ignoredFields: any = {},
|
|
622
|
-
ignoredFieldsTitle: any = {},
|
|
623
|
-
aTables = this._getControls("table"),
|
|
624
|
-
aCharts = this._getControls("Chart");
|
|
625
|
-
aTables.forEach((oTable: any) => {
|
|
626
|
-
const sTableEntityPath = oTable.data("targetCollectionPath"),
|
|
627
|
-
sTableEntitySet = sTableEntityPath.slice(1),
|
|
628
|
-
sTabId = oTable.getParent().getParent().getKey(),
|
|
629
|
-
sTabTitle = oTable.getParent().getParent().getText(),
|
|
630
|
-
sCacheKey = sTableEntitySet + (oTable.data("enableAnalytics") === "true" ? "Analytical" : "Regular");
|
|
631
|
-
if (!mCache[sCacheKey]) {
|
|
632
|
-
mCache[sCacheKey] = FilterUtils.getNotApplicableFilters(oFilterBar, oTable);
|
|
633
|
-
}
|
|
634
|
-
ignoredFields[sTabId] = mCache[sCacheKey];
|
|
635
|
-
ignoredFieldsTitle[sTabId] = this.formatters.setTabMessageStrip.call(this, mCache[sCacheKey], sTabTitle, "false", {});
|
|
636
|
-
});
|
|
637
|
-
aCharts.forEach((oChart: any) => {
|
|
638
|
-
const sChartEntityPath = oChart.data("targetCollectionPath"),
|
|
639
|
-
sChartEntitySet = sChartEntityPath.slice(1),
|
|
640
|
-
sTabId = oChart.getParent().getParent().getKey(),
|
|
641
|
-
sTabTitle = oChart.getParent().getParent().getText(),
|
|
642
|
-
sCacheKey = `${sChartEntitySet}Chart`;
|
|
643
|
-
if (!mCache[sCacheKey]) {
|
|
644
|
-
mCache[sCacheKey] = FilterUtils.getNotApplicableFilters(oFilterBar, oChart);
|
|
645
|
-
}
|
|
646
|
-
ignoredFields[sTabId] = mCache[sCacheKey];
|
|
647
|
-
ignoredFieldsTitle[sTabId] = this.formatters.setTabMessageStrip.call(this, mCache[sCacheKey], sTabTitle, "false", {});
|
|
648
|
-
});
|
|
649
|
-
oInternalModelContext.setProperty("tabs/ignoredFields", ignoredFields);
|
|
650
|
-
oInternalModelContext.setProperty("tabs/ignoredFieldsTitle", ignoredFieldsTitle);
|
|
651
|
-
}
|
|
652
|
-
|
|
653
558
|
/**
|
|
654
559
|
* 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).
|
|
655
560
|
*
|
|
@@ -685,11 +590,6 @@ class ListReportController extends PageController {
|
|
|
685
590
|
this._oListReportControl = undefined;
|
|
686
591
|
this._getCurrentControl();
|
|
687
592
|
}
|
|
688
|
-
|
|
689
|
-
_updateCounts() {
|
|
690
|
-
this._updateMultiModeCounts();
|
|
691
|
-
}
|
|
692
|
-
|
|
693
593
|
/**
|
|
694
594
|
* Method to determine if a tab from the list report is a custom tab.
|
|
695
595
|
*
|
|
@@ -698,75 +598,7 @@ class ListReportController extends PageController {
|
|
|
698
598
|
* @returns Determines if the tab is a custom tab.
|
|
699
599
|
*/
|
|
700
600
|
_isCustomTab() {
|
|
701
|
-
|
|
702
|
-
return oMultiModeControl && oMultiModeControl.getSelectedKey().indexOf("::CustomTab::") > -1;
|
|
703
|
-
}
|
|
704
|
-
|
|
705
|
-
_setCountsOutDated() {
|
|
706
|
-
const oMultiModeControl = this._getMultiModeControl();
|
|
707
|
-
if (oMultiModeControl && oMultiModeControl.data("showCounts") === "true") {
|
|
708
|
-
const aItems = oMultiModeControl.getItems();
|
|
709
|
-
aItems.forEach(function (oItem: any) {
|
|
710
|
-
if (oItem.getKey().indexOf("fe::Chart") === -1) {
|
|
711
|
-
oItem.data("outdatedCounts", true);
|
|
712
|
-
}
|
|
713
|
-
});
|
|
714
|
-
}
|
|
715
|
-
}
|
|
716
|
-
_invalidateMultipleModeContent() {
|
|
717
|
-
const aControls = this._getControls();
|
|
718
|
-
const sDisplayedControlId = this._getCurrentControl().getId();
|
|
719
|
-
aControls.forEach(function (oControl: any) {
|
|
720
|
-
oControl.data("outdatedRows", oControl.getId() !== sDisplayedControlId);
|
|
721
|
-
});
|
|
722
|
-
}
|
|
723
|
-
|
|
724
|
-
_updateMultiModeCounts() {
|
|
725
|
-
let aBindingPromises = [];
|
|
726
|
-
const oMultiModeControl = this._getMultiModeControl();
|
|
727
|
-
if (oMultiModeControl && oMultiModeControl.data("showCounts") === "true" && !this._isCustomTab()) {
|
|
728
|
-
const oDisplayedControl = this._getCurrentControl();
|
|
729
|
-
const sDisplayedControlId = oDisplayedControl.getId();
|
|
730
|
-
const aCompliantTabs: any[] = [];
|
|
731
|
-
const aItems = oMultiModeControl.getItems();
|
|
732
|
-
aItems.forEach((oItem: any) => {
|
|
733
|
-
if (oItem.getProperty("visible")) {
|
|
734
|
-
const oControl = this.getView().byId(oItem.getKey());
|
|
735
|
-
if (
|
|
736
|
-
oControl &&
|
|
737
|
-
!oControl.isA("sap.ui.mdc.Chart") &&
|
|
738
|
-
(oItem.data("outdatedCounts") || oControl.getId() === sDisplayedControlId)
|
|
739
|
-
) {
|
|
740
|
-
aCompliantTabs.push({
|
|
741
|
-
control: oControl,
|
|
742
|
-
item: oItem
|
|
743
|
-
});
|
|
744
|
-
}
|
|
745
|
-
}
|
|
746
|
-
});
|
|
747
|
-
|
|
748
|
-
aBindingPromises = aCompliantTabs.map((mTab: any) => {
|
|
749
|
-
mTab.item.setCount("...");
|
|
750
|
-
const oControl = mTab.control;
|
|
751
|
-
const oFilterInfos = TableUtils.getFiltersInfoForSV(oControl, mTab.item.data("selectionVariant")) as any;
|
|
752
|
-
return TableUtils.getListBindingForCount(oControl, this.getView().getBindingContext(), {
|
|
753
|
-
batchGroupId: oControl.getId() === sDisplayedControlId ? oControl.data("batchGroupId") : "$auto",
|
|
754
|
-
additionalFilters: oFilterInfos.filters
|
|
755
|
-
});
|
|
756
|
-
});
|
|
757
|
-
|
|
758
|
-
Promise.all(aBindingPromises)
|
|
759
|
-
.then(function (aCounts: any[]) {
|
|
760
|
-
for (const k in aCounts) {
|
|
761
|
-
const oItem = aCompliantTabs[k].item;
|
|
762
|
-
oItem.setCount(TableUtils.getCountFormatted(aCounts[k]));
|
|
763
|
-
oItem.data("outdatedCounts", false);
|
|
764
|
-
}
|
|
765
|
-
})
|
|
766
|
-
.catch(function (oError: any) {
|
|
767
|
-
Log.error("Error while retrieving the values for the icon tab bar", oError);
|
|
768
|
-
});
|
|
769
|
-
}
|
|
601
|
+
return this._getMultiModeControl()?.content.getSelectedKey().indexOf("::CustomTab::") > -1;
|
|
770
602
|
}
|
|
771
603
|
|
|
772
604
|
_isFilterBarHidden() {
|
|
@@ -813,46 +645,26 @@ class ListReportController extends PageController {
|
|
|
813
645
|
|
|
814
646
|
handlers = {
|
|
815
647
|
onTabMultiModeChange(this: ListReportController, oEvent: any) {
|
|
816
|
-
this._updateMultiModeSelectedControl();
|
|
817
|
-
this._updateMultiControlHiddenStatus();
|
|
818
|
-
|
|
819
|
-
const oFilterBar = this._getFilterBarControl();
|
|
820
|
-
const oInternalModelContext = this.getView().getBindingContext("internal") as InternalModelContext;
|
|
821
|
-
const oDisplayedControl = this._getCurrentControl() as any;
|
|
822
|
-
const oMultiModeControl = this._getMultiModeControl();
|
|
823
|
-
const sSelectedKey = oMultiModeControl.getSelectedKey();
|
|
824
648
|
const sPreviousSelectedKey = oEvent && oEvent.mParameters ? oEvent.mParameters.previousKey : undefined;
|
|
825
|
-
|
|
826
|
-
oInternalModelContext.setProperty("tabs/selected", sSelectedKey);
|
|
827
|
-
if (oInternalModelContext.getProperty("hasPendingFilters") !== true) {
|
|
828
|
-
// No pending filters into FilterBar
|
|
829
|
-
if (oFilterBar && this._isCustomTab()) {
|
|
830
|
-
const oFilterConditions = oFilterBar.getFilterConditions();
|
|
831
|
-
this.onViewNeedsRefresh({
|
|
832
|
-
filterConditions: oFilterConditions,
|
|
833
|
-
currentTabId: sSelectedKey,
|
|
834
|
-
refreshCause: "tabChanged"
|
|
835
|
-
});
|
|
836
|
-
} else if (
|
|
837
|
-
!oDisplayedControl.isA("sap.ui.mdc.Chart") &&
|
|
838
|
-
(!oDisplayedControl.getRowBinding() || // first time the tab/table is displayed
|
|
839
|
-
oDisplayedControl.data("outdatedRows") === true)
|
|
840
|
-
) {
|
|
841
|
-
// Search has been triggered on a different tab {}
|
|
842
|
-
oDisplayedControl.rebind();
|
|
843
|
-
oDisplayedControl.data("outdatedRows", false);
|
|
844
|
-
} else if (
|
|
845
|
-
oDisplayedControl.isA("sap.ui.mdc.Chart") &&
|
|
846
|
-
(!oDisplayedControl.getControlDelegate()._getChart(oDisplayedControl).getBinding("data") || // first time the tab/chart is displayed
|
|
847
|
-
oDisplayedControl.data("outdatedRows") === true)
|
|
848
|
-
) {
|
|
849
|
-
const oInnerChart = oDisplayedControl.getControlDelegate()._getChart(oDisplayedControl);
|
|
850
|
-
oDisplayedControl.getControlDelegate().rebind(oDisplayedControl, oInnerChart.getBindingInfo("data"));
|
|
851
|
-
oDisplayedControl.data("outdatedRows", false);
|
|
852
|
-
}
|
|
853
|
-
}
|
|
649
|
+
this._updateMultiModeSelectedControl();
|
|
854
650
|
|
|
855
651
|
if (oEvent && oEvent.mParameters && sPreviousSelectedKey !== oEvent.mParameters.selectedKey) {
|
|
652
|
+
const sSelectedKey = oEvent.mParameters.selectedKey;
|
|
653
|
+
const oFilterBar = this._getFilterBarControl();
|
|
654
|
+
const oMultiModeControl = this._getMultiModeControl();
|
|
655
|
+
const oInternalModelContext = this.getView().getBindingContext("internal");
|
|
656
|
+
if (oInternalModelContext) {
|
|
657
|
+
if (oFilterBar && oInternalModelContext.getProperty("hasPendingFilters") !== true) {
|
|
658
|
+
if (this._isCustomTab()) {
|
|
659
|
+
const oFilterConditions = oFilterBar.getFilterConditions();
|
|
660
|
+
this.onViewNeedsRefresh({
|
|
661
|
+
filterConditions: oFilterConditions,
|
|
662
|
+
currentTabId: sSelectedKey,
|
|
663
|
+
refreshCause: "tabChanged"
|
|
664
|
+
});
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
}
|
|
856
668
|
ControlPersonalizationWriteAPI.add({
|
|
857
669
|
changes: [
|
|
858
670
|
{
|
|
@@ -863,7 +675,7 @@ class ListReportController extends PageController {
|
|
|
863
675
|
previousSelectedKey: sPreviousSelectedKey
|
|
864
676
|
}
|
|
865
677
|
},
|
|
866
|
-
selectorElement: oMultiModeControl
|
|
678
|
+
selectorElement: oMultiModeControl.content
|
|
867
679
|
}
|
|
868
680
|
]
|
|
869
681
|
});
|
|
@@ -878,17 +690,19 @@ class ListReportController extends PageController {
|
|
|
878
690
|
this.onPendingFilters();
|
|
879
691
|
oInternalModelContext.setProperty("appliedFilters", oFilterBar.getAssignedFiltersText().filtersText);
|
|
880
692
|
if (oEvent.getParameter("conditionsBased")) {
|
|
693
|
+
this._getMultiModeControl()?.setFreezeContent(true);
|
|
881
694
|
oInternalModelContext.setProperty("hasPendingFilters", true);
|
|
882
695
|
}
|
|
883
696
|
}
|
|
884
697
|
},
|
|
885
698
|
onVariantSelected(this: ListReportController, oEvent: any) {
|
|
886
699
|
const oVM = oEvent.getSource();
|
|
700
|
+
const oMultiModeControl = this._getMultiModeControl();
|
|
701
|
+
|
|
702
|
+
oMultiModeControl?.invalidateContent();
|
|
703
|
+
oMultiModeControl?.setFreezeContent(true);
|
|
887
704
|
// setTimeout cause the variant needs to be applied before judging the auto search or updating the app state
|
|
888
705
|
setTimeout(() => {
|
|
889
|
-
if (this._isMultiMode()) {
|
|
890
|
-
(this.handlers as any).onTabMultiModeChange.apply(this, [oEvent]);
|
|
891
|
-
}
|
|
892
706
|
if (this._shouldAutoTriggerSearch(oVM)) {
|
|
893
707
|
// the app state will be updated via onSearch handler
|
|
894
708
|
return this._getFilterBarControl().triggerSearch();
|
|
@@ -912,18 +726,19 @@ class ListReportController extends PageController {
|
|
|
912
726
|
oInternalModelContext.setProperty("hideDraftInfo", bHideDraft);
|
|
913
727
|
if (this._isMultiMode()) {
|
|
914
728
|
const oMultiModeControl = this._getMultiModeControl();
|
|
915
|
-
|
|
729
|
+
oMultiModeControl.setCountsOutDated(true);
|
|
730
|
+
oMultiModeControl.setFreezeContent(false);
|
|
916
731
|
if (!this._isCustomTab()) {
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
732
|
+
oMultiModeControl.updateMultiTabNotApplicableFields(
|
|
733
|
+
oFilterBar,
|
|
734
|
+
oFilterBar.data("entityType"),
|
|
735
|
+
this.oResourceBundle as ResourceBundle
|
|
736
|
+
);
|
|
922
737
|
} else {
|
|
923
738
|
const oFilterConditions = oFilterBar.getFilterConditions();
|
|
924
739
|
this.onViewNeedsRefresh({
|
|
925
740
|
filterConditions: oFilterConditions,
|
|
926
|
-
currentTabId: oMultiModeControl.getSelectedKey(),
|
|
741
|
+
currentTabId: oMultiModeControl.content.getSelectedKey(),
|
|
927
742
|
refreshCause: "search"
|
|
928
743
|
});
|
|
929
744
|
}
|
|
@@ -1061,50 +876,23 @@ class ListReportController extends PageController {
|
|
|
1061
876
|
}
|
|
1062
877
|
};
|
|
1063
878
|
formatters = {
|
|
1064
|
-
|
|
1065
|
-
* Method to set the message text for the multiple entity sets when fields in the FilterBar need to be ignored.
|
|
1066
|
-
*
|
|
1067
|
-
* @param this
|
|
1068
|
-
* @param aIgnoredFields Array of ignored fields in the FilterBar for the current tab (multiple entity sets)
|
|
1069
|
-
* @param sTabTitle Tab title
|
|
1070
|
-
* @param bIsChart Flag that indicates whether the control is a chart or not
|
|
1071
|
-
* @param oApplySupported ApplySupported for the control
|
|
1072
|
-
* @returns Message text
|
|
1073
|
-
*/
|
|
1074
|
-
setTabMessageStrip(this: ListReportController, aIgnoredFields: any[], sTabTitle: string, bIsChart?: any, oApplySupported?: any) {
|
|
879
|
+
setALPControlMessageStrip(this: ListReportController, aIgnoredFields: any[], bIsChart: any, oApplySupported?: any) {
|
|
1075
880
|
let sText = "";
|
|
1076
881
|
bIsChart = bIsChart === "true" || bIsChart === true;
|
|
1077
882
|
const oFilterBar = this._getFilterBarControl();
|
|
1078
|
-
if (oFilterBar && Array.isArray(aIgnoredFields) && aIgnoredFields.length > 0 &&
|
|
1079
|
-
const
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
return oMacroResourceBundle ? oMacroResourceBundle.getText("M_FILTERBAR_SEARCH") : "";
|
|
1086
|
-
}
|
|
1087
|
-
if (sProperty === "$editState") {
|
|
1088
|
-
return oMacroResourceBundle ? oMacroResourceBundle.getText("M_COMMON_FILTERBAR_EDITING_STATUS") : "";
|
|
1089
|
-
}
|
|
1090
|
-
const sLabel = oMetaModel.getObject(`${sFilterBarEntityPath + sProperty}@com.sap.vocabularies.Common.v1.Label`);
|
|
1091
|
-
return DelegateUtil.getLocalizedText(sLabel, oFilterBar);
|
|
1092
|
-
});
|
|
883
|
+
if (oFilterBar && Array.isArray(aIgnoredFields) && aIgnoredFields.length > 0 && bIsChart) {
|
|
884
|
+
const aIgnoredLabels = MessageStrip.getLabels(
|
|
885
|
+
aIgnoredFields,
|
|
886
|
+
oFilterBar.data("entityType"),
|
|
887
|
+
oFilterBar,
|
|
888
|
+
this.oResourceBundle as ResourceBundle
|
|
889
|
+
);
|
|
1093
890
|
const bIsSearchIgnored = !oApplySupported.enableSearch;
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
oFilterBar,
|
|
1099
|
-
bIsChart,
|
|
1100
|
-
bIsSearchIgnored,
|
|
1101
|
-
sTabTitle,
|
|
1102
|
-
oResourceBundle,
|
|
1103
|
-
DelegateUtil.getLocalizedText
|
|
1104
|
-
);
|
|
1105
|
-
}
|
|
891
|
+
sText = bIsChart
|
|
892
|
+
? MessageStrip.getALPText(aIgnoredLabels, oFilterBar, bIsSearchIgnored)
|
|
893
|
+
: MessageStrip.getText(aIgnoredLabels, oFilterBar, "", DelegateUtil.getLocalizedText);
|
|
894
|
+
return sText;
|
|
1106
895
|
}
|
|
1107
|
-
return sText;
|
|
1108
896
|
}
|
|
1109
897
|
};
|
|
1110
898
|
}
|