@sapui5/sap.fe.templates 1.96.4 → 1.99.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 +8 -3
- 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 +11 -2
- package/src/sap/fe/templates/ListReport/ExtensionAPI.js +12 -6
- package/src/sap/fe/templates/ListReport/ListReport.view.xml +15 -9
- package/src/sap/fe/templates/ListReport/ListReportController.controller.js +195 -71
- package/src/sap/fe/templates/ListReport/overrides/IntentBasedNavigation.js +13 -12
- package/src/sap/fe/templates/ListReport/overrides/Share.js +10 -8
- package/src/sap/fe/templates/ListReport/overrides/ViewState.js +116 -45
- package/src/sap/fe/templates/ListReport/view/fragments/CollectionVisualization.fragment.xml +8 -0
- package/src/sap/fe/templates/ObjectPage/AnnotationHelper.js +6 -5
- package/src/sap/fe/templates/ObjectPage/Component.js +36 -16
- package/src/sap/fe/templates/ObjectPage/ExtensionAPI.js +18 -2
- package/src/sap/fe/templates/ObjectPage/ObjectPage.view.xml +72 -94
- package/src/sap/fe/templates/ObjectPage/ObjectPageController.controller.js +107 -72
- package/src/sap/fe/templates/ObjectPage/controls/StashableHBox.js +11 -2
- 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 +3 -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 +13 -19
- package/src/sap/fe/templates/ObjectPage/overrides/ViewState.js +6 -5
- 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/FooterContent.fragment.xml +5 -1
- package/src/sap/fe/templates/ObjectPage/view/fragments/HeaderDataPointTitle.fragment.xml +26 -16
- 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/ObjectPageHeaderForm.fragment.xml +5 -5
- package/src/sap/fe/templates/ObjectPage/view/fragments/Section.fragment.xml +23 -5
- package/src/sap/fe/templates/ObjectPage/view/fragments/SectionContentLazyLoader.fragment.xml +181 -0
- package/src/sap/fe/templates/ObjectPage/view/fragments/SectionFormContent.fragment.xml +3 -3
- package/src/sap/fe/templates/ObjectPage/view/fragments/SectionMoreFormContent.fragment.xml +3 -3
- package/src/sap/fe/templates/RootContainer/controller/Fcl.controller.js +8 -6
- package/src/sap/fe/templates/RootContainer/controller/NavContainer.controller.js +57 -34
- 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 +2 -0
- 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 +24 -6
- package/src/sap/fe/templates/messagebundle_bg.properties +24 -6
- package/src/sap/fe/templates/messagebundle_ca.properties +24 -6
- package/src/sap/fe/templates/messagebundle_cs.properties +24 -6
- package/src/sap/fe/templates/messagebundle_cy.properties +24 -6
- package/src/sap/fe/templates/messagebundle_da.properties +24 -6
- package/src/sap/fe/templates/messagebundle_de.properties +24 -6
- package/src/sap/fe/templates/messagebundle_el.properties +25 -7
- package/src/sap/fe/templates/messagebundle_en.properties +24 -6
- package/src/sap/fe/templates/messagebundle_en_GB.properties +24 -6
- package/src/sap/fe/templates/messagebundle_en_US_sappsd.properties +25 -7
- package/src/sap/fe/templates/messagebundle_en_US_saprigi.properties +25 -7
- package/src/sap/fe/templates/messagebundle_en_US_saptrc.properties +25 -7
- package/src/sap/fe/templates/messagebundle_es.properties +32 -14
- package/src/sap/fe/templates/messagebundle_es_MX.properties +24 -6
- package/src/sap/fe/templates/messagebundle_et.properties +24 -6
- package/src/sap/fe/templates/messagebundle_fi.properties +24 -6
- package/src/sap/fe/templates/messagebundle_fr.properties +25 -7
- package/src/sap/fe/templates/messagebundle_fr_CA.properties +24 -6
- package/src/sap/fe/templates/messagebundle_hi.properties +24 -6
- package/src/sap/fe/templates/messagebundle_hr.properties +25 -7
- package/src/sap/fe/templates/messagebundle_hu.properties +24 -6
- package/src/sap/fe/templates/messagebundle_id.properties +26 -8
- package/src/sap/fe/templates/messagebundle_it.properties +24 -6
- package/src/sap/fe/templates/messagebundle_iw.properties +24 -6
- package/src/sap/fe/templates/messagebundle_ja.properties +25 -7
- package/src/sap/fe/templates/messagebundle_kk.properties +24 -6
- package/src/sap/fe/templates/messagebundle_ko.properties +24 -6
- package/src/sap/fe/templates/messagebundle_lt.properties +24 -6
- package/src/sap/fe/templates/messagebundle_lv.properties +24 -6
- package/src/sap/fe/templates/messagebundle_ms.properties +24 -6
- package/src/sap/fe/templates/messagebundle_nl.properties +24 -6
- package/src/sap/fe/templates/messagebundle_no.properties +24 -6
- package/src/sap/fe/templates/messagebundle_pl.properties +24 -6
- package/src/sap/fe/templates/messagebundle_pt.properties +27 -9
- package/src/sap/fe/templates/messagebundle_pt_PT.properties +25 -7
- package/src/sap/fe/templates/messagebundle_ro.properties +24 -6
- package/src/sap/fe/templates/messagebundle_ru.properties +24 -6
- package/src/sap/fe/templates/messagebundle_sh.properties +24 -6
- package/src/sap/fe/templates/messagebundle_sk.properties +24 -6
- package/src/sap/fe/templates/messagebundle_sl.properties +24 -6
- package/src/sap/fe/templates/messagebundle_sv.properties +25 -7
- package/src/sap/fe/templates/messagebundle_th.properties +24 -6
- package/src/sap/fe/templates/messagebundle_tr.properties +25 -7
- package/src/sap/fe/templates/messagebundle_uk.properties +25 -7
- package/src/sap/fe/templates/messagebundle_vi.properties +24 -6
- package/src/sap/fe/templates/messagebundle_zh_CN.properties +24 -6
- package/src/sap/fe/templates/messagebundle_zh_TW.properties +24 -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(
|
|
@@ -34,7 +35,9 @@ sap.ui.define(
|
|
|
34
35
|
"sap/fe/macros/CommonHelper",
|
|
35
36
|
"sap/fe/core/controllerextensions/KPIManagement",
|
|
36
37
|
"sap/fe/templates/TableScroller",
|
|
37
|
-
"sap/fe/core/controllerextensions/Placeholder"
|
|
38
|
+
"sap/fe/core/controllerextensions/Placeholder",
|
|
39
|
+
"sap/ui/fl/write/api/ControlPersonalizationWriteAPI",
|
|
40
|
+
"sap/fe/core/controllerextensions/MassEdit"
|
|
38
41
|
],
|
|
39
42
|
function(
|
|
40
43
|
PageController,
|
|
@@ -66,7 +69,9 @@ sap.ui.define(
|
|
|
66
69
|
CommonHelper,
|
|
67
70
|
KPIManagement,
|
|
68
71
|
TableScroller,
|
|
69
|
-
Placeholder
|
|
72
|
+
Placeholder,
|
|
73
|
+
ControlPersonalizationWriteAPI,
|
|
74
|
+
MassEdit
|
|
70
75
|
) {
|
|
71
76
|
"use strict";
|
|
72
77
|
var TemplateContentView = CoreLibrary.TemplateContentView,
|
|
@@ -116,6 +121,7 @@ sap.ui.define(
|
|
|
116
121
|
viewState: ViewState.override(ViewStateOverrides),
|
|
117
122
|
kpiManagement: KPIManagement,
|
|
118
123
|
placeholder: Placeholder,
|
|
124
|
+
massEdit: MassEdit,
|
|
119
125
|
|
|
120
126
|
getExtensionAPI: function() {
|
|
121
127
|
if (!this.extensionAPI) {
|
|
@@ -141,6 +147,7 @@ sap.ui.define(
|
|
|
141
147
|
CommonUtils.addEventToBindingInfo(oControl, "dataRequested", oUpdateCounts);
|
|
142
148
|
});
|
|
143
149
|
}
|
|
150
|
+
//TODO: This is only a temporary approach and will be removed once app state behaviour is finalized.
|
|
144
151
|
|
|
145
152
|
oInternalModelContext.setProperty("hasPendingFilters", true);
|
|
146
153
|
oInternalModelContext.setProperty("appliedFilters", "");
|
|
@@ -169,12 +176,8 @@ sap.ui.define(
|
|
|
169
176
|
.waitForRouteMatchBeforeNavigation();
|
|
170
177
|
|
|
171
178
|
this._isMultiMode() && this._updateMultiControlHiddenStatus();
|
|
172
|
-
|
|
173
|
-
FilterUtils.attachConditionHandling(this._getFilterBarControl());
|
|
174
179
|
},
|
|
175
180
|
onExit: function() {
|
|
176
|
-
FilterUtils.detachConditionHandling(this._getFilterBarControl());
|
|
177
|
-
|
|
178
181
|
delete this._sEntitySet;
|
|
179
182
|
delete this.filterBarConditions;
|
|
180
183
|
delete this._oListReportControl;
|
|
@@ -192,6 +195,10 @@ sap.ui.define(
|
|
|
192
195
|
if (!this.sUpdateTimer) {
|
|
193
196
|
this.sUpdateTimer = setTimeout(function() {
|
|
194
197
|
oTableBinding.refresh();
|
|
198
|
+
if (that._isMultiMode()) {
|
|
199
|
+
that._setCountsOutDated();
|
|
200
|
+
that._updateCounts();
|
|
201
|
+
}
|
|
195
202
|
delete that.sUpdateTimer;
|
|
196
203
|
}, 0);
|
|
197
204
|
}
|
|
@@ -254,6 +261,11 @@ sap.ui.define(
|
|
|
254
261
|
oFilterBar.setFocusOnFirstErroneousField();
|
|
255
262
|
}
|
|
256
263
|
}
|
|
264
|
+
|
|
265
|
+
// Remove the handler on back navigation that displays Draft confirmation
|
|
266
|
+
this.getAppComponent()
|
|
267
|
+
.getShellServices()
|
|
268
|
+
.setBackNavigation(undefined);
|
|
257
269
|
},
|
|
258
270
|
|
|
259
271
|
/**
|
|
@@ -339,19 +351,14 @@ sap.ui.define(
|
|
|
339
351
|
});
|
|
340
352
|
},
|
|
341
353
|
_getPageTitleInformation: function() {
|
|
342
|
-
var
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
.getView()
|
|
351
|
-
.getContent()[0]
|
|
352
|
-
.data().ListReportSubtitle;
|
|
353
|
-
resolve(oTitleInfo);
|
|
354
|
-
});
|
|
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;
|
|
355
362
|
},
|
|
356
363
|
_getFilterBarControl: function() {
|
|
357
364
|
return this.getView().byId(this._getFilterBarControlId());
|
|
@@ -435,8 +442,13 @@ sap.ui.define(
|
|
|
435
442
|
}
|
|
436
443
|
});
|
|
437
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] : [];
|
|
438
451
|
}
|
|
439
|
-
return sKey === "Chart" ? [this._getChart()] : [this._getTable()];
|
|
440
452
|
},
|
|
441
453
|
_getDefaultPath: function() {
|
|
442
454
|
var defaultPath = this.getView()
|
|
@@ -521,7 +533,7 @@ sap.ui.define(
|
|
|
521
533
|
* requests when FilterBar is changed or LR is initialized
|
|
522
534
|
* Best workflow would be to suspend table binding but
|
|
523
535
|
* if the user switch quickly between tabs the batch response of previous
|
|
524
|
-
* is
|
|
536
|
+
* is received when previous tab is already disabled (binding is suspended) and
|
|
525
537
|
* generates error.
|
|
526
538
|
* A temporary solution (if we find better workflow) is to set a customData and don't trigger
|
|
527
539
|
* rebindTable if this customData is set to true.
|
|
@@ -543,7 +555,7 @@ sap.ui.define(
|
|
|
543
555
|
* @param {sap.ui.model.context} oInternalModelContext The internal model context
|
|
544
556
|
* @param {sap.ui.mdc.FilterBar} oFilterBar MDC filter bar
|
|
545
557
|
*/
|
|
546
|
-
|
|
558
|
+
_updateMultiTabNotApplicableFields: function(oInternalModelContext, oFilterBar) {
|
|
547
559
|
var mCache = {};
|
|
548
560
|
var ignoredFields = {},
|
|
549
561
|
aTables = this._getControls("table"),
|
|
@@ -576,16 +588,45 @@ sap.ui.define(
|
|
|
576
588
|
});
|
|
577
589
|
oInternalModelContext.setProperty("tabs/ignoredFields", ignoredFields);
|
|
578
590
|
},
|
|
591
|
+
/**
|
|
592
|
+
* 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).
|
|
593
|
+
*
|
|
594
|
+
* @param {sap.ui.model.context} oInternalModelContext The internal model context
|
|
595
|
+
* @param {sap.ui.mdc.FilterBar} oFilterBar MDC filter bar
|
|
596
|
+
*/
|
|
597
|
+
_updateALPNotApplicableFields: function(oInternalModelContext, oFilterBar) {
|
|
598
|
+
var mCache = {};
|
|
599
|
+
var ignoredFields = {},
|
|
600
|
+
aTables = this._getControls("table"),
|
|
601
|
+
aCharts = this._getControls("Chart");
|
|
602
|
+
|
|
603
|
+
if (!aTables.length || !aCharts.length) {
|
|
604
|
+
// If there's not a table and a chart, we're not in the ALP case
|
|
605
|
+
return;
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
// For the moment, there's nothing for tables...
|
|
609
|
+
aCharts.forEach(function(oChart) {
|
|
610
|
+
var sChartEntityPath = oChart.data("targetCollectionPath"),
|
|
611
|
+
sChartEntitySet = sChartEntityPath.slice(1),
|
|
612
|
+
sCacheKey = sChartEntitySet + "Chart";
|
|
613
|
+
if (!mCache[sCacheKey]) {
|
|
614
|
+
mCache[sCacheKey] = FilterUtils.getNotApplicableFilters(oFilterBar, oChart);
|
|
615
|
+
}
|
|
616
|
+
ignoredFields[sCacheKey] = mCache[sCacheKey];
|
|
617
|
+
});
|
|
618
|
+
oInternalModelContext.setProperty("controls/ignoredFields", ignoredFields);
|
|
619
|
+
},
|
|
579
620
|
_updateMultiModeSelectedControl: function() {
|
|
580
621
|
this._sEntitySet = undefined;
|
|
581
622
|
this._oListReportControl = undefined;
|
|
582
623
|
this._getCurrentControl();
|
|
583
624
|
},
|
|
584
625
|
_updateCounts: function() {
|
|
585
|
-
this.
|
|
626
|
+
this._updateMultiModeCounts();
|
|
586
627
|
},
|
|
587
628
|
/**
|
|
588
|
-
* Method to determine if a tab from the list report is a custom tab
|
|
629
|
+
* Method to determine if a tab from the list report is a custom tab.
|
|
589
630
|
*
|
|
590
631
|
* @function
|
|
591
632
|
* @name _isCustomTab
|
|
@@ -595,7 +636,18 @@ sap.ui.define(
|
|
|
595
636
|
var oMultiModeControl = this._getMultiModeControl();
|
|
596
637
|
return oMultiModeControl && oMultiModeControl.getSelectedKey().indexOf("::CustomTab::") > -1;
|
|
597
638
|
},
|
|
598
|
-
|
|
639
|
+
_setCountsOutDated: function() {
|
|
640
|
+
var oMultiModeControl = this._getMultiModeControl();
|
|
641
|
+
if (oMultiModeControl && oMultiModeControl.data("showCounts") === "true") {
|
|
642
|
+
var aItems = oMultiModeControl.getItems();
|
|
643
|
+
aItems.forEach(function(oItem) {
|
|
644
|
+
if (!oItem.getKey().indexOf("fe::Chart") > -1) {
|
|
645
|
+
oItem.data("outdatedCounts", true);
|
|
646
|
+
}
|
|
647
|
+
});
|
|
648
|
+
}
|
|
649
|
+
},
|
|
650
|
+
_updateMultiModeCounts: function() {
|
|
599
651
|
var that = this;
|
|
600
652
|
var aBindingPromises = [];
|
|
601
653
|
var oMultiModeControl = this._getMultiModeControl();
|
|
@@ -608,7 +660,7 @@ sap.ui.define(
|
|
|
608
660
|
var oControl = that.getView().byId(oItem.getKey());
|
|
609
661
|
if (
|
|
610
662
|
oControl &&
|
|
611
|
-
!oControl.isA("sap.ui.mdc.
|
|
663
|
+
!oControl.isA("sap.ui.mdc.Chart") &&
|
|
612
664
|
(oItem.data("outdatedCounts") || oControl.getId() === sDisplayedControlId)
|
|
613
665
|
) {
|
|
614
666
|
aCompliantTabs.push({
|
|
@@ -641,17 +693,22 @@ sap.ui.define(
|
|
|
641
693
|
});
|
|
642
694
|
}
|
|
643
695
|
},
|
|
696
|
+
_isFilterBarHidden: function() {
|
|
697
|
+
return this.getView().getViewData().hideFilterBar;
|
|
698
|
+
},
|
|
644
699
|
_shouldAutoTriggerSearch: function(oVM) {
|
|
645
700
|
if (
|
|
646
701
|
this.getView().getViewData().initialLoad === InitialLoadMode.Auto &&
|
|
647
702
|
(!oVM || oVM.getStandardVariantKey() === oVM.getCurrentVariantKey())
|
|
648
703
|
) {
|
|
649
|
-
var oFilterBar = this._getFilterBarControl()
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
704
|
+
var oFilterBar = this._getFilterBarControl();
|
|
705
|
+
if (oFilterBar) {
|
|
706
|
+
var oConditions = oFilterBar.getConditions();
|
|
707
|
+
for (var sKey in oConditions) {
|
|
708
|
+
// ignore filters starting with $ (e.g. $search, $editState)
|
|
709
|
+
if (!sKey.startsWith("$") && Array.isArray(oConditions[sKey]) && oConditions[sKey].length) {
|
|
710
|
+
return true;
|
|
711
|
+
}
|
|
655
712
|
}
|
|
656
713
|
}
|
|
657
714
|
}
|
|
@@ -660,14 +717,14 @@ sap.ui.define(
|
|
|
660
717
|
},
|
|
661
718
|
_updateTable: function(oTable) {
|
|
662
719
|
if (!oTable.isTableBound() || this.hasPendingChartChanges) {
|
|
663
|
-
oTable.
|
|
720
|
+
oTable.rebind();
|
|
664
721
|
this.hasPendingChartChanges = false;
|
|
665
722
|
}
|
|
666
723
|
},
|
|
667
724
|
_updateChart: function(oChart) {
|
|
668
725
|
var oInnerChart = oChart.getControlDelegate()._getChart(oChart);
|
|
669
726
|
if (!(oInnerChart && oInnerChart.isBound("data")) || this.hasPendingTableChanges) {
|
|
670
|
-
oChart.getControlDelegate().
|
|
727
|
+
oChart.getControlDelegate().rebind(oChart, oInnerChart.getBindingInfo("data"));
|
|
671
728
|
this.hasPendingTableChanges = false;
|
|
672
729
|
}
|
|
673
730
|
},
|
|
@@ -675,30 +732,34 @@ sap.ui.define(
|
|
|
675
732
|
onTabMultiModeChange: function(oEvent) {
|
|
676
733
|
this._updateMultiModeSelectedControl();
|
|
677
734
|
this._updateMultiControlHiddenStatus();
|
|
735
|
+
|
|
678
736
|
var oFilterBar = this._getFilterBarControl();
|
|
679
737
|
var oInternalModelContext = this.getView().getBindingContext("internal");
|
|
680
738
|
var oDisplayedControl = this._getCurrentControl();
|
|
681
739
|
var oMultiModeControl = this._getMultiModeControl();
|
|
682
|
-
|
|
683
|
-
|
|
740
|
+
var sSelectedKey = oMultiModeControl.getSelectedKey();
|
|
741
|
+
var sPreviousSelectedKey = oEvent && oEvent.mParameters ? oEvent.mParameters.previousKey : undefined;
|
|
742
|
+
|
|
743
|
+
oInternalModelContext.setProperty("tabs/selected", sSelectedKey);
|
|
744
|
+
if (oInternalModelContext.getProperty("hasPendingFilters") !== true) {
|
|
684
745
|
// No pending filters into FilterBar
|
|
685
|
-
if (this._isCustomTab()) {
|
|
746
|
+
if (oFilterBar && this._isCustomTab()) {
|
|
686
747
|
var oFilterConditions = oFilterBar.getFilterConditions();
|
|
687
748
|
this.onViewNeedsRefresh({
|
|
688
749
|
filterConditions: oFilterConditions,
|
|
689
|
-
currentTabId:
|
|
750
|
+
currentTabId: sSelectedKey,
|
|
690
751
|
refreshCause: "tabChanged"
|
|
691
752
|
});
|
|
692
753
|
} else if (
|
|
693
|
-
!oDisplayedControl.isA("sap.ui.mdc.
|
|
754
|
+
!oDisplayedControl.isA("sap.ui.mdc.Chart") &&
|
|
694
755
|
(!oDisplayedControl.getRowBinding() || // first time the tab/table is displayed
|
|
695
756
|
oDisplayedControl.data("outdatedRows") === true)
|
|
696
757
|
) {
|
|
697
758
|
// Search has been triggered on a different tab {}
|
|
698
|
-
oDisplayedControl.
|
|
759
|
+
oDisplayedControl.rebind();
|
|
699
760
|
oDisplayedControl.data("outdatedRows", false);
|
|
700
761
|
} else if (
|
|
701
|
-
oDisplayedControl.isA("sap.ui.mdc.
|
|
762
|
+
oDisplayedControl.isA("sap.ui.mdc.Chart") &&
|
|
702
763
|
(!oDisplayedControl
|
|
703
764
|
.getControlDelegate()
|
|
704
765
|
._getChart(oDisplayedControl)
|
|
@@ -706,23 +767,39 @@ sap.ui.define(
|
|
|
706
767
|
oDisplayedControl.data("outdatedRows") === true)
|
|
707
768
|
) {
|
|
708
769
|
var oInnerChart = oDisplayedControl.getControlDelegate()._getChart(oDisplayedControl);
|
|
709
|
-
oDisplayedControl.getControlDelegate().
|
|
770
|
+
oDisplayedControl.getControlDelegate().rebind(oDisplayedControl, oInnerChart.getBindingInfo("data"));
|
|
710
771
|
oDisplayedControl.data("outdatedRows", false);
|
|
711
772
|
}
|
|
712
773
|
}
|
|
774
|
+
|
|
775
|
+
if (oEvent && oEvent.mParameters && sPreviousSelectedKey !== oEvent.mParameters.selectedKey) {
|
|
776
|
+
ControlPersonalizationWriteAPI.add({
|
|
777
|
+
changes: [
|
|
778
|
+
{
|
|
779
|
+
changeSpecificData: {
|
|
780
|
+
changeType: "selectIconTabBarFilter",
|
|
781
|
+
content: {
|
|
782
|
+
selectedKey: sSelectedKey,
|
|
783
|
+
previousSelectedKey: sPreviousSelectedKey
|
|
784
|
+
}
|
|
785
|
+
},
|
|
786
|
+
selectorElement: oMultiModeControl
|
|
787
|
+
}
|
|
788
|
+
]
|
|
789
|
+
});
|
|
790
|
+
}
|
|
713
791
|
this.getExtensionAPI().updateAppState();
|
|
714
792
|
},
|
|
715
793
|
onFiltersChanged: function(oEvent) {
|
|
716
|
-
var oFilterBar = this._getFilterBarControl()
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
this.getExtensionAPI().updateAppState();
|
|
794
|
+
var oFilterBar = this._getFilterBarControl();
|
|
795
|
+
if (oFilterBar) {
|
|
796
|
+
var oInternalModelContext = this.getView().getBindingContext("internal");
|
|
797
|
+
// Pending filters into FilterBar to be used for custom views
|
|
798
|
+
this.onPendingFilters();
|
|
799
|
+
oInternalModelContext.setProperty("appliedFilters", oFilterBar.getAssignedFiltersText().filtersText);
|
|
800
|
+
if (oEvent.getParameter("conditionsBased")) {
|
|
801
|
+
oInternalModelContext.setProperty("hasPendingFilters", true);
|
|
802
|
+
}
|
|
726
803
|
}
|
|
727
804
|
},
|
|
728
805
|
onVariantSelected: function(oEvent) {
|
|
@@ -730,6 +807,9 @@ sap.ui.define(
|
|
|
730
807
|
oVM = oEvent.getSource();
|
|
731
808
|
// setTimeout cause the variant needs to be applied before judging the auto search or updating the app state
|
|
732
809
|
setTimeout(function() {
|
|
810
|
+
if (that._isMultiMode()) {
|
|
811
|
+
that.handlers.onTabMultiModeChange.apply(that);
|
|
812
|
+
}
|
|
733
813
|
if (that._shouldAutoTriggerSearch(oVM)) {
|
|
734
814
|
// the app state will be updated via onSearch handler
|
|
735
815
|
return that._getFilterBarControl().triggerSearch();
|
|
@@ -750,21 +830,19 @@ sap.ui.define(
|
|
|
750
830
|
var oFilterBar = this._getFilterBarControl();
|
|
751
831
|
var oInternalModelContext = this.getView().getBindingContext("internal");
|
|
752
832
|
var oMdcChart = this.getChartControl();
|
|
833
|
+
var bHideDraft = FilterUtils.getEditStateIsHideDraft(oFilterBar.getConditions());
|
|
753
834
|
oInternalModelContext.setProperty("hasPendingFilters", false);
|
|
835
|
+
oInternalModelContext.setProperty("hideDraftInfo", bHideDraft);
|
|
754
836
|
if (this._isMultiMode()) {
|
|
755
837
|
var aControls = this._getControls(),
|
|
756
838
|
oMultiModeControl = this._getMultiModeControl();
|
|
757
|
-
|
|
758
|
-
var aItems = oMultiModeControl.getItems();
|
|
759
|
-
aItems.forEach(function(oItem) {
|
|
760
|
-
if (!oItem.getKey().indexOf("fe::Chart") > -1) {
|
|
761
|
-
oItem.data("outdatedCounts", true);
|
|
762
|
-
}
|
|
763
|
-
});
|
|
764
|
-
}
|
|
839
|
+
this._setCountsOutDated();
|
|
765
840
|
if (!this._isCustomTab()) {
|
|
766
841
|
var sDisplayedControlId = this._getCurrentControl().getId();
|
|
767
|
-
this.
|
|
842
|
+
this._updateMultiTabNotApplicableFields(oInternalModelContext, oFilterBar);
|
|
843
|
+
// This should be done outside the search event handler of the filter bar.
|
|
844
|
+
// The same logic is required when filter bar is hidden and multiple tables exist on the LR.
|
|
845
|
+
// This is currently done in ListReport/overrides/ViewState.js#onAfterStateApplied()
|
|
768
846
|
aControls.forEach(function(oControl) {
|
|
769
847
|
oControl.data("outdatedRows", oControl.getId() !== sDisplayedControlId);
|
|
770
848
|
});
|
|
@@ -776,6 +854,8 @@ sap.ui.define(
|
|
|
776
854
|
refreshCause: "search"
|
|
777
855
|
});
|
|
778
856
|
}
|
|
857
|
+
} else {
|
|
858
|
+
this._updateALPNotApplicableFields(oInternalModelContext, oFilterBar);
|
|
779
859
|
}
|
|
780
860
|
if (oMdcChart) {
|
|
781
861
|
// disable bound actions TODO: this clears everything for the chart?
|
|
@@ -803,13 +883,18 @@ sap.ui.define(
|
|
|
803
883
|
if (this.getView().getViewData().liveMode === false) {
|
|
804
884
|
this.getExtensionAPI().updateAppState();
|
|
805
885
|
}
|
|
886
|
+
|
|
887
|
+
if (Device.system.phone) {
|
|
888
|
+
var oDynamicPage = this.getView().byId("fe::ListReport");
|
|
889
|
+
oDynamicPage.setHeaderExpanded(false);
|
|
890
|
+
}
|
|
806
891
|
},
|
|
807
892
|
/**
|
|
808
893
|
* Triggers an outbound navigation when a user chooses the chevron.
|
|
809
894
|
*
|
|
810
895
|
* @param {object} oController
|
|
811
896
|
* @param {string} sOutboundTarget Name of the outbound target (needs to be defined in the manifest)
|
|
812
|
-
* @param {sap.ui.model.odata.v4.Context} oContext The context that
|
|
897
|
+
* @param {sap.ui.model.odata.v4.Context} oContext The context that contains the data for the target app
|
|
813
898
|
* @param {string} sCreatePath Create path when the chevron is created.
|
|
814
899
|
* @returns {Promise} Promise which is resolved once the navigation is triggered
|
|
815
900
|
* @ui5-restricted
|
|
@@ -838,7 +923,7 @@ sap.ui.define(
|
|
|
838
923
|
if (sTemplateContentView === TemplateContentView.Chart) {
|
|
839
924
|
this.hasPendingChartChanges = true;
|
|
840
925
|
} else {
|
|
841
|
-
oTable && oTable.
|
|
926
|
+
oTable && oTable.rebind();
|
|
842
927
|
this.hasPendingChartChanges = false;
|
|
843
928
|
}
|
|
844
929
|
},
|
|
@@ -901,6 +986,9 @@ sap.ui.define(
|
|
|
901
986
|
)
|
|
902
987
|
.setVisible(true);
|
|
903
988
|
}
|
|
989
|
+
},
|
|
990
|
+
onStateChanged: function(oEvent) {
|
|
991
|
+
this.getExtensionAPI().updateAppState();
|
|
904
992
|
}
|
|
905
993
|
},
|
|
906
994
|
formatters: {
|
|
@@ -923,17 +1011,17 @@ sap.ui.define(
|
|
|
923
1011
|
}
|
|
924
1012
|
},
|
|
925
1013
|
/**
|
|
926
|
-
* Method to set the message text for the
|
|
1014
|
+
* Method to set the message text for the multiple entity sets when fields in the FilterBar need to be ignored.
|
|
927
1015
|
*
|
|
928
|
-
* @param {Array} aIgnoredFields Array of ignored fields in the FilterBar for the current tab (
|
|
1016
|
+
* @param {Array} aIgnoredFields Array of ignored fields in the FilterBar for the current tab (multiple entity sets)
|
|
929
1017
|
* @param {string} sTabTitle Tab title
|
|
930
1018
|
* @returns {string} Message text
|
|
931
1019
|
*/
|
|
932
1020
|
setTabMessageStrip: function(aIgnoredFields, sTabTitle) {
|
|
933
|
-
var sText = ""
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
1021
|
+
var sText = "",
|
|
1022
|
+
oFilterBar = this._getFilterBarControl();
|
|
1023
|
+
if (oFilterBar && Array.isArray(aIgnoredFields) && aIgnoredFields.length > 0 && sTabTitle) {
|
|
1024
|
+
var sFilterBarEntityPath = oFilterBar.data("entityType"),
|
|
937
1025
|
oMetaModel = this.getView()
|
|
938
1026
|
.getModel()
|
|
939
1027
|
.getMetaModel(),
|
|
@@ -959,6 +1047,42 @@ sap.ui.define(
|
|
|
959
1047
|
}
|
|
960
1048
|
}
|
|
961
1049
|
return sText;
|
|
1050
|
+
},
|
|
1051
|
+
/**
|
|
1052
|
+
* Formatter for the message text for the chart when fields in the FilterBar need to be ignored.
|
|
1053
|
+
*
|
|
1054
|
+
* @param {Array} aIgnoredFields Array of ignored fields in the FilterBar for the current tab (multiple entity sets)
|
|
1055
|
+
* @returns {string} Message text
|
|
1056
|
+
*/
|
|
1057
|
+
setChartMessageStrip: function(aIgnoredFields) {
|
|
1058
|
+
var sText = "";
|
|
1059
|
+
if (Array.isArray(aIgnoredFields) && aIgnoredFields.length > 0) {
|
|
1060
|
+
var oFilterBar = this._getFilterBarControl(),
|
|
1061
|
+
sFilterBarEntityPath = oFilterBar.data("entityType"),
|
|
1062
|
+
oMetaModel = this.getView()
|
|
1063
|
+
.getModel()
|
|
1064
|
+
.getMetaModel(),
|
|
1065
|
+
oResourceBundle = sap.ui.getCore().getLibraryResourceBundle("sap.fe.templates"),
|
|
1066
|
+
aIgnoredLabels = aIgnoredFields.map(function(sProperty) {
|
|
1067
|
+
if (sProperty === "$search") {
|
|
1068
|
+
var oMacroResourceBundle = sap.ui.getCore().getLibraryResourceBundle("sap.fe.macros");
|
|
1069
|
+
return oMacroResourceBundle ? oMacroResourceBundle.getText("M_FILTERBAR_SEARCH") : "";
|
|
1070
|
+
}
|
|
1071
|
+
var sLabel = oMetaModel.getObject(
|
|
1072
|
+
sFilterBarEntityPath + sProperty + "@com.sap.vocabularies.Common.v1.Label"
|
|
1073
|
+
);
|
|
1074
|
+
return DelegateUtil.getLocalizedText(sLabel, oFilterBar);
|
|
1075
|
+
});
|
|
1076
|
+
if (oResourceBundle) {
|
|
1077
|
+
var sResource =
|
|
1078
|
+
"C_LR_MULTIVIZ_CHART_" +
|
|
1079
|
+
(aIgnoredLabels.length === 1 ? "SINGLE" : "MULTI") +
|
|
1080
|
+
"_IGNORED_FILTER_" +
|
|
1081
|
+
(Device.system.desktop ? "LARGE" : "SMALL");
|
|
1082
|
+
sText = oResourceBundle.getText(sResource, [aIgnoredLabels.join(", ")]);
|
|
1083
|
+
}
|
|
1084
|
+
}
|
|
1085
|
+
return sText;
|
|
962
1086
|
}
|
|
963
1087
|
}
|
|
964
1088
|
});
|
|
@@ -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
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,12 +30,11 @@ sap.ui.define(["sap/fe/core/CommonUtils", "sap/fe/macros/filter/FilterUtils"], f
|
|
|
28
30
|
sRootPath,
|
|
29
31
|
aParameters
|
|
30
32
|
);
|
|
31
|
-
var oFilterBar = oController._getFilterBarControl();
|
|
32
33
|
var oFilterInfo = FilterUtils.getFilterInfo(oFilterBar, {
|
|
33
34
|
targetControl: oController._getTable()
|
|
34
35
|
}).filters;
|
|
35
36
|
var oInternalModelContext = oView.getBindingContext("internal");
|
|
36
|
-
var mTabs = oInternalModelContext.getProperty("tabs");
|
|
37
|
+
var mTabs = oInternalModelContext && oInternalModelContext.getProperty("tabs");
|
|
37
38
|
// Do we need to exclude Fields (mutli tables mode)?
|
|
38
39
|
if (mTabs) {
|
|
39
40
|
var aIgnoredFieldsForTab = mTabs.ignoredFields[mTabs.selected];
|
|
@@ -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
|
sap.ui.define(
|
|
6
7
|
["sap/fe/core/helpers/SemanticDateOperators", "sap/ui/core/routing/HashChanger", "sap/fe/core/CommonUtils", "sap/base/Log"],
|
|
@@ -74,13 +75,14 @@ sap.ui.define(
|
|
|
74
75
|
.getContent()[0]
|
|
75
76
|
.data("filterBarId")
|
|
76
77
|
);
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
78
|
+
if (oFilterBar) {
|
|
79
|
+
var oConditions = oFilterBar.getFilterConditions();
|
|
80
|
+
var bSaveAsTileServiceUrlAllowed = SemanticDateOperators.hasSemanticDateOperations(oConditions);
|
|
81
|
+
if (bSaveAsTileServiceUrlAllowed) {
|
|
82
|
+
return getCountUrl(oController);
|
|
83
|
+
}
|
|
83
84
|
}
|
|
85
|
+
return "";
|
|
84
86
|
}
|
|
85
87
|
|
|
86
88
|
function getJamUrl() {
|