@sapui5/sap.fe.templates 1.97.0 → 1.100.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.
- package/package.json +9 -5
- package/src/sap/fe/templates/.library +1 -1
- package/src/sap/fe/templates/AnalyticalListPage/Component.js +3 -2
- package/src/sap/fe/templates/AnalyticalListPage/chart/FEChartDelegate.js +5 -4
- package/src/sap/fe/templates/ListComponent.js +3 -2
- package/src/sap/fe/templates/ListReport/Component.js +18 -3
- package/src/sap/fe/templates/ListReport/ExtensionAPI.js +12 -6
- package/src/sap/fe/templates/ListReport/ListReport.view.xml +33 -26
- package/src/sap/fe/templates/ListReport/ListReportController.controller.js +206 -125
- package/src/sap/fe/templates/ListReport/overrides/IntentBasedNavigation.js +18 -13
- package/src/sap/fe/templates/ListReport/overrides/Share.js +46 -29
- package/src/sap/fe/templates/ListReport/overrides/ViewState.js +131 -86
- package/src/sap/fe/templates/ListReport/view/fragments/CollectionVisualization.fragment.xml +8 -0
- package/src/sap/fe/templates/ListReport/view/fragments/MultipleMode.fragment.xml +3 -3
- package/src/sap/fe/templates/ObjectPage/AnnotationHelper.js +75 -13
- package/src/sap/fe/templates/ObjectPage/Component.js +21 -29
- package/src/sap/fe/templates/ObjectPage/ExtensionAPI.js +18 -2
- package/src/sap/fe/templates/ObjectPage/ObjectPage.view.xml +76 -94
- package/src/sap/fe/templates/ObjectPage/ObjectPageController.controller.js +166 -155
- package/src/sap/fe/templates/ObjectPage/controls/StashableHBox.js +10 -3
- package/src/sap/fe/templates/ObjectPage/controls/StashableVBox.js +3 -2
- package/src/sap/fe/templates/ObjectPage/controls/SubSectionBlock.js +3 -2
- package/src/sap/fe/templates/ObjectPage/designtime/FlexBox.designtime.js +6 -2
- package/src/sap/fe/templates/ObjectPage/designtime/StashableHBox.designtime.js +3 -2
- package/src/sap/fe/templates/ObjectPage/designtime/StashableVBox.designtime.js +3 -2
- package/src/sap/fe/templates/ObjectPage/flexibility/StashableHBox.flexibility.js +3 -2
- package/src/sap/fe/templates/ObjectPage/flexibility/StashableVBox.flexibility.js +3 -2
- package/src/sap/fe/templates/ObjectPage/overrides/IntentBasedNavigation.js +3 -2
- package/src/sap/fe/templates/ObjectPage/overrides/InternalRouting.js +3 -2
- package/src/sap/fe/templates/ObjectPage/overrides/MessageHandler.js +3 -2
- package/src/sap/fe/templates/ObjectPage/overrides/Paginator.js +15 -2
- package/src/sap/fe/templates/ObjectPage/overrides/Share.js +50 -45
- package/src/sap/fe/templates/ObjectPage/overrides/ViewState.js +3 -22
- package/src/sap/fe/templates/ObjectPage/templating/ObjectPageTemplating.js +1 -1
- package/src/sap/fe/templates/ObjectPage/templating/ObjectPageTemplating.ts +2 -2
- package/src/sap/fe/templates/ObjectPage/view/fragments/Actions.fragment.xml +1 -1
- package/src/sap/fe/templates/ObjectPage/view/fragments/CollaborationDraft.fragment.xml +36 -0
- package/src/sap/fe/templates/ObjectPage/view/fragments/EditableHeaderFacet.fragment.xml +1 -1
- package/src/sap/fe/templates/ObjectPage/view/fragments/FooterContent.fragment.xml +5 -1
- package/src/sap/fe/templates/ObjectPage/view/fragments/HeaderFacet.fragment.xml +1 -0
- package/src/sap/fe/templates/ObjectPage/view/fragments/HeaderFacetCustomContainer.fragment.xml +1 -0
- package/src/sap/fe/templates/ObjectPage/view/fragments/Heading.fragment.xml +33 -0
- package/src/sap/fe/templates/ObjectPage/view/fragments/HeadingAvatar.fragment.xml +17 -0
- package/src/sap/fe/templates/ObjectPage/view/fragments/HeadingTitle.fragment.xml +18 -0
- package/src/sap/fe/templates/ObjectPage/view/fragments/Section.fragment.xml +24 -5
- package/src/sap/fe/templates/ObjectPage/view/fragments/SectionContent.fragment.xml +1 -4
- package/src/sap/fe/templates/ObjectPage/view/fragments/SectionContentLazyLoader.fragment.xml +181 -0
- package/src/sap/fe/templates/ObjectPage/view/fragments/SectionFormContent.fragment.xml +4 -3
- package/src/sap/fe/templates/ObjectPage/view/fragments/SectionMoreFormContent.fragment.xml +4 -3
- package/src/sap/fe/templates/RootContainer/controller/Fcl.controller.js +6 -3
- package/src/sap/fe/templates/RootContainer/controller/NavContainer.controller.js +6 -3
- package/src/sap/fe/templates/RootContainer/controller/RootContainerBaseController.js +136 -125
- package/src/sap/fe/templates/RootContainer/overrides/EditFlow.js +3 -2
- package/src/sap/fe/templates/TableScroller.js +3 -2
- 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/messagebundle.properties +15 -8
- package/src/sap/fe/templates/messagebundle_ar.properties +9 -6
- package/src/sap/fe/templates/messagebundle_bg.properties +9 -6
- package/src/sap/fe/templates/messagebundle_ca.properties +9 -6
- package/src/sap/fe/templates/messagebundle_cs.properties +9 -6
- package/src/sap/fe/templates/messagebundle_cy.properties +9 -6
- package/src/sap/fe/templates/messagebundle_da.properties +9 -6
- package/src/sap/fe/templates/messagebundle_de.properties +9 -6
- package/src/sap/fe/templates/messagebundle_el.properties +10 -7
- package/src/sap/fe/templates/messagebundle_en.properties +9 -6
- package/src/sap/fe/templates/messagebundle_en_GB.properties +9 -6
- package/src/sap/fe/templates/messagebundle_en_US_sappsd.properties +10 -7
- package/src/sap/fe/templates/messagebundle_en_US_saprigi.properties +10 -7
- package/src/sap/fe/templates/messagebundle_en_US_saptrc.properties +10 -7
- package/src/sap/fe/templates/messagebundle_es.properties +17 -14
- package/src/sap/fe/templates/messagebundle_es_MX.properties +9 -6
- package/src/sap/fe/templates/messagebundle_et.properties +9 -6
- package/src/sap/fe/templates/messagebundle_fi.properties +9 -6
- package/src/sap/fe/templates/messagebundle_fr.properties +10 -7
- package/src/sap/fe/templates/messagebundle_fr_CA.properties +9 -6
- package/src/sap/fe/templates/messagebundle_hi.properties +9 -6
- package/src/sap/fe/templates/messagebundle_hr.properties +10 -7
- package/src/sap/fe/templates/messagebundle_hu.properties +9 -6
- package/src/sap/fe/templates/messagebundle_id.properties +11 -8
- package/src/sap/fe/templates/messagebundle_it.properties +9 -6
- package/src/sap/fe/templates/messagebundle_iw.properties +9 -6
- package/src/sap/fe/templates/messagebundle_ja.properties +10 -7
- package/src/sap/fe/templates/messagebundle_kk.properties +9 -6
- package/src/sap/fe/templates/messagebundle_ko.properties +9 -6
- package/src/sap/fe/templates/messagebundle_lt.properties +9 -6
- package/src/sap/fe/templates/messagebundle_lv.properties +9 -6
- package/src/sap/fe/templates/messagebundle_ms.properties +9 -6
- package/src/sap/fe/templates/messagebundle_nl.properties +9 -6
- package/src/sap/fe/templates/messagebundle_no.properties +9 -6
- package/src/sap/fe/templates/messagebundle_pl.properties +9 -6
- package/src/sap/fe/templates/messagebundle_pt.properties +12 -9
- package/src/sap/fe/templates/messagebundle_pt_PT.properties +10 -7
- package/src/sap/fe/templates/messagebundle_ro.properties +9 -6
- package/src/sap/fe/templates/messagebundle_ru.properties +9 -6
- package/src/sap/fe/templates/messagebundle_sh.properties +9 -6
- package/src/sap/fe/templates/messagebundle_sk.properties +9 -6
- package/src/sap/fe/templates/messagebundle_sl.properties +9 -6
- package/src/sap/fe/templates/messagebundle_sv.properties +10 -7
- package/src/sap/fe/templates/messagebundle_th.properties +9 -6
- package/src/sap/fe/templates/messagebundle_tr.properties +10 -7
- package/src/sap/fe/templates/messagebundle_uk.properties +10 -7
- package/src/sap/fe/templates/messagebundle_vi.properties +9 -6
- package/src/sap/fe/templates/messagebundle_zh_CN.properties +9 -6
- package/src/sap/fe/templates/messagebundle_zh_TW.properties +9 -6
- package/ui5.yaml +0 -3
- package/src/sap/fe/templates/ObjectPage/view/fragments/HeaderImage.fragment.xml +0 -24
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* SAPUI5
|
|
3
|
-
|
|
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(
|
|
@@ -35,7 +36,8 @@ sap.ui.define(
|
|
|
35
36
|
"sap/fe/core/controllerextensions/KPIManagement",
|
|
36
37
|
"sap/fe/templates/TableScroller",
|
|
37
38
|
"sap/fe/core/controllerextensions/Placeholder",
|
|
38
|
-
"sap/ui/fl/write/api/ControlPersonalizationWriteAPI"
|
|
39
|
+
"sap/ui/fl/write/api/ControlPersonalizationWriteAPI",
|
|
40
|
+
"sap/fe/core/controllerextensions/MassEdit"
|
|
39
41
|
],
|
|
40
42
|
function(
|
|
41
43
|
PageController,
|
|
@@ -68,7 +70,8 @@ sap.ui.define(
|
|
|
68
70
|
KPIManagement,
|
|
69
71
|
TableScroller,
|
|
70
72
|
Placeholder,
|
|
71
|
-
ControlPersonalizationWriteAPI
|
|
73
|
+
ControlPersonalizationWriteAPI,
|
|
74
|
+
MassEdit
|
|
72
75
|
) {
|
|
73
76
|
"use strict";
|
|
74
77
|
var TemplateContentView = CoreLibrary.TemplateContentView,
|
|
@@ -118,6 +121,7 @@ sap.ui.define(
|
|
|
118
121
|
viewState: ViewState.override(ViewStateOverrides),
|
|
119
122
|
kpiManagement: KPIManagement,
|
|
120
123
|
placeholder: Placeholder,
|
|
124
|
+
massEdit: MassEdit,
|
|
121
125
|
|
|
122
126
|
getExtensionAPI: function() {
|
|
123
127
|
if (!this.extensionAPI) {
|
|
@@ -145,11 +149,6 @@ sap.ui.define(
|
|
|
145
149
|
}
|
|
146
150
|
//TODO: This is only a temporary approach and will be removed once app state behaviour is finalized.
|
|
147
151
|
|
|
148
|
-
var oUrlParser = sap.ushell && sap.ushell.Container.getService("URLParsing");
|
|
149
|
-
var oUrlParams = oUrlParser && oUrlParser.parseParameters(window.location.search);
|
|
150
|
-
if (oUrlParams && oUrlParams["sap-fe-test-appState"]) {
|
|
151
|
-
this.bTestAppState = true;
|
|
152
|
-
}
|
|
153
152
|
oInternalModelContext.setProperty("hasPendingFilters", true);
|
|
154
153
|
oInternalModelContext.setProperty("appliedFilters", "");
|
|
155
154
|
oInternalModelContext.setProperty("hideDraftInfo", false);
|
|
@@ -177,12 +176,8 @@ sap.ui.define(
|
|
|
177
176
|
.waitForRouteMatchBeforeNavigation();
|
|
178
177
|
|
|
179
178
|
this._isMultiMode() && this._updateMultiControlHiddenStatus();
|
|
180
|
-
|
|
181
|
-
FilterUtils.attachConditionHandling(this._getFilterBarControl());
|
|
182
179
|
},
|
|
183
180
|
onExit: function() {
|
|
184
|
-
FilterUtils.detachConditionHandling(this._getFilterBarControl());
|
|
185
|
-
|
|
186
181
|
delete this._sEntitySet;
|
|
187
182
|
delete this.filterBarConditions;
|
|
188
183
|
delete this._oListReportControl;
|
|
@@ -200,6 +195,10 @@ sap.ui.define(
|
|
|
200
195
|
if (!this.sUpdateTimer) {
|
|
201
196
|
this.sUpdateTimer = setTimeout(function() {
|
|
202
197
|
oTableBinding.refresh();
|
|
198
|
+
if (that._isMultiMode()) {
|
|
199
|
+
that._setCountsOutDated();
|
|
200
|
+
that._updateCounts();
|
|
201
|
+
}
|
|
203
202
|
delete that.sUpdateTimer;
|
|
204
203
|
}, 0);
|
|
205
204
|
}
|
|
@@ -262,6 +261,11 @@ sap.ui.define(
|
|
|
262
261
|
oFilterBar.setFocusOnFirstErroneousField();
|
|
263
262
|
}
|
|
264
263
|
}
|
|
264
|
+
|
|
265
|
+
// Remove the handler on back navigation that displays Draft confirmation
|
|
266
|
+
this.getAppComponent()
|
|
267
|
+
.getShellServices()
|
|
268
|
+
.setBackNavigation(undefined);
|
|
265
269
|
},
|
|
266
270
|
|
|
267
271
|
/**
|
|
@@ -347,19 +351,14 @@ sap.ui.define(
|
|
|
347
351
|
});
|
|
348
352
|
},
|
|
349
353
|
_getPageTitleInformation: function() {
|
|
350
|
-
var
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
.getView()
|
|
359
|
-
.getContent()[0]
|
|
360
|
-
.data().ListReportSubtitle;
|
|
361
|
-
resolve(oTitleInfo);
|
|
362
|
-
});
|
|
354
|
+
var oTitleInfo = { title: "", subtitle: "", intent: "", icon: "" };
|
|
355
|
+
oTitleInfo.title = this.getView()
|
|
356
|
+
.getContent()[0]
|
|
357
|
+
.data().ListReportTitle;
|
|
358
|
+
oTitleInfo.subtitle = this.getView()
|
|
359
|
+
.getContent()[0]
|
|
360
|
+
.data().ListReportSubtitle;
|
|
361
|
+
return oTitleInfo;
|
|
363
362
|
},
|
|
364
363
|
_getFilterBarControl: function() {
|
|
365
364
|
return this.getView().byId(this._getFilterBarControlId());
|
|
@@ -443,8 +442,13 @@ sap.ui.define(
|
|
|
443
442
|
}
|
|
444
443
|
});
|
|
445
444
|
return aControls;
|
|
445
|
+
} else if (sKey === "Chart") {
|
|
446
|
+
var oChart = this._getChart();
|
|
447
|
+
return oChart ? [oChart] : [];
|
|
448
|
+
} else {
|
|
449
|
+
var oTable = this._getTable();
|
|
450
|
+
return oTable ? [oTable] : [];
|
|
446
451
|
}
|
|
447
|
-
return sKey === "Chart" ? [this._getChart()] : [this._getTable()];
|
|
448
452
|
},
|
|
449
453
|
_getDefaultPath: function() {
|
|
450
454
|
var defaultPath = this.getView()
|
|
@@ -529,7 +533,7 @@ sap.ui.define(
|
|
|
529
533
|
* requests when FilterBar is changed or LR is initialized
|
|
530
534
|
* Best workflow would be to suspend table binding but
|
|
531
535
|
* if the user switch quickly between tabs the batch response of previous
|
|
532
|
-
* is
|
|
536
|
+
* is received when previous tab is already disabled (binding is suspended) and
|
|
533
537
|
* generates error.
|
|
534
538
|
* A temporary solution (if we find better workflow) is to set a customData and don't trigger
|
|
535
539
|
* rebindTable if this customData is set to true.
|
|
@@ -551,9 +555,11 @@ sap.ui.define(
|
|
|
551
555
|
* @param {sap.ui.model.context} oInternalModelContext The internal model context
|
|
552
556
|
* @param {sap.ui.mdc.FilterBar} oFilterBar MDC filter bar
|
|
553
557
|
*/
|
|
554
|
-
|
|
558
|
+
_updateMultiTabNotApplicableFields: function(oInternalModelContext, oFilterBar) {
|
|
559
|
+
var that = this;
|
|
555
560
|
var mCache = {};
|
|
556
561
|
var ignoredFields = {},
|
|
562
|
+
ignoredFieldsTitle = {},
|
|
557
563
|
aTables = this._getControls("table"),
|
|
558
564
|
aCharts = this._getControls("Chart");
|
|
559
565
|
aTables.forEach(function(oTable) {
|
|
@@ -563,11 +569,16 @@ sap.ui.define(
|
|
|
563
569
|
.getParent()
|
|
564
570
|
.getParent()
|
|
565
571
|
.getKey(),
|
|
572
|
+
sTabTitle = oTable
|
|
573
|
+
.getParent()
|
|
574
|
+
.getParent()
|
|
575
|
+
.getText(),
|
|
566
576
|
sCacheKey = sTableEntitySet + (oTable.data("enableAnalytics") === "true" ? "Analytical" : "Regular");
|
|
567
577
|
if (!mCache[sCacheKey]) {
|
|
568
578
|
mCache[sCacheKey] = FilterUtils.getNotApplicableFilters(oFilterBar, oTable);
|
|
569
579
|
}
|
|
570
580
|
ignoredFields[sTabId] = mCache[sCacheKey];
|
|
581
|
+
ignoredFieldsTitle[sTabId] = that.formatters.setTabMessageStrip.call(that, mCache[sCacheKey], sTabTitle);
|
|
571
582
|
});
|
|
572
583
|
aCharts.forEach(function(oChart) {
|
|
573
584
|
var sChartEntityPath = oChart.data("targetCollectionPath"),
|
|
@@ -576,13 +587,48 @@ sap.ui.define(
|
|
|
576
587
|
.getParent()
|
|
577
588
|
.getParent()
|
|
578
589
|
.getKey(),
|
|
590
|
+
sTabTitle = oChart
|
|
591
|
+
.getParent()
|
|
592
|
+
.getParent()
|
|
593
|
+
.getText(),
|
|
579
594
|
sCacheKey = sChartEntitySet + "Chart";
|
|
580
595
|
if (!mCache[sCacheKey]) {
|
|
581
596
|
mCache[sCacheKey] = FilterUtils.getNotApplicableFilters(oFilterBar, oChart);
|
|
582
597
|
}
|
|
583
598
|
ignoredFields[sTabId] = mCache[sCacheKey];
|
|
599
|
+
ignoredFieldsTitle[sTabId] = that.formatters.setTabMessageStrip.call(that, mCache[sCacheKey], sTabTitle);
|
|
584
600
|
});
|
|
585
601
|
oInternalModelContext.setProperty("tabs/ignoredFields", ignoredFields);
|
|
602
|
+
oInternalModelContext.setProperty("tabs/ignoredFieldsTitle", ignoredFieldsTitle);
|
|
603
|
+
},
|
|
604
|
+
/**
|
|
605
|
+
* 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).
|
|
606
|
+
*
|
|
607
|
+
* @param {sap.ui.model.context} oInternalModelContext The internal model context
|
|
608
|
+
* @param {sap.ui.mdc.FilterBar} oFilterBar MDC filter bar
|
|
609
|
+
*/
|
|
610
|
+
_updateALPNotApplicableFields: function(oInternalModelContext, oFilterBar) {
|
|
611
|
+
var mCache = {};
|
|
612
|
+
var ignoredFields = {},
|
|
613
|
+
aTables = this._getControls("table"),
|
|
614
|
+
aCharts = this._getControls("Chart");
|
|
615
|
+
|
|
616
|
+
if (!aTables.length || !aCharts.length) {
|
|
617
|
+
// If there's not a table and a chart, we're not in the ALP case
|
|
618
|
+
return;
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
// For the moment, there's nothing for tables...
|
|
622
|
+
aCharts.forEach(function(oChart) {
|
|
623
|
+
var sChartEntityPath = oChart.data("targetCollectionPath"),
|
|
624
|
+
sChartEntitySet = sChartEntityPath.slice(1),
|
|
625
|
+
sCacheKey = sChartEntitySet + "Chart";
|
|
626
|
+
if (!mCache[sCacheKey]) {
|
|
627
|
+
mCache[sCacheKey] = FilterUtils.getNotApplicableFilters(oFilterBar, oChart);
|
|
628
|
+
}
|
|
629
|
+
ignoredFields[sCacheKey] = mCache[sCacheKey];
|
|
630
|
+
});
|
|
631
|
+
oInternalModelContext.setProperty("controls/ignoredFields", ignoredFields);
|
|
586
632
|
},
|
|
587
633
|
_updateMultiModeSelectedControl: function() {
|
|
588
634
|
this._sEntitySet = undefined;
|
|
@@ -603,6 +649,17 @@ sap.ui.define(
|
|
|
603
649
|
var oMultiModeControl = this._getMultiModeControl();
|
|
604
650
|
return oMultiModeControl && oMultiModeControl.getSelectedKey().indexOf("::CustomTab::") > -1;
|
|
605
651
|
},
|
|
652
|
+
_setCountsOutDated: function() {
|
|
653
|
+
var oMultiModeControl = this._getMultiModeControl();
|
|
654
|
+
if (oMultiModeControl && oMultiModeControl.data("showCounts") === "true") {
|
|
655
|
+
var aItems = oMultiModeControl.getItems();
|
|
656
|
+
aItems.forEach(function(oItem) {
|
|
657
|
+
if (!oItem.getKey().indexOf("fe::Chart") > -1) {
|
|
658
|
+
oItem.data("outdatedCounts", true);
|
|
659
|
+
}
|
|
660
|
+
});
|
|
661
|
+
}
|
|
662
|
+
},
|
|
606
663
|
_updateMultiModeCounts: function() {
|
|
607
664
|
var that = this;
|
|
608
665
|
var aBindingPromises = [];
|
|
@@ -616,7 +673,7 @@ sap.ui.define(
|
|
|
616
673
|
var oControl = that.getView().byId(oItem.getKey());
|
|
617
674
|
if (
|
|
618
675
|
oControl &&
|
|
619
|
-
!oControl.isA("sap.ui.mdc.
|
|
676
|
+
!oControl.isA("sap.ui.mdc.Chart") &&
|
|
620
677
|
(oItem.data("outdatedCounts") || oControl.getId() === sDisplayedControlId)
|
|
621
678
|
) {
|
|
622
679
|
aCompliantTabs.push({
|
|
@@ -649,17 +706,22 @@ sap.ui.define(
|
|
|
649
706
|
});
|
|
650
707
|
}
|
|
651
708
|
},
|
|
709
|
+
_isFilterBarHidden: function() {
|
|
710
|
+
return this.getView().getViewData().hideFilterBar;
|
|
711
|
+
},
|
|
652
712
|
_shouldAutoTriggerSearch: function(oVM) {
|
|
653
713
|
if (
|
|
654
714
|
this.getView().getViewData().initialLoad === InitialLoadMode.Auto &&
|
|
655
715
|
(!oVM || oVM.getStandardVariantKey() === oVM.getCurrentVariantKey())
|
|
656
716
|
) {
|
|
657
|
-
var oFilterBar = this._getFilterBarControl()
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
717
|
+
var oFilterBar = this._getFilterBarControl();
|
|
718
|
+
if (oFilterBar) {
|
|
719
|
+
var oConditions = oFilterBar.getConditions();
|
|
720
|
+
for (var sKey in oConditions) {
|
|
721
|
+
// ignore filters starting with $ (e.g. $search, $editState)
|
|
722
|
+
if (!sKey.startsWith("$") && Array.isArray(oConditions[sKey]) && oConditions[sKey].length) {
|
|
723
|
+
return true;
|
|
724
|
+
}
|
|
663
725
|
}
|
|
664
726
|
}
|
|
665
727
|
}
|
|
@@ -668,62 +730,62 @@ sap.ui.define(
|
|
|
668
730
|
},
|
|
669
731
|
_updateTable: function(oTable) {
|
|
670
732
|
if (!oTable.isTableBound() || this.hasPendingChartChanges) {
|
|
671
|
-
oTable.
|
|
733
|
+
oTable.rebind();
|
|
672
734
|
this.hasPendingChartChanges = false;
|
|
673
735
|
}
|
|
674
736
|
},
|
|
675
737
|
_updateChart: function(oChart) {
|
|
676
738
|
var oInnerChart = oChart.getControlDelegate()._getChart(oChart);
|
|
677
739
|
if (!(oInnerChart && oInnerChart.isBound("data")) || this.hasPendingTableChanges) {
|
|
678
|
-
oChart.getControlDelegate().
|
|
740
|
+
oChart.getControlDelegate().rebind(oChart, oInnerChart.getBindingInfo("data"));
|
|
679
741
|
this.hasPendingTableChanges = false;
|
|
680
742
|
}
|
|
681
743
|
},
|
|
682
744
|
handlers: {
|
|
683
745
|
onTabMultiModeChange: function(oEvent) {
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
}
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
746
|
+
this._updateMultiModeSelectedControl();
|
|
747
|
+
this._updateMultiControlHiddenStatus();
|
|
748
|
+
|
|
749
|
+
var oFilterBar = this._getFilterBarControl();
|
|
750
|
+
var oInternalModelContext = this.getView().getBindingContext("internal");
|
|
751
|
+
var oDisplayedControl = this._getCurrentControl();
|
|
752
|
+
var oMultiModeControl = this._getMultiModeControl();
|
|
753
|
+
var sSelectedKey = oMultiModeControl.getSelectedKey();
|
|
754
|
+
var sPreviousSelectedKey = oEvent && oEvent.mParameters ? oEvent.mParameters.previousKey : undefined;
|
|
755
|
+
|
|
756
|
+
oInternalModelContext.setProperty("tabs/selected", sSelectedKey);
|
|
757
|
+
if (oInternalModelContext.getProperty("hasPendingFilters") !== true) {
|
|
758
|
+
// No pending filters into FilterBar
|
|
759
|
+
if (oFilterBar && this._isCustomTab()) {
|
|
760
|
+
var oFilterConditions = oFilterBar.getFilterConditions();
|
|
761
|
+
this.onViewNeedsRefresh({
|
|
762
|
+
filterConditions: oFilterConditions,
|
|
763
|
+
currentTabId: sSelectedKey,
|
|
764
|
+
refreshCause: "tabChanged"
|
|
765
|
+
});
|
|
766
|
+
} else if (
|
|
767
|
+
!oDisplayedControl.isA("sap.ui.mdc.Chart") &&
|
|
768
|
+
(!oDisplayedControl.getRowBinding() || // first time the tab/table is displayed
|
|
769
|
+
oDisplayedControl.data("outdatedRows") === true)
|
|
770
|
+
) {
|
|
771
|
+
// Search has been triggered on a different tab {}
|
|
772
|
+
oDisplayedControl.rebind();
|
|
773
|
+
oDisplayedControl.data("outdatedRows", false);
|
|
774
|
+
} else if (
|
|
775
|
+
oDisplayedControl.isA("sap.ui.mdc.Chart") &&
|
|
776
|
+
(!oDisplayedControl
|
|
777
|
+
.getControlDelegate()
|
|
778
|
+
._getChart(oDisplayedControl)
|
|
779
|
+
.getBinding("data") || // first time the tab/chart is displayed
|
|
780
|
+
oDisplayedControl.data("outdatedRows") === true)
|
|
781
|
+
) {
|
|
782
|
+
var oInnerChart = oDisplayedControl.getControlDelegate()._getChart(oDisplayedControl);
|
|
783
|
+
oDisplayedControl.getControlDelegate().rebind(oDisplayedControl, oInnerChart.getBindingInfo("data"));
|
|
784
|
+
oDisplayedControl.data("outdatedRows", false);
|
|
723
785
|
}
|
|
724
|
-
|
|
725
|
-
var sPreviousSelectedKey = oEvent && oEvent.mParameters ? oEvent.mParameters.previousKey : undefined;
|
|
786
|
+
}
|
|
726
787
|
|
|
788
|
+
if (oEvent && oEvent.mParameters && sPreviousSelectedKey !== oEvent.mParameters.selectedKey) {
|
|
727
789
|
ControlPersonalizationWriteAPI.add({
|
|
728
790
|
changes: [
|
|
729
791
|
{
|
|
@@ -738,19 +800,19 @@ sap.ui.define(
|
|
|
738
800
|
}
|
|
739
801
|
]
|
|
740
802
|
});
|
|
741
|
-
*/
|
|
742
|
-
this.getExtensionAPI().updateAppState();
|
|
743
803
|
}
|
|
804
|
+
this.getExtensionAPI().updateAppState();
|
|
744
805
|
},
|
|
745
806
|
onFiltersChanged: function(oEvent) {
|
|
746
|
-
var oFilterBar = this._getFilterBarControl()
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
807
|
+
var oFilterBar = this._getFilterBarControl();
|
|
808
|
+
if (oFilterBar) {
|
|
809
|
+
var oInternalModelContext = this.getView().getBindingContext("internal");
|
|
810
|
+
// Pending filters into FilterBar to be used for custom views
|
|
811
|
+
this.onPendingFilters();
|
|
812
|
+
oInternalModelContext.setProperty("appliedFilters", oFilterBar.getAssignedFiltersText().filtersText);
|
|
813
|
+
if (oEvent.getParameter("conditionsBased")) {
|
|
814
|
+
oInternalModelContext.setProperty("hasPendingFilters", true);
|
|
815
|
+
}
|
|
754
816
|
}
|
|
755
817
|
},
|
|
756
818
|
onVariantSelected: function(oEvent) {
|
|
@@ -787,17 +849,13 @@ sap.ui.define(
|
|
|
787
849
|
if (this._isMultiMode()) {
|
|
788
850
|
var aControls = this._getControls(),
|
|
789
851
|
oMultiModeControl = this._getMultiModeControl();
|
|
790
|
-
|
|
791
|
-
var aItems = oMultiModeControl.getItems();
|
|
792
|
-
aItems.forEach(function(oItem) {
|
|
793
|
-
if (!oItem.getKey().indexOf("fe::Chart") > -1) {
|
|
794
|
-
oItem.data("outdatedCounts", true);
|
|
795
|
-
}
|
|
796
|
-
});
|
|
797
|
-
}
|
|
852
|
+
this._setCountsOutDated();
|
|
798
853
|
if (!this._isCustomTab()) {
|
|
799
854
|
var sDisplayedControlId = this._getCurrentControl().getId();
|
|
800
|
-
this.
|
|
855
|
+
this._updateMultiTabNotApplicableFields(oInternalModelContext, oFilterBar);
|
|
856
|
+
// This should be done outside the search event handler of the filter bar.
|
|
857
|
+
// The same logic is required when filter bar is hidden and multiple tables exist on the LR.
|
|
858
|
+
// This is currently done in ListReport/overrides/ViewState.js#onAfterStateApplied()
|
|
801
859
|
aControls.forEach(function(oControl) {
|
|
802
860
|
oControl.data("outdatedRows", oControl.getId() !== sDisplayedControlId);
|
|
803
861
|
});
|
|
@@ -809,6 +867,8 @@ sap.ui.define(
|
|
|
809
867
|
refreshCause: "search"
|
|
810
868
|
});
|
|
811
869
|
}
|
|
870
|
+
} else {
|
|
871
|
+
this._updateALPNotApplicableFields(oInternalModelContext, oFilterBar);
|
|
812
872
|
}
|
|
813
873
|
if (oMdcChart) {
|
|
814
874
|
// disable bound actions TODO: this clears everything for the chart?
|
|
@@ -836,6 +896,11 @@ sap.ui.define(
|
|
|
836
896
|
if (this.getView().getViewData().liveMode === false) {
|
|
837
897
|
this.getExtensionAPI().updateAppState();
|
|
838
898
|
}
|
|
899
|
+
|
|
900
|
+
if (Device.system.phone) {
|
|
901
|
+
var oDynamicPage = this.getView().byId("fe::ListReport");
|
|
902
|
+
oDynamicPage.setHeaderExpanded(false);
|
|
903
|
+
}
|
|
839
904
|
},
|
|
840
905
|
/**
|
|
841
906
|
* Triggers an outbound navigation when a user chooses the chevron.
|
|
@@ -871,7 +936,7 @@ sap.ui.define(
|
|
|
871
936
|
if (sTemplateContentView === TemplateContentView.Chart) {
|
|
872
937
|
this.hasPendingChartChanges = true;
|
|
873
938
|
} else {
|
|
874
|
-
oTable && oTable.
|
|
939
|
+
oTable && oTable.rebind();
|
|
875
940
|
this.hasPendingChartChanges = false;
|
|
876
941
|
}
|
|
877
942
|
},
|
|
@@ -935,31 +1000,11 @@ sap.ui.define(
|
|
|
935
1000
|
.setVisible(true);
|
|
936
1001
|
}
|
|
937
1002
|
},
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
this.getExtensionAPI().updateAppState();
|
|
941
|
-
}
|
|
1003
|
+
onStateChanged: function(oEvent) {
|
|
1004
|
+
this.getExtensionAPI().updateAppState();
|
|
942
1005
|
}
|
|
943
1006
|
},
|
|
944
1007
|
formatters: {
|
|
945
|
-
isDraftIndicatorVisible: function(
|
|
946
|
-
sPropertyPath,
|
|
947
|
-
sSemanticKeyHasDraftIndicator,
|
|
948
|
-
HasDraftEntity,
|
|
949
|
-
IsActiveEntity,
|
|
950
|
-
hideDraftInfo
|
|
951
|
-
) {
|
|
952
|
-
if (
|
|
953
|
-
IsActiveEntity !== undefined &&
|
|
954
|
-
HasDraftEntity !== undefined &&
|
|
955
|
-
(!IsActiveEntity || HasDraftEntity) &&
|
|
956
|
-
!hideDraftInfo
|
|
957
|
-
) {
|
|
958
|
-
return sPropertyPath === sSemanticKeyHasDraftIndicator;
|
|
959
|
-
} else {
|
|
960
|
-
return false;
|
|
961
|
-
}
|
|
962
|
-
},
|
|
963
1008
|
/**
|
|
964
1009
|
* Method to set the message text for the multiple entity sets when fields in the FilterBar need to be ignored.
|
|
965
1010
|
*
|
|
@@ -968,10 +1013,10 @@ sap.ui.define(
|
|
|
968
1013
|
* @returns {string} Message text
|
|
969
1014
|
*/
|
|
970
1015
|
setTabMessageStrip: function(aIgnoredFields, sTabTitle) {
|
|
971
|
-
var sText = ""
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
1016
|
+
var sText = "",
|
|
1017
|
+
oFilterBar = this._getFilterBarControl();
|
|
1018
|
+
if (oFilterBar && Array.isArray(aIgnoredFields) && aIgnoredFields.length > 0 && sTabTitle) {
|
|
1019
|
+
var sFilterBarEntityPath = oFilterBar.data("entityType"),
|
|
975
1020
|
oMetaModel = this.getView()
|
|
976
1021
|
.getModel()
|
|
977
1022
|
.getMetaModel(),
|
|
@@ -997,6 +1042,42 @@ sap.ui.define(
|
|
|
997
1042
|
}
|
|
998
1043
|
}
|
|
999
1044
|
return sText;
|
|
1045
|
+
},
|
|
1046
|
+
/**
|
|
1047
|
+
* Formatter for the message text for the chart when fields in the FilterBar need to be ignored.
|
|
1048
|
+
*
|
|
1049
|
+
* @param {Array} aIgnoredFields Array of ignored fields in the FilterBar for the current tab (multiple entity sets)
|
|
1050
|
+
* @returns {string} Message text
|
|
1051
|
+
*/
|
|
1052
|
+
setChartMessageStrip: function(aIgnoredFields) {
|
|
1053
|
+
var sText = "";
|
|
1054
|
+
if (Array.isArray(aIgnoredFields) && aIgnoredFields.length > 0) {
|
|
1055
|
+
var oFilterBar = this._getFilterBarControl(),
|
|
1056
|
+
sFilterBarEntityPath = oFilterBar.data("entityType"),
|
|
1057
|
+
oMetaModel = this.getView()
|
|
1058
|
+
.getModel()
|
|
1059
|
+
.getMetaModel(),
|
|
1060
|
+
oResourceBundle = sap.ui.getCore().getLibraryResourceBundle("sap.fe.templates"),
|
|
1061
|
+
aIgnoredLabels = aIgnoredFields.map(function(sProperty) {
|
|
1062
|
+
if (sProperty === "$search") {
|
|
1063
|
+
var oMacroResourceBundle = sap.ui.getCore().getLibraryResourceBundle("sap.fe.macros");
|
|
1064
|
+
return oMacroResourceBundle ? oMacroResourceBundle.getText("M_FILTERBAR_SEARCH") : "";
|
|
1065
|
+
}
|
|
1066
|
+
var sLabel = oMetaModel.getObject(
|
|
1067
|
+
sFilterBarEntityPath + sProperty + "@com.sap.vocabularies.Common.v1.Label"
|
|
1068
|
+
);
|
|
1069
|
+
return DelegateUtil.getLocalizedText(sLabel, oFilterBar);
|
|
1070
|
+
});
|
|
1071
|
+
if (oResourceBundle) {
|
|
1072
|
+
var sResource =
|
|
1073
|
+
"C_LR_MULTIVIZ_CHART_" +
|
|
1074
|
+
(aIgnoredLabels.length === 1 ? "SINGLE" : "MULTI") +
|
|
1075
|
+
"_IGNORED_FILTER_" +
|
|
1076
|
+
(Device.system.desktop ? "LARGE" : "SMALL");
|
|
1077
|
+
sText = oResourceBundle.getText(sResource, [aIgnoredLabels.join(", ")]);
|
|
1078
|
+
}
|
|
1079
|
+
}
|
|
1080
|
+
return sText;
|
|
1000
1081
|
}
|
|
1001
1082
|
}
|
|
1002
1083
|
});
|
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* SAPUI5
|
|
3
|
-
|
|
2
|
+
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
3
|
+
(c) Copyright 2009-2021 SAP SE. All rights reserved
|
|
4
|
+
|
|
4
5
|
*/
|
|
5
|
-
sap.ui.define(["sap/fe/core/CommonUtils"], function(CommonUtils) {
|
|
6
|
+
sap.ui.define(["sap/fe/core/CommonUtils", "sap/fe/macros/filter/FilterUtils"], function(CommonUtils, FilterUtils) {
|
|
6
7
|
"use strict";
|
|
7
8
|
return {
|
|
8
9
|
adaptNavigationContext: function(oSelectionVariant, oTargetInfo) {
|
|
10
|
+
var oView = this.getView(),
|
|
11
|
+
oController = oView.getController(),
|
|
12
|
+
oFilterBar = oController._getFilterBarControl();
|
|
9
13
|
// Adding filter bar values to the navigation does not make sense if no context has been selected.
|
|
10
|
-
// Hence only consider filter bar values when
|
|
11
|
-
if (!oSelectionVariant.isEmpty()) {
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
var oFilterBarConditions = Object.assign({}, this.base.getView().getController().filterBarConditions);
|
|
17
|
-
var aParameters = [];
|
|
14
|
+
// Hence only consider filter bar values when SelectionVariant is not empty
|
|
15
|
+
if (oFilterBar && !oSelectionVariant.isEmpty()) {
|
|
16
|
+
var oViewData = oView.getViewData(),
|
|
17
|
+
sRootPath = oViewData.fullContextPath + oViewData.entitySet,
|
|
18
|
+
oFilterBarConditions = Object.assign({}, this.base.getView().getController().filterBarConditions),
|
|
19
|
+
aParameters = [];
|
|
18
20
|
|
|
19
21
|
if (oViewData.contextPath) {
|
|
20
22
|
var oMetaModel = oView.getModel().getMetaModel(),
|
|
@@ -28,8 +30,11 @@ sap.ui.define(["sap/fe/core/CommonUtils"], function(CommonUtils) {
|
|
|
28
30
|
sRootPath,
|
|
29
31
|
aParameters
|
|
30
32
|
);
|
|
33
|
+
var oFilterInfo = FilterUtils.getFilterInfo(oFilterBar, {
|
|
34
|
+
targetControl: oController._getTable()
|
|
35
|
+
}).filters;
|
|
31
36
|
var oInternalModelContext = oView.getBindingContext("internal");
|
|
32
|
-
var mTabs = oInternalModelContext.getProperty("tabs");
|
|
37
|
+
var mTabs = oInternalModelContext && oInternalModelContext.getProperty("tabs");
|
|
33
38
|
// Do we need to exclude Fields (mutli tables mode)?
|
|
34
39
|
if (mTabs) {
|
|
35
40
|
var aIgnoredFieldsForTab = mTabs.ignoredFields[mTabs.selected];
|
|
@@ -40,7 +45,7 @@ sap.ui.define(["sap/fe/core/CommonUtils"], function(CommonUtils) {
|
|
|
40
45
|
}
|
|
41
46
|
}
|
|
42
47
|
// TODO: move this also into the intent based navigation controller extension
|
|
43
|
-
CommonUtils.addExternalStateFiltersToSelectionVariant(oSelectionVariant, oFilterBarConditions, oTargetInfo);
|
|
48
|
+
CommonUtils.addExternalStateFiltersToSelectionVariant(oSelectionVariant, oFilterBarConditions, oTargetInfo, oFilterInfo);
|
|
44
49
|
delete oTargetInfo.propertiesWithoutConflict;
|
|
45
50
|
}
|
|
46
51
|
},
|