@sapui5/sap.fe.templates 1.98.0 → 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 +5 -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 +3 -2
- 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 +11 -5
- package/src/sap/fe/templates/ListReport/ListReport.view.xml +11 -6
- package/src/sap/fe/templates/ListReport/ListReportController.controller.js +117 -31
- 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 +78 -55
- 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 +4 -3
- package/src/sap/fe/templates/ObjectPage/ExtensionAPI.js +3 -2
- package/src/sap/fe/templates/ObjectPage/ObjectPage.view.xml +8 -45
- package/src/sap/fe/templates/ObjectPage/ObjectPageController.controller.js +20 -69
- package/src/sap/fe/templates/ObjectPage/controls/StashableHBox.js +3 -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 +3 -2
- package/src/sap/fe/templates/ObjectPage/overrides/Share.js +3 -2
- package/src/sap/fe/templates/ObjectPage/overrides/ViewState.js +3 -2
- 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/FooterContent.fragment.xml +5 -1
- 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/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 +3 -2
- package/src/sap/fe/templates/RootContainer/controller/NavContainer.controller.js +3 -2
- package/src/sap/fe/templates/RootContainer/controller/RootContainerBaseController.js +3 -2
- 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/library.js +4 -3
- package/src/sap/fe/templates/messagebundle.properties +14 -30
- 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 +24 -6
- package/src/sap/fe/templates/messagebundle_en_US_saprigi.properties +24 -6
- package/src/sap/fe/templates/messagebundle_en_US_saptrc.properties +24 -6
- package/src/sap/fe/templates/messagebundle_es.properties +24 -6
- 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 +24 -6
- 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 +24 -6
- 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 +24 -6
- 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/ListReport/overrides/MassEdit.js +0 -95
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sapui5/sap.fe.templates",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.99.0",
|
|
4
4
|
"description": "SAPUI5 Library sap.fe.templates",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"author": "SAP SE (https://www.sap.com)",
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
"scripts": {
|
|
9
9
|
"build": "tsc -v && tsc --project tsconfig-build.json",
|
|
10
10
|
"prepare-npm-sources": "babel target/npm-sources/src --out-dir target/npm-sources/src --extensions \".ts\" --config-file ../../.babelrc",
|
|
11
|
-
"
|
|
11
|
+
"prepare-ui5-build-sources": "mkdirp target/ui5-build-tmp/src && babel src --out-dir target/ui5-build-tmp/src --extensions \".ts\" --config-file ../../.babelrc && babel test --out-dir target/ui5-build-tmp/test --extensions \".ts\" --config-file ../../.babelrc",
|
|
12
|
+
"test": "jest --maxWorkers=4",
|
|
12
13
|
"test-refs": "jest --runInBand --config jest.config-refs.js",
|
|
13
14
|
"test-updateSnapshots": "jest --runInBand -u"
|
|
14
15
|
},
|
|
@@ -19,6 +20,7 @@
|
|
|
19
20
|
"devDependencies": {
|
|
20
21
|
"ts-node": "^9.1.1",
|
|
21
22
|
"@babel/cli": "^7.14.8",
|
|
22
|
-
"@ui5/cli": "^2.14.0"
|
|
23
|
+
"@ui5/cli": "^2.14.0",
|
|
24
|
+
"mkdirp": "^1.0.4"
|
|
23
25
|
}
|
|
24
26
|
}
|
|
@@ -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
|
// Helper class used to help create content in the chart/item and fill relevant metadata
|
|
@@ -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/templates/ListComponent"],
|
|
@@ -29,6 +30,14 @@ sap.ui.define(
|
|
|
29
30
|
*/
|
|
30
31
|
keyPerformanceIndicators: {
|
|
31
32
|
type: "object"
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Flag to determine whether the template should hide the filter bar
|
|
37
|
+
*/
|
|
38
|
+
hideFilterBar: {
|
|
39
|
+
type: "boolean",
|
|
40
|
+
defaultValue: false
|
|
32
41
|
}
|
|
33
42
|
},
|
|
34
43
|
library: "sap.fe.templates",
|
|
@@ -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(["sap/fe/core/ExtensionAPI", "sap/fe/macros/filter/FilterUtils", "sap/fe/macros/chart/ChartUtils"], function(
|
|
6
7
|
ExtensionAPI,
|
|
@@ -44,9 +45,14 @@ sap.ui.define(["sap/fe/core/ExtensionAPI", "sap/fe/macros/filter/FilterUtils", "
|
|
|
44
45
|
*/
|
|
45
46
|
refresh: function() {
|
|
46
47
|
var oFilterBar = this._controller._getFilterBarControl();
|
|
47
|
-
|
|
48
|
-
oFilterBar.
|
|
49
|
-
|
|
48
|
+
if (oFilterBar) {
|
|
49
|
+
return oFilterBar.waitForInitialization().then(function() {
|
|
50
|
+
oFilterBar.triggerSearch();
|
|
51
|
+
});
|
|
52
|
+
} else {
|
|
53
|
+
// TODO: if there is no filter bar, make refresh work
|
|
54
|
+
return Promise.resolve();
|
|
55
|
+
}
|
|
50
56
|
},
|
|
51
57
|
|
|
52
58
|
/**
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
executeOnSelectionForStandardDefault="{= ${viewData>/initialLoad} === 'Enabled'}"
|
|
61
61
|
/>
|
|
62
62
|
</template:then>
|
|
63
|
-
<template:elseif test="{= ${viewData>/variantManagement} === 'Control'}">
|
|
63
|
+
<template:elseif test="{= ${viewData>/variantManagement} === 'Control' && !${converterContext>hideFilterBar}}">
|
|
64
64
|
<v:VariantManagement
|
|
65
65
|
id="{= ID.generate([ ${converterContext>filterBarId}, 'VariantManagement']) }"
|
|
66
66
|
unittest:id="listReportVMControlTest"
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
executeOnSelectionForStandardDefault="{= ${viewData>/initialLoad} === 'Enabled'}"
|
|
98
98
|
/>
|
|
99
99
|
</template:then>
|
|
100
|
-
<template:elseif test="{= ${viewData>/variantManagement} === 'Control'}">
|
|
100
|
+
<template:elseif test="{= ${viewData>/variantManagement} === 'Control' && !${converterContext>hideFilterBar}}">
|
|
101
101
|
<v:VariantManagement
|
|
102
102
|
id="{= ID.generate([ ${converterContext>filterBarId}, 'VariantManagement']) }"
|
|
103
103
|
unittest:id="listReportVMControlTest"
|
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
/>
|
|
136
136
|
</template:repeat>
|
|
137
137
|
</template:if>
|
|
138
|
-
<template:if test="{= ${converterContext>/filterLayout} === 'compactvisual'}">
|
|
138
|
+
<template:if test="{= ${converterContext>/filterLayout} === 'compactvisual' && !${converterContext>hideFilterBar}}">
|
|
139
139
|
<SegmentedButton
|
|
140
140
|
id="{= ID.generate([ ${converterContext>filterBarId}, 'LayoutToggle']) }"
|
|
141
141
|
selectedKey="{converterContext>/filterInitialLayout}"
|
|
@@ -151,8 +151,10 @@
|
|
|
151
151
|
</f:DynamicPageTitle>
|
|
152
152
|
</f:title>
|
|
153
153
|
<f:header>
|
|
154
|
-
<template:
|
|
155
|
-
|
|
154
|
+
<template:if test="{= !${converterContext>hideFilterBar} }">
|
|
155
|
+
<template:then>
|
|
156
|
+
<template:with path="converterContext>filterBar" var="filterBarContext">
|
|
157
|
+
<f:DynamicPageHeader pinnable="{converterContext>showPinnableToggle}">
|
|
156
158
|
<VBox>
|
|
157
159
|
<macroInternal:FilterBar
|
|
158
160
|
unittest:id="listReportFilterBarTest"
|
|
@@ -161,6 +163,7 @@
|
|
|
161
163
|
contextPath="{entityType>}"
|
|
162
164
|
variantBackreference="{= CORE.getVariantBackReference(${viewData>}, ${converterContext>} )}"
|
|
163
165
|
selectionFields="{filterBarContext>selectionFields}"
|
|
166
|
+
propertyInfo="{filterBarContext>propertyInfo}"
|
|
164
167
|
filterChanged=".handlers.onFiltersChanged"
|
|
165
168
|
filterConditions="{parts:[{path:'converterContext>filterConditions'}, {path:'entitySet>'}], formatter: 'FILTER.getFilterConditions'}"
|
|
166
169
|
search=".handlers.onSearch"
|
|
@@ -176,7 +179,9 @@
|
|
|
176
179
|
/>
|
|
177
180
|
</VBox>
|
|
178
181
|
</f:DynamicPageHeader>
|
|
179
|
-
|
|
182
|
+
</template:with>
|
|
183
|
+
</template:then>
|
|
184
|
+
</template:if>
|
|
180
185
|
</f:header>
|
|
181
186
|
<f:content>
|
|
182
187
|
<template:if test="{= ${converterContext>views}.length > 0}">
|
|
@@ -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(
|
|
@@ -36,8 +37,7 @@ sap.ui.define(
|
|
|
36
37
|
"sap/fe/templates/TableScroller",
|
|
37
38
|
"sap/fe/core/controllerextensions/Placeholder",
|
|
38
39
|
"sap/ui/fl/write/api/ControlPersonalizationWriteAPI",
|
|
39
|
-
"sap/fe/core/controllerextensions/MassEdit"
|
|
40
|
-
"./overrides/MassEdit"
|
|
40
|
+
"sap/fe/core/controllerextensions/MassEdit"
|
|
41
41
|
],
|
|
42
42
|
function(
|
|
43
43
|
PageController,
|
|
@@ -71,8 +71,7 @@ sap.ui.define(
|
|
|
71
71
|
TableScroller,
|
|
72
72
|
Placeholder,
|
|
73
73
|
ControlPersonalizationWriteAPI,
|
|
74
|
-
MassEdit
|
|
75
|
-
MassEditOverrides
|
|
74
|
+
MassEdit
|
|
76
75
|
) {
|
|
77
76
|
"use strict";
|
|
78
77
|
var TemplateContentView = CoreLibrary.TemplateContentView,
|
|
@@ -122,7 +121,7 @@ sap.ui.define(
|
|
|
122
121
|
viewState: ViewState.override(ViewStateOverrides),
|
|
123
122
|
kpiManagement: KPIManagement,
|
|
124
123
|
placeholder: Placeholder,
|
|
125
|
-
massEdit: MassEdit
|
|
124
|
+
massEdit: MassEdit,
|
|
126
125
|
|
|
127
126
|
getExtensionAPI: function() {
|
|
128
127
|
if (!this.extensionAPI) {
|
|
@@ -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,7 +555,7 @@ 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) {
|
|
555
559
|
var mCache = {};
|
|
556
560
|
var ignoredFields = {},
|
|
557
561
|
aTables = this._getControls("table"),
|
|
@@ -584,6 +588,35 @@ sap.ui.define(
|
|
|
584
588
|
});
|
|
585
589
|
oInternalModelContext.setProperty("tabs/ignoredFields", ignoredFields);
|
|
586
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
|
+
},
|
|
587
620
|
_updateMultiModeSelectedControl: function() {
|
|
588
621
|
this._sEntitySet = undefined;
|
|
589
622
|
this._oListReportControl = undefined;
|
|
@@ -660,17 +693,22 @@ sap.ui.define(
|
|
|
660
693
|
});
|
|
661
694
|
}
|
|
662
695
|
},
|
|
696
|
+
_isFilterBarHidden: function() {
|
|
697
|
+
return this.getView().getViewData().hideFilterBar;
|
|
698
|
+
},
|
|
663
699
|
_shouldAutoTriggerSearch: function(oVM) {
|
|
664
700
|
if (
|
|
665
701
|
this.getView().getViewData().initialLoad === InitialLoadMode.Auto &&
|
|
666
702
|
(!oVM || oVM.getStandardVariantKey() === oVM.getCurrentVariantKey())
|
|
667
703
|
) {
|
|
668
|
-
var oFilterBar = this._getFilterBarControl()
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
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
|
+
}
|
|
674
712
|
}
|
|
675
713
|
}
|
|
676
714
|
}
|
|
@@ -703,9 +741,9 @@ sap.ui.define(
|
|
|
703
741
|
var sPreviousSelectedKey = oEvent && oEvent.mParameters ? oEvent.mParameters.previousKey : undefined;
|
|
704
742
|
|
|
705
743
|
oInternalModelContext.setProperty("tabs/selected", sSelectedKey);
|
|
706
|
-
if (
|
|
744
|
+
if (oInternalModelContext.getProperty("hasPendingFilters") !== true) {
|
|
707
745
|
// No pending filters into FilterBar
|
|
708
|
-
if (this._isCustomTab()) {
|
|
746
|
+
if (oFilterBar && this._isCustomTab()) {
|
|
709
747
|
var oFilterConditions = oFilterBar.getFilterConditions();
|
|
710
748
|
this.onViewNeedsRefresh({
|
|
711
749
|
filterConditions: oFilterConditions,
|
|
@@ -734,7 +772,7 @@ sap.ui.define(
|
|
|
734
772
|
}
|
|
735
773
|
}
|
|
736
774
|
|
|
737
|
-
if (oEvent && oEvent.mParameters && sPreviousSelectedKey
|
|
775
|
+
if (oEvent && oEvent.mParameters && sPreviousSelectedKey !== oEvent.mParameters.selectedKey) {
|
|
738
776
|
ControlPersonalizationWriteAPI.add({
|
|
739
777
|
changes: [
|
|
740
778
|
{
|
|
@@ -753,13 +791,15 @@ sap.ui.define(
|
|
|
753
791
|
this.getExtensionAPI().updateAppState();
|
|
754
792
|
},
|
|
755
793
|
onFiltersChanged: function(oEvent) {
|
|
756
|
-
var oFilterBar = this._getFilterBarControl()
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
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
|
+
}
|
|
763
803
|
}
|
|
764
804
|
},
|
|
765
805
|
onVariantSelected: function(oEvent) {
|
|
@@ -799,7 +839,10 @@ sap.ui.define(
|
|
|
799
839
|
this._setCountsOutDated();
|
|
800
840
|
if (!this._isCustomTab()) {
|
|
801
841
|
var sDisplayedControlId = this._getCurrentControl().getId();
|
|
802
|
-
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()
|
|
803
846
|
aControls.forEach(function(oControl) {
|
|
804
847
|
oControl.data("outdatedRows", oControl.getId() !== sDisplayedControlId);
|
|
805
848
|
});
|
|
@@ -811,6 +854,8 @@ sap.ui.define(
|
|
|
811
854
|
refreshCause: "search"
|
|
812
855
|
});
|
|
813
856
|
}
|
|
857
|
+
} else {
|
|
858
|
+
this._updateALPNotApplicableFields(oInternalModelContext, oFilterBar);
|
|
814
859
|
}
|
|
815
860
|
if (oMdcChart) {
|
|
816
861
|
// disable bound actions TODO: this clears everything for the chart?
|
|
@@ -838,6 +883,11 @@ sap.ui.define(
|
|
|
838
883
|
if (this.getView().getViewData().liveMode === false) {
|
|
839
884
|
this.getExtensionAPI().updateAppState();
|
|
840
885
|
}
|
|
886
|
+
|
|
887
|
+
if (Device.system.phone) {
|
|
888
|
+
var oDynamicPage = this.getView().byId("fe::ListReport");
|
|
889
|
+
oDynamicPage.setHeaderExpanded(false);
|
|
890
|
+
}
|
|
841
891
|
},
|
|
842
892
|
/**
|
|
843
893
|
* Triggers an outbound navigation when a user chooses the chevron.
|
|
@@ -968,10 +1018,10 @@ sap.ui.define(
|
|
|
968
1018
|
* @returns {string} Message text
|
|
969
1019
|
*/
|
|
970
1020
|
setTabMessageStrip: function(aIgnoredFields, sTabTitle) {
|
|
971
|
-
var sText = ""
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
1021
|
+
var sText = "",
|
|
1022
|
+
oFilterBar = this._getFilterBarControl();
|
|
1023
|
+
if (oFilterBar && Array.isArray(aIgnoredFields) && aIgnoredFields.length > 0 && sTabTitle) {
|
|
1024
|
+
var sFilterBarEntityPath = oFilterBar.data("entityType"),
|
|
975
1025
|
oMetaModel = this.getView()
|
|
976
1026
|
.getModel()
|
|
977
1027
|
.getMetaModel(),
|
|
@@ -997,6 +1047,42 @@ sap.ui.define(
|
|
|
997
1047
|
}
|
|
998
1048
|
}
|
|
999
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;
|
|
1000
1086
|
}
|
|
1001
1087
|
}
|
|
1002
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() {
|