@sapui5/sap.fe.templates 1.97.0 → 1.98.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 +4 -4
- package/src/sap/fe/templates/.library +1 -1
- package/src/sap/fe/templates/AnalyticalListPage/Component.js +1 -1
- package/src/sap/fe/templates/AnalyticalListPage/chart/FEChartDelegate.js +3 -3
- package/src/sap/fe/templates/ListComponent.js +1 -1
- package/src/sap/fe/templates/ListReport/Component.js +1 -1
- package/src/sap/fe/templates/ListReport/ExtensionAPI.js +2 -2
- package/src/sap/fe/templates/ListReport/ListReport.view.xml +2 -1
- package/src/sap/fe/templates/ListReport/ListReportController.controller.js +86 -86
- package/src/sap/fe/templates/ListReport/overrides/IntentBasedNavigation.js +7 -3
- package/src/sap/fe/templates/ListReport/overrides/MassEdit.js +95 -0
- package/src/sap/fe/templates/ListReport/overrides/Share.js +37 -22
- package/src/sap/fe/templates/ListReport/overrides/ViewState.js +54 -32
- package/src/sap/fe/templates/ObjectPage/AnnotationHelper.js +21 -1
- package/src/sap/fe/templates/ObjectPage/Component.js +17 -15
- package/src/sap/fe/templates/ObjectPage/ExtensionAPI.js +16 -1
- package/src/sap/fe/templates/ObjectPage/ObjectPage.view.xml +103 -88
- package/src/sap/fe/templates/ObjectPage/ObjectPageController.controller.js +100 -73
- package/src/sap/fe/templates/ObjectPage/controls/StashableHBox.js +1 -1
- package/src/sap/fe/templates/ObjectPage/controls/StashableVBox.js +1 -1
- package/src/sap/fe/templates/ObjectPage/controls/SubSectionBlock.js +1 -1
- package/src/sap/fe/templates/ObjectPage/designtime/FlexBox.designtime.js +1 -1
- package/src/sap/fe/templates/ObjectPage/designtime/StashableHBox.designtime.js +1 -1
- package/src/sap/fe/templates/ObjectPage/designtime/StashableVBox.designtime.js +1 -1
- package/src/sap/fe/templates/ObjectPage/flexibility/StashableHBox.flexibility.js +1 -1
- package/src/sap/fe/templates/ObjectPage/flexibility/StashableVBox.flexibility.js +1 -1
- package/src/sap/fe/templates/ObjectPage/overrides/IntentBasedNavigation.js +1 -1
- package/src/sap/fe/templates/ObjectPage/overrides/InternalRouting.js +1 -1
- package/src/sap/fe/templates/ObjectPage/overrides/MessageHandler.js +1 -1
- package/src/sap/fe/templates/ObjectPage/overrides/Paginator.js +13 -1
- package/src/sap/fe/templates/ObjectPage/overrides/Share.js +48 -44
- package/src/sap/fe/templates/ObjectPage/overrides/ViewState.js +1 -21
- package/src/sap/fe/templates/ObjectPage/view/fragments/Actions.fragment.xml +1 -1
- 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 +1 -0
- package/src/sap/fe/templates/ObjectPage/view/fragments/SectionMoreFormContent.fragment.xml +1 -0
- package/src/sap/fe/templates/RootContainer/controller/Fcl.controller.js +1 -1
- package/src/sap/fe/templates/RootContainer/controller/NavContainer.controller.js +1 -1
- package/src/sap/fe/templates/RootContainer/controller/RootContainerBaseController.js +134 -124
- package/src/sap/fe/templates/RootContainer/overrides/EditFlow.js +1 -1
- package/src/sap/fe/templates/TableScroller.js +1 -1
- package/src/sap/fe/templates/controls/Table.fragment.xml +1 -1
- package/src/sap/fe/templates/library.js +2 -2
- package/src/sap/fe/templates/messagebundle.properties +24 -1
- package/src/sap/fe/templates/messagebundle_en_US_sappsd.properties +1 -1
- package/src/sap/fe/templates/messagebundle_en_US_saprigi.properties +1 -1
- package/src/sap/fe/templates/messagebundle_en_US_saptrc.properties +1 -1
- package/src/sap/fe/templates/messagebundle_es.properties +8 -8
- package/src/sap/fe/templates/messagebundle_fr.properties +1 -1
- package/src/sap/fe/templates/messagebundle_ja.properties +1 -1
- package/src/sap/fe/templates/messagebundle_tr.properties +1 -1
- package/src/sap/fe/templates/ObjectPage/view/fragments/HeaderImage.fragment.xml +0 -24
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sapui5/sap.fe.templates",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.98.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,9 +8,9 @@
|
|
|
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
|
-
"test": "jest",
|
|
12
|
-
"test-refs": "jest --config jest.config-refs.js",
|
|
13
|
-
"test-updateSnapshots": "jest -u"
|
|
11
|
+
"test": "jest --runInBand",
|
|
12
|
+
"test-refs": "jest --runInBand --config jest.config-refs.js",
|
|
13
|
+
"test-updateSnapshots": "jest --runInBand -u"
|
|
14
14
|
},
|
|
15
15
|
"keywords": [
|
|
16
16
|
"sapui5",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* SAPUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2022 SAP SE. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
// ---------------------------------------------------------------------------------------
|
|
6
6
|
// Helper class used to help create content in the chart/item and fill relevant metadata
|
|
@@ -18,7 +18,7 @@ sap.ui.define(
|
|
|
18
18
|
* data in chart and table must be synchronised. every
|
|
19
19
|
* time the chart refreshes, the table must be refreshed too.
|
|
20
20
|
*/
|
|
21
|
-
ChartDelegate.
|
|
21
|
+
ChartDelegate.rebind = function(oMDCChart, oBindingInfo) {
|
|
22
22
|
// var oComponent = flUtils.getAppComponentForControl(oMDCChart);
|
|
23
23
|
// var bIsSearchTriggered = oComponent.getAppStateHandler().getIsSearchTriggered();
|
|
24
24
|
// workaround in place to prevent chart from loading when go button is present and initial load is false
|
|
@@ -26,7 +26,7 @@ sap.ui.define(
|
|
|
26
26
|
var oInternalModelContext = oMDCChart.getBindingContext("pageInternal");
|
|
27
27
|
var sTemplateContentView = oInternalModelContext.getProperty(oInternalModelContext.getPath() + "/alpContentView");
|
|
28
28
|
if (!sTemplateContentView || sTemplateContentView !== "Table") {
|
|
29
|
-
BaseChartDelegate.
|
|
29
|
+
BaseChartDelegate.rebind(oMDCChart, oBindingInfo);
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
32
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* SAPUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2022 SAP SE. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
sap.ui.define(["sap/fe/core/ExtensionAPI", "sap/fe/macros/filter/FilterUtils", "sap/fe/macros/chart/ChartUtils"], function(
|
|
6
6
|
ExtensionAPI,
|
|
@@ -59,7 +59,7 @@ sap.ui.define(["sap/fe/core/ExtensionAPI", "sap/fe/macros/filter/FilterUtils", "
|
|
|
59
59
|
*/
|
|
60
60
|
getSelectedContexts: function() {
|
|
61
61
|
var oControl = (this._controller._isMultiMode() && this._controller._getCurrentControl()) || this._controller._getTable();
|
|
62
|
-
if (oControl.isA("sap.ui.mdc.
|
|
62
|
+
if (oControl.isA("sap.ui.mdc.Chart")) {
|
|
63
63
|
var aSelectedContexts = [];
|
|
64
64
|
if (oControl && oControl.get_chart()) {
|
|
65
65
|
var aSelectedDataPoints = ChartUtils.getChartSelectedData(oControl.get_chart());
|
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
</items>
|
|
147
147
|
</SegmentedButton>
|
|
148
148
|
</template:if>
|
|
149
|
-
<macro:Share id="fe::Share"
|
|
149
|
+
<macro:Share id="fe::Share" visible="{= ${fclhelper>/} ? ${fclhelper>/showShareIcon} : true }" />
|
|
150
150
|
</f:actions>
|
|
151
151
|
</f:DynamicPageTitle>
|
|
152
152
|
</f:title>
|
|
@@ -172,6 +172,7 @@
|
|
|
172
172
|
suspendSelection="true"
|
|
173
173
|
toggleControlId="{= ${converterContext>/filterLayout} === 'compactvisual' ? ID.generate([ ${converterContext>filterBarId}, 'LayoutToggle']) : undefined }"
|
|
174
174
|
initialLayout="{= ${converterContext>/filterLayout} === 'compactvisual' ? ${converterContext>/filterInitialLayout} : undefined }"
|
|
175
|
+
stateChanged=".handlers.onStateChanged"
|
|
175
176
|
/>
|
|
176
177
|
</VBox>
|
|
177
178
|
</f:DynamicPageHeader>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* SAPUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2022 SAP SE. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
sap.ui.define(
|
|
@@ -35,7 +35,9 @@ sap.ui.define(
|
|
|
35
35
|
"sap/fe/core/controllerextensions/KPIManagement",
|
|
36
36
|
"sap/fe/templates/TableScroller",
|
|
37
37
|
"sap/fe/core/controllerextensions/Placeholder",
|
|
38
|
-
"sap/ui/fl/write/api/ControlPersonalizationWriteAPI"
|
|
38
|
+
"sap/ui/fl/write/api/ControlPersonalizationWriteAPI",
|
|
39
|
+
"sap/fe/core/controllerextensions/MassEdit",
|
|
40
|
+
"./overrides/MassEdit"
|
|
39
41
|
],
|
|
40
42
|
function(
|
|
41
43
|
PageController,
|
|
@@ -68,7 +70,9 @@ sap.ui.define(
|
|
|
68
70
|
KPIManagement,
|
|
69
71
|
TableScroller,
|
|
70
72
|
Placeholder,
|
|
71
|
-
ControlPersonalizationWriteAPI
|
|
73
|
+
ControlPersonalizationWriteAPI,
|
|
74
|
+
MassEdit,
|
|
75
|
+
MassEditOverrides
|
|
72
76
|
) {
|
|
73
77
|
"use strict";
|
|
74
78
|
var TemplateContentView = CoreLibrary.TemplateContentView,
|
|
@@ -118,6 +122,7 @@ sap.ui.define(
|
|
|
118
122
|
viewState: ViewState.override(ViewStateOverrides),
|
|
119
123
|
kpiManagement: KPIManagement,
|
|
120
124
|
placeholder: Placeholder,
|
|
125
|
+
massEdit: MassEdit.override(MassEditOverrides),
|
|
121
126
|
|
|
122
127
|
getExtensionAPI: function() {
|
|
123
128
|
if (!this.extensionAPI) {
|
|
@@ -145,11 +150,6 @@ sap.ui.define(
|
|
|
145
150
|
}
|
|
146
151
|
//TODO: This is only a temporary approach and will be removed once app state behaviour is finalized.
|
|
147
152
|
|
|
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
153
|
oInternalModelContext.setProperty("hasPendingFilters", true);
|
|
154
154
|
oInternalModelContext.setProperty("appliedFilters", "");
|
|
155
155
|
oInternalModelContext.setProperty("hideDraftInfo", false);
|
|
@@ -177,12 +177,8 @@ sap.ui.define(
|
|
|
177
177
|
.waitForRouteMatchBeforeNavigation();
|
|
178
178
|
|
|
179
179
|
this._isMultiMode() && this._updateMultiControlHiddenStatus();
|
|
180
|
-
|
|
181
|
-
FilterUtils.attachConditionHandling(this._getFilterBarControl());
|
|
182
180
|
},
|
|
183
181
|
onExit: function() {
|
|
184
|
-
FilterUtils.detachConditionHandling(this._getFilterBarControl());
|
|
185
|
-
|
|
186
182
|
delete this._sEntitySet;
|
|
187
183
|
delete this.filterBarConditions;
|
|
188
184
|
delete this._oListReportControl;
|
|
@@ -200,6 +196,10 @@ sap.ui.define(
|
|
|
200
196
|
if (!this.sUpdateTimer) {
|
|
201
197
|
this.sUpdateTimer = setTimeout(function() {
|
|
202
198
|
oTableBinding.refresh();
|
|
199
|
+
if (that._isMultiMode()) {
|
|
200
|
+
that._setCountsOutDated();
|
|
201
|
+
that._updateCounts();
|
|
202
|
+
}
|
|
203
203
|
delete that.sUpdateTimer;
|
|
204
204
|
}, 0);
|
|
205
205
|
}
|
|
@@ -262,6 +262,11 @@ sap.ui.define(
|
|
|
262
262
|
oFilterBar.setFocusOnFirstErroneousField();
|
|
263
263
|
}
|
|
264
264
|
}
|
|
265
|
+
|
|
266
|
+
// Remove the handler on back navigation that displays Draft confirmation
|
|
267
|
+
this.getAppComponent()
|
|
268
|
+
.getShellServices()
|
|
269
|
+
.setBackNavigation(undefined);
|
|
265
270
|
},
|
|
266
271
|
|
|
267
272
|
/**
|
|
@@ -347,19 +352,14 @@ sap.ui.define(
|
|
|
347
352
|
});
|
|
348
353
|
},
|
|
349
354
|
_getPageTitleInformation: function() {
|
|
350
|
-
var
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
.getView()
|
|
359
|
-
.getContent()[0]
|
|
360
|
-
.data().ListReportSubtitle;
|
|
361
|
-
resolve(oTitleInfo);
|
|
362
|
-
});
|
|
355
|
+
var oTitleInfo = { title: "", subtitle: "", intent: "", icon: "" };
|
|
356
|
+
oTitleInfo.title = this.getView()
|
|
357
|
+
.getContent()[0]
|
|
358
|
+
.data().ListReportTitle;
|
|
359
|
+
oTitleInfo.subtitle = this.getView()
|
|
360
|
+
.getContent()[0]
|
|
361
|
+
.data().ListReportSubtitle;
|
|
362
|
+
return oTitleInfo;
|
|
363
363
|
},
|
|
364
364
|
_getFilterBarControl: function() {
|
|
365
365
|
return this.getView().byId(this._getFilterBarControlId());
|
|
@@ -603,6 +603,17 @@ sap.ui.define(
|
|
|
603
603
|
var oMultiModeControl = this._getMultiModeControl();
|
|
604
604
|
return oMultiModeControl && oMultiModeControl.getSelectedKey().indexOf("::CustomTab::") > -1;
|
|
605
605
|
},
|
|
606
|
+
_setCountsOutDated: function() {
|
|
607
|
+
var oMultiModeControl = this._getMultiModeControl();
|
|
608
|
+
if (oMultiModeControl && oMultiModeControl.data("showCounts") === "true") {
|
|
609
|
+
var aItems = oMultiModeControl.getItems();
|
|
610
|
+
aItems.forEach(function(oItem) {
|
|
611
|
+
if (!oItem.getKey().indexOf("fe::Chart") > -1) {
|
|
612
|
+
oItem.data("outdatedCounts", true);
|
|
613
|
+
}
|
|
614
|
+
});
|
|
615
|
+
}
|
|
616
|
+
},
|
|
606
617
|
_updateMultiModeCounts: function() {
|
|
607
618
|
var that = this;
|
|
608
619
|
var aBindingPromises = [];
|
|
@@ -616,7 +627,7 @@ sap.ui.define(
|
|
|
616
627
|
var oControl = that.getView().byId(oItem.getKey());
|
|
617
628
|
if (
|
|
618
629
|
oControl &&
|
|
619
|
-
!oControl.isA("sap.ui.mdc.
|
|
630
|
+
!oControl.isA("sap.ui.mdc.Chart") &&
|
|
620
631
|
(oItem.data("outdatedCounts") || oControl.getId() === sDisplayedControlId)
|
|
621
632
|
) {
|
|
622
633
|
aCompliantTabs.push({
|
|
@@ -668,62 +679,62 @@ sap.ui.define(
|
|
|
668
679
|
},
|
|
669
680
|
_updateTable: function(oTable) {
|
|
670
681
|
if (!oTable.isTableBound() || this.hasPendingChartChanges) {
|
|
671
|
-
oTable.
|
|
682
|
+
oTable.rebind();
|
|
672
683
|
this.hasPendingChartChanges = false;
|
|
673
684
|
}
|
|
674
685
|
},
|
|
675
686
|
_updateChart: function(oChart) {
|
|
676
687
|
var oInnerChart = oChart.getControlDelegate()._getChart(oChart);
|
|
677
688
|
if (!(oInnerChart && oInnerChart.isBound("data")) || this.hasPendingTableChanges) {
|
|
678
|
-
oChart.getControlDelegate().
|
|
689
|
+
oChart.getControlDelegate().rebind(oChart, oInnerChart.getBindingInfo("data"));
|
|
679
690
|
this.hasPendingTableChanges = false;
|
|
680
691
|
}
|
|
681
692
|
},
|
|
682
693
|
handlers: {
|
|
683
694
|
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
|
-
|
|
695
|
+
this._updateMultiModeSelectedControl();
|
|
696
|
+
this._updateMultiControlHiddenStatus();
|
|
697
|
+
|
|
698
|
+
var oFilterBar = this._getFilterBarControl();
|
|
699
|
+
var oInternalModelContext = this.getView().getBindingContext("internal");
|
|
700
|
+
var oDisplayedControl = this._getCurrentControl();
|
|
701
|
+
var oMultiModeControl = this._getMultiModeControl();
|
|
702
|
+
var sSelectedKey = oMultiModeControl.getSelectedKey();
|
|
703
|
+
var sPreviousSelectedKey = oEvent && oEvent.mParameters ? oEvent.mParameters.previousKey : undefined;
|
|
704
|
+
|
|
705
|
+
oInternalModelContext.setProperty("tabs/selected", sSelectedKey);
|
|
706
|
+
if (oFilterBar && oInternalModelContext.getProperty("hasPendingFilters") !== true) {
|
|
707
|
+
// No pending filters into FilterBar
|
|
708
|
+
if (this._isCustomTab()) {
|
|
709
|
+
var oFilterConditions = oFilterBar.getFilterConditions();
|
|
710
|
+
this.onViewNeedsRefresh({
|
|
711
|
+
filterConditions: oFilterConditions,
|
|
712
|
+
currentTabId: sSelectedKey,
|
|
713
|
+
refreshCause: "tabChanged"
|
|
714
|
+
});
|
|
715
|
+
} else if (
|
|
716
|
+
!oDisplayedControl.isA("sap.ui.mdc.Chart") &&
|
|
717
|
+
(!oDisplayedControl.getRowBinding() || // first time the tab/table is displayed
|
|
718
|
+
oDisplayedControl.data("outdatedRows") === true)
|
|
719
|
+
) {
|
|
720
|
+
// Search has been triggered on a different tab {}
|
|
721
|
+
oDisplayedControl.rebind();
|
|
722
|
+
oDisplayedControl.data("outdatedRows", false);
|
|
723
|
+
} else if (
|
|
724
|
+
oDisplayedControl.isA("sap.ui.mdc.Chart") &&
|
|
725
|
+
(!oDisplayedControl
|
|
726
|
+
.getControlDelegate()
|
|
727
|
+
._getChart(oDisplayedControl)
|
|
728
|
+
.getBinding("data") || // first time the tab/chart is displayed
|
|
729
|
+
oDisplayedControl.data("outdatedRows") === true)
|
|
730
|
+
) {
|
|
731
|
+
var oInnerChart = oDisplayedControl.getControlDelegate()._getChart(oDisplayedControl);
|
|
732
|
+
oDisplayedControl.getControlDelegate().rebind(oDisplayedControl, oInnerChart.getBindingInfo("data"));
|
|
733
|
+
oDisplayedControl.data("outdatedRows", false);
|
|
723
734
|
}
|
|
724
|
-
|
|
725
|
-
var sPreviousSelectedKey = oEvent && oEvent.mParameters ? oEvent.mParameters.previousKey : undefined;
|
|
735
|
+
}
|
|
726
736
|
|
|
737
|
+
if (oEvent && oEvent.mParameters && sPreviousSelectedKey != oEvent.mParameters.selectedKey) {
|
|
727
738
|
ControlPersonalizationWriteAPI.add({
|
|
728
739
|
changes: [
|
|
729
740
|
{
|
|
@@ -738,9 +749,8 @@ sap.ui.define(
|
|
|
738
749
|
}
|
|
739
750
|
]
|
|
740
751
|
});
|
|
741
|
-
*/
|
|
742
|
-
this.getExtensionAPI().updateAppState();
|
|
743
752
|
}
|
|
753
|
+
this.getExtensionAPI().updateAppState();
|
|
744
754
|
},
|
|
745
755
|
onFiltersChanged: function(oEvent) {
|
|
746
756
|
var oFilterBar = this._getFilterBarControl(),
|
|
@@ -748,9 +758,8 @@ sap.ui.define(
|
|
|
748
758
|
// Pending filters into FilterBar to be used for custom views
|
|
749
759
|
this.onPendingFilters();
|
|
750
760
|
oInternalModelContext.setProperty("appliedFilters", oFilterBar.getAssignedFiltersText().filtersText);
|
|
751
|
-
oInternalModelContext.setProperty("hasPendingFilters", true);
|
|
752
761
|
if (oEvent.getParameter("conditionsBased")) {
|
|
753
|
-
|
|
762
|
+
oInternalModelContext.setProperty("hasPendingFilters", true);
|
|
754
763
|
}
|
|
755
764
|
},
|
|
756
765
|
onVariantSelected: function(oEvent) {
|
|
@@ -787,14 +796,7 @@ sap.ui.define(
|
|
|
787
796
|
if (this._isMultiMode()) {
|
|
788
797
|
var aControls = this._getControls(),
|
|
789
798
|
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
|
-
}
|
|
799
|
+
this._setCountsOutDated();
|
|
798
800
|
if (!this._isCustomTab()) {
|
|
799
801
|
var sDisplayedControlId = this._getCurrentControl().getId();
|
|
800
802
|
this._updateMultiNotApplicableFields(oInternalModelContext, oFilterBar);
|
|
@@ -871,7 +873,7 @@ sap.ui.define(
|
|
|
871
873
|
if (sTemplateContentView === TemplateContentView.Chart) {
|
|
872
874
|
this.hasPendingChartChanges = true;
|
|
873
875
|
} else {
|
|
874
|
-
oTable && oTable.
|
|
876
|
+
oTable && oTable.rebind();
|
|
875
877
|
this.hasPendingChartChanges = false;
|
|
876
878
|
}
|
|
877
879
|
},
|
|
@@ -935,10 +937,8 @@ sap.ui.define(
|
|
|
935
937
|
.setVisible(true);
|
|
936
938
|
}
|
|
937
939
|
},
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
this.getExtensionAPI().updateAppState();
|
|
941
|
-
}
|
|
940
|
+
onStateChanged: function(oEvent) {
|
|
941
|
+
this.getExtensionAPI().updateAppState();
|
|
942
942
|
}
|
|
943
943
|
},
|
|
944
944
|
formatters: {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* SAPUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2022 SAP SE. All rights reserved.
|
|
4
4
|
*/
|
|
5
|
-
sap.ui.define(["sap/fe/core/CommonUtils"], function(CommonUtils) {
|
|
5
|
+
sap.ui.define(["sap/fe/core/CommonUtils", "sap/fe/macros/filter/FilterUtils"], function(CommonUtils, FilterUtils) {
|
|
6
6
|
"use strict";
|
|
7
7
|
return {
|
|
8
8
|
adaptNavigationContext: function(oSelectionVariant, oTargetInfo) {
|
|
@@ -28,6 +28,10 @@ sap.ui.define(["sap/fe/core/CommonUtils"], function(CommonUtils) {
|
|
|
28
28
|
sRootPath,
|
|
29
29
|
aParameters
|
|
30
30
|
);
|
|
31
|
+
var oFilterBar = oController._getFilterBarControl();
|
|
32
|
+
var oFilterInfo = FilterUtils.getFilterInfo(oFilterBar, {
|
|
33
|
+
targetControl: oController._getTable()
|
|
34
|
+
}).filters;
|
|
31
35
|
var oInternalModelContext = oView.getBindingContext("internal");
|
|
32
36
|
var mTabs = oInternalModelContext.getProperty("tabs");
|
|
33
37
|
// Do we need to exclude Fields (mutli tables mode)?
|
|
@@ -40,7 +44,7 @@ sap.ui.define(["sap/fe/core/CommonUtils"], function(CommonUtils) {
|
|
|
40
44
|
}
|
|
41
45
|
}
|
|
42
46
|
// TODO: move this also into the intent based navigation controller extension
|
|
43
|
-
CommonUtils.addExternalStateFiltersToSelectionVariant(oSelectionVariant, oFilterBarConditions, oTargetInfo);
|
|
47
|
+
CommonUtils.addExternalStateFiltersToSelectionVariant(oSelectionVariant, oFilterBarConditions, oTargetInfo, oFilterInfo);
|
|
44
48
|
delete oTargetInfo.propertiesWithoutConflict;
|
|
45
49
|
}
|
|
46
50
|
},
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* SAPUI5
|
|
3
|
+
* (c) Copyright 2009-2022 SAP SE. All rights reserved.
|
|
4
|
+
*/
|
|
5
|
+
sap.ui.define(["sap/m/MessageBox", "sap/base/Log", "sap/fe/core/helpers/ModelHelper"], function(MessageBox, Log, ModelHelper) {
|
|
6
|
+
"use strict";
|
|
7
|
+
return {
|
|
8
|
+
_filterEditableContexts: function(aContexts) {
|
|
9
|
+
return aContexts.filter(function(oContext) {
|
|
10
|
+
var oData = oContext.getObject(),
|
|
11
|
+
draftAdminData = oData.DraftAdministrativeData;
|
|
12
|
+
|
|
13
|
+
return (
|
|
14
|
+
oData.IsActiveEntity &&
|
|
15
|
+
(!draftAdminData || (!draftAdminData.InProcessByUserDescription && !draftAdminData.InProcessByUser))
|
|
16
|
+
);
|
|
17
|
+
});
|
|
18
|
+
},
|
|
19
|
+
|
|
20
|
+
_getMessageDetailForNonEditable: function(oResourceBundle) {
|
|
21
|
+
var sHeader = oResourceBundle.getText("T_MASS_EDIT_CONFIRM_MESSAGE_DETAIL_HEADER"),
|
|
22
|
+
sReasonGroup = oResourceBundle.getText("T_MASS_EDIT_CONFIRM_MESSAGE_DETAIL_REASON"),
|
|
23
|
+
sReasonDraft = oResourceBundle.getText("T_MASS_EDIT_CONFIRM_MESSAGE_DETAIL_REASON_DRAFT"),
|
|
24
|
+
sReasonNonEditable = oResourceBundle.getText("T_MASS_EDIT_CONFIRM_MESSAGE_DETAIL_REASON_NON_EDITABLE");
|
|
25
|
+
|
|
26
|
+
return (
|
|
27
|
+
"<p><strong>" +
|
|
28
|
+
sHeader +
|
|
29
|
+
"</strong></p>\n" +
|
|
30
|
+
"<p>" +
|
|
31
|
+
sReasonGroup +
|
|
32
|
+
"</p>\n" +
|
|
33
|
+
"<ul>" +
|
|
34
|
+
"<li>" +
|
|
35
|
+
sReasonDraft +
|
|
36
|
+
"</li>" +
|
|
37
|
+
"<li>" +
|
|
38
|
+
sReasonNonEditable +
|
|
39
|
+
"</li>" +
|
|
40
|
+
"</ul>"
|
|
41
|
+
);
|
|
42
|
+
},
|
|
43
|
+
|
|
44
|
+
fetchContextsForEdit: function(oTable) {
|
|
45
|
+
var that = this,
|
|
46
|
+
aSelectedContexts = oTable.getSelectedContexts() || [],
|
|
47
|
+
sPath = oTable.data("targetCollectionPath"),
|
|
48
|
+
oMetaModel = oTable.getModel().getMetaModel(),
|
|
49
|
+
bIsDraft = ModelHelper.isDraftSupported(oMetaModel, sPath),
|
|
50
|
+
aContextsForEdit = bIsDraft ? this._filterEditableContexts(aSelectedContexts) : aSelectedContexts;
|
|
51
|
+
|
|
52
|
+
if (aContextsForEdit.length !== aSelectedContexts.length) {
|
|
53
|
+
return new Promise(function(resolve, reject) {
|
|
54
|
+
that.getView()
|
|
55
|
+
.getModel("sap.fe.i18n")
|
|
56
|
+
.getResourceBundle()
|
|
57
|
+
.then(function(oResourceBundle) {
|
|
58
|
+
var sEditButton = oResourceBundle.getText("T_MASS_EDIT_CONFIRM_BUTTON_TEXT"),
|
|
59
|
+
sCancelButton = oResourceBundle.getText("T_MASS_EDIT_CANCEL_BUTTON_TEXT"),
|
|
60
|
+
iNonEditable = aSelectedContexts.length - aContextsForEdit.length,
|
|
61
|
+
sMessage = oResourceBundle.getText("T_MASS_EDIT_CONFIRM_MESSAGE", [
|
|
62
|
+
iNonEditable,
|
|
63
|
+
aSelectedContexts.length,
|
|
64
|
+
aContextsForEdit.length
|
|
65
|
+
]),
|
|
66
|
+
sMessageDetail = that._getMessageDetailForNonEditable(oResourceBundle);
|
|
67
|
+
|
|
68
|
+
MessageBox.error(sMessage, {
|
|
69
|
+
title: "Error",
|
|
70
|
+
details: sMessageDetail,
|
|
71
|
+
actions: [sEditButton, sCancelButton],
|
|
72
|
+
emphasizedAction: sEditButton,
|
|
73
|
+
contentWidth: "100px",
|
|
74
|
+
onClose: function(sSelection) {
|
|
75
|
+
var aContexts = [];
|
|
76
|
+
if (sSelection === sEditButton) {
|
|
77
|
+
Log.info("Mass Edit: Confirmed to edit ", aContextsForEdit.length, " selections.");
|
|
78
|
+
aContexts = aContextsForEdit;
|
|
79
|
+
} else if (sSelection === sCancelButton) {
|
|
80
|
+
Log.info("Mass Edit: Cancelled.");
|
|
81
|
+
}
|
|
82
|
+
resolve(aContexts);
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
})
|
|
86
|
+
.catch(function(error) {
|
|
87
|
+
Log.error(error);
|
|
88
|
+
});
|
|
89
|
+
});
|
|
90
|
+
} else {
|
|
91
|
+
return Promise.resolve(aContextsForEdit);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* SAPUI5
|
|
3
|
-
* (c) Copyright 2009-
|
|
3
|
+
* (c) Copyright 2009-2022 SAP SE. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
sap.ui.define(
|
|
6
6
|
["sap/fe/core/helpers/SemanticDateOperators", "sap/ui/core/routing/HashChanger", "sap/fe/core/CommonUtils", "sap/base/Log"],
|
|
@@ -52,11 +52,19 @@ sap.ui.define(
|
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
function getShareUrl() {
|
|
55
|
-
var
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
55
|
+
var oUShellContainer = sap.ushell && sap.ushell.Container;
|
|
56
|
+
if (oUShellContainer) {
|
|
57
|
+
return oUShellContainer
|
|
58
|
+
.getFLPUrlAsync(true)
|
|
59
|
+
.then(function(sFLPUrl) {
|
|
60
|
+
return sFLPUrl;
|
|
61
|
+
})
|
|
62
|
+
.catch(function(sError) {
|
|
63
|
+
Log.error("Could not retrieve cFLP URL for the sharing dialog (dialog will not be opened)", sError);
|
|
64
|
+
});
|
|
65
|
+
} else {
|
|
66
|
+
return Promise.resolve(document.URL);
|
|
67
|
+
}
|
|
60
68
|
}
|
|
61
69
|
|
|
62
70
|
function getSaveAsTileServiceUrl(oController) {
|
|
@@ -99,22 +107,29 @@ sap.ui.define(
|
|
|
99
107
|
return {
|
|
100
108
|
adaptShareMetadata: function(oShareMetadata) {
|
|
101
109
|
var that = this;
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
110
|
+
Promise.resolve(getJamUrl())
|
|
111
|
+
.then(function(sJamUrl) {
|
|
112
|
+
var oAppComponent = CommonUtils.getAppComponent(that.base.getView());
|
|
113
|
+
var oMetadata = oAppComponent.getMetadata();
|
|
114
|
+
var oUIManifest = oMetadata.getManifestEntry("sap.ui");
|
|
115
|
+
var sIcon = (oUIManifest && oUIManifest.icons && oUIManifest.icons.icon) || "";
|
|
116
|
+
var oAppManifest = oMetadata.getManifestEntry("sap.app");
|
|
117
|
+
var sTitle = (oAppManifest && oAppManifest.title) || "";
|
|
118
|
+
// TODO: check if there is any semantic date used before adding serviceURL as BLI:FIORITECHP1-18023
|
|
119
|
+
oShareMetadata.tile = {
|
|
120
|
+
icon: sIcon,
|
|
121
|
+
title: sTitle,
|
|
122
|
+
queryUrl: getSaveAsTileServiceUrl(that.base)
|
|
123
|
+
};
|
|
124
|
+
oShareMetadata.title = document.title;
|
|
125
|
+
oShareMetadata.jam.url = sJamUrl;
|
|
126
|
+
})
|
|
127
|
+
.catch(function(error) {
|
|
128
|
+
Log.error(error);
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
return Promise.resolve(getShareUrl()).then(function(sFLPUrl) {
|
|
132
|
+
oShareMetadata.url = sFLPUrl;
|
|
118
133
|
return oShareMetadata;
|
|
119
134
|
});
|
|
120
135
|
}
|