@sapui5/sap.fe.templates 1.93.3 → 1.97.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 +7 -4
- package/src/sap/fe/templates/.library +1 -1
- package/src/sap/fe/templates/AnalyticalListPage/manifest.json +6 -0
- package/src/sap/fe/templates/ListReport/ExtensionAPI.js +31 -3
- package/src/sap/fe/templates/ListReport/ListReport.view.xml +9 -7
- package/src/sap/fe/templates/ListReport/ListReportController.controller.js +244 -229
- package/src/sap/fe/templates/ListReport/manifest.json +11 -1
- package/src/sap/fe/templates/ListReport/overrides/IntentBasedNavigation.js +2 -6
- package/src/sap/fe/templates/ListReport/overrides/ViewState.js +151 -28
- package/src/sap/fe/templates/ListReport/view/fragments/MultipleMode.fragment.xml +3 -3
- package/src/sap/fe/templates/ObjectPage/AnnotationHelper.js +35 -99
- package/src/sap/fe/templates/ObjectPage/Component.js +15 -4
- package/src/sap/fe/templates/ObjectPage/ExtensionAPI.js +18 -3
- package/src/sap/fe/templates/ObjectPage/ObjectPage.view.xml +169 -165
- package/src/sap/fe/templates/ObjectPage/ObjectPageController.controller.js +262 -170
- package/src/sap/fe/templates/ObjectPage/controls/StashableHBox.js +8 -0
- package/src/sap/fe/templates/ObjectPage/controls/SubSectionBlock.js +1 -1
- package/src/sap/fe/templates/ObjectPage/overrides/Paginator.js +13 -0
- package/src/sap/fe/templates/ObjectPage/overrides/Share.js +2 -2
- package/src/sap/fe/templates/ObjectPage/overrides/ViewState.js +42 -1
- package/src/sap/fe/templates/ObjectPage/templating/ObjectPageTemplating.js +16 -14
- package/src/sap/fe/templates/ObjectPage/templating/ObjectPageTemplating.ts +20 -8
- package/src/sap/fe/templates/ObjectPage/view/fragments/Actions.fragment.xml +14 -19
- package/src/sap/fe/templates/ObjectPage/view/fragments/EditableHeaderFacet.fragment.xml +3 -3
- package/src/sap/fe/templates/ObjectPage/view/fragments/FooterContent.fragment.xml +1 -1
- package/src/sap/fe/templates/ObjectPage/view/fragments/HeaderContent.fragment.xml +34 -38
- package/src/sap/fe/templates/ObjectPage/view/fragments/HeaderDataPointTitle.fragment.xml +26 -16
- package/src/sap/fe/templates/ObjectPage/view/fragments/ObjectPageHeaderForm.fragment.xml +5 -5
- package/src/sap/fe/templates/ObjectPage/view/fragments/Section.fragment.xml +8 -2
- package/src/sap/fe/templates/ObjectPage/view/fragments/SectionContent.fragment.xml +8 -4
- package/src/sap/fe/templates/RootContainer/controller/Fcl.controller.js +117 -115
- package/src/sap/fe/templates/RootContainer/controller/NavContainer.controller.js +113 -99
- package/src/sap/fe/templates/RootContainer/controller/RootContainerBaseController.js +32 -21
- package/src/sap/fe/templates/RootContainer/view/Fcl.view.xml +2 -1
- package/src/sap/fe/templates/RootContainer/view/NavContainer.view.xml +1 -1
- package/src/sap/fe/templates/TableScroller.js +61 -0
- package/src/sap/fe/templates/controls/Chart.fragment.xml +11 -14
- package/src/sap/fe/templates/controls/Table.fragment.xml +3 -0
- package/src/sap/fe/templates/library.js +1 -1
- package/src/sap/fe/templates/messagebundle.properties +1 -1
- package/src/sap/fe/templates/messagebundle_ar.properties +9 -5
- package/src/sap/fe/templates/messagebundle_bg.properties +8 -4
- package/src/sap/fe/templates/messagebundle_ca.properties +8 -4
- package/src/sap/fe/templates/messagebundle_cs.properties +7 -3
- package/src/sap/fe/templates/messagebundle_cy.properties +8 -4
- package/src/sap/fe/templates/messagebundle_da.properties +9 -5
- package/src/sap/fe/templates/messagebundle_de.properties +8 -4
- package/src/sap/fe/templates/messagebundle_el.properties +8 -4
- package/src/sap/fe/templates/messagebundle_en.properties +7 -3
- package/src/sap/fe/templates/messagebundle_en_GB.properties +7 -3
- package/src/sap/fe/templates/messagebundle_en_US_sappsd.properties +7 -3
- package/src/sap/fe/templates/messagebundle_en_US_saprigi.properties +7 -3
- package/src/sap/fe/templates/messagebundle_en_US_saptrc.properties +7 -3
- package/src/sap/fe/templates/messagebundle_es.properties +8 -4
- package/src/sap/fe/templates/messagebundle_es_MX.properties +8 -4
- package/src/sap/fe/templates/messagebundle_et.properties +7 -3
- package/src/sap/fe/templates/messagebundle_fi.properties +8 -4
- package/src/sap/fe/templates/messagebundle_fr.properties +9 -5
- package/src/sap/fe/templates/messagebundle_fr_CA.properties +8 -4
- package/src/sap/fe/templates/messagebundle_hi.properties +8 -4
- package/src/sap/fe/templates/messagebundle_hr.properties +8 -4
- package/src/sap/fe/templates/messagebundle_hu.properties +9 -5
- package/src/sap/fe/templates/messagebundle_id.properties +10 -6
- package/src/sap/fe/templates/messagebundle_it.properties +8 -4
- package/src/sap/fe/templates/messagebundle_iw.properties +8 -4
- package/src/sap/fe/templates/messagebundle_ja.properties +8 -4
- package/src/sap/fe/templates/messagebundle_kk.properties +8 -4
- package/src/sap/fe/templates/messagebundle_ko.properties +8 -4
- package/src/sap/fe/templates/messagebundle_lt.properties +8 -4
- package/src/sap/fe/templates/messagebundle_lv.properties +8 -4
- package/src/sap/fe/templates/messagebundle_ms.properties +8 -4
- package/src/sap/fe/templates/messagebundle_nl.properties +8 -4
- package/src/sap/fe/templates/messagebundle_no.properties +9 -5
- package/src/sap/fe/templates/messagebundle_pl.properties +8 -4
- package/src/sap/fe/templates/messagebundle_pt.properties +8 -4
- package/src/sap/fe/templates/messagebundle_pt_PT.properties +8 -4
- package/src/sap/fe/templates/messagebundle_ro.properties +8 -4
- package/src/sap/fe/templates/messagebundle_ru.properties +9 -5
- package/src/sap/fe/templates/messagebundle_sh.properties +8 -4
- package/src/sap/fe/templates/messagebundle_sk.properties +8 -4
- package/src/sap/fe/templates/messagebundle_sl.properties +8 -4
- package/src/sap/fe/templates/messagebundle_sv.properties +8 -4
- package/src/sap/fe/templates/messagebundle_th.properties +9 -5
- package/src/sap/fe/templates/messagebundle_tr.properties +7 -3
- package/src/sap/fe/templates/messagebundle_uk.properties +7 -3
- package/src/sap/fe/templates/messagebundle_vi.properties +8 -4
- package/src/sap/fe/templates/messagebundle_zh_CN.properties +9 -5
- package/src/sap/fe/templates/messagebundle_zh_TW.properties +8 -4
- package/src/sap/fe/templates/ObjectPage/overrides/Routing.js +0 -20
- package/src/sap/fe/templates/ObjectPage/view/fragments/TitleAndSubtitle.fragment.xml +0 -24
- package/src/sap/fe/templates/RootContainer/view/PlaceholderLR.view.xml +0 -617
- package/src/sap/fe/templates/RootContainer/view/PlaceholderOP.view.xml +0 -588
- package/src/sap/fe/templates/controls/OverflowToolbarButtonHover.js +0 -25
- package/src/sap/fe/templates/controls/Paginator.control.xml +0 -22
- package/src/sap/fe/templates/controls/Paginator.js +0 -173
|
@@ -23,6 +23,16 @@
|
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
|
-
"handleValidation": true
|
|
26
|
+
"handleValidation": true,
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"minUI5Version": "${sap.ui5.core.version}",
|
|
29
|
+
"libs": {
|
|
30
|
+
"sap.fe.core": {},
|
|
31
|
+
"sap.ui.mdc": {},
|
|
32
|
+
"sap.fe.macros": {},
|
|
33
|
+
"sap.ui.fl": {},
|
|
34
|
+
"sap.fe.navigation": {}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
27
37
|
}
|
|
28
38
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* SAPUI5
|
|
3
3
|
* (c) Copyright 2009-2021 SAP SE. All rights reserved.
|
|
4
4
|
*/
|
|
5
|
-
sap.ui.define(["sap/fe/core/CommonUtils"
|
|
5
|
+
sap.ui.define(["sap/fe/core/CommonUtils"], function(CommonUtils) {
|
|
6
6
|
"use strict";
|
|
7
7
|
return {
|
|
8
8
|
adaptNavigationContext: function(oSelectionVariant, oTargetInfo) {
|
|
@@ -28,10 +28,6 @@ sap.ui.define(["sap/fe/core/CommonUtils", "sap/fe/macros/filter/FilterUtils"], f
|
|
|
28
28
|
sRootPath,
|
|
29
29
|
aParameters
|
|
30
30
|
);
|
|
31
|
-
var oFilterBar = oController._getFilterBarControl();
|
|
32
|
-
var oFilterInfo = FilterUtils.getFilterInfo(oFilterBar, {
|
|
33
|
-
targetControl: oController._getCurrentTable()
|
|
34
|
-
}).filters;
|
|
35
31
|
var oInternalModelContext = oView.getBindingContext("internal");
|
|
36
32
|
var mTabs = oInternalModelContext.getProperty("tabs");
|
|
37
33
|
// Do we need to exclude Fields (mutli tables mode)?
|
|
@@ -44,7 +40,7 @@ sap.ui.define(["sap/fe/core/CommonUtils", "sap/fe/macros/filter/FilterUtils"], f
|
|
|
44
40
|
}
|
|
45
41
|
}
|
|
46
42
|
// TODO: move this also into the intent based navigation controller extension
|
|
47
|
-
CommonUtils.addExternalStateFiltersToSelectionVariant(oSelectionVariant, oFilterBarConditions, oTargetInfo
|
|
43
|
+
CommonUtils.addExternalStateFiltersToSelectionVariant(oSelectionVariant, oFilterBarConditions, oTargetInfo);
|
|
48
44
|
delete oTargetInfo.propertiesWithoutConflict;
|
|
49
45
|
}
|
|
50
46
|
},
|
|
@@ -7,12 +7,14 @@ sap.ui.define(
|
|
|
7
7
|
"sap/fe/core/library",
|
|
8
8
|
"sap/fe/navigation/library",
|
|
9
9
|
"sap/fe/core/CommonUtils",
|
|
10
|
+
"sap/fe/core/helpers/KeepAliveHelper",
|
|
10
11
|
"sap/ui/fl/apply/api/ControlVariantApplyAPI",
|
|
11
12
|
"sap/ui/mdc/p13n/StateUtil",
|
|
12
13
|
"sap/ui/Device",
|
|
13
|
-
"sap/ui/mdc/enum/ConditionValidated"
|
|
14
|
+
"sap/ui/mdc/enum/ConditionValidated",
|
|
15
|
+
"sap/base/Log"
|
|
14
16
|
],
|
|
15
|
-
function(CoreLibrary, NavLibrary, CommonUtils, ControlVariantApplyAPI, StateUtil, Device, ConditionValidated) {
|
|
17
|
+
function(CoreLibrary, NavLibrary, CommonUtils, KeepAliveHelper, ControlVariantApplyAPI, StateUtil, Device, ConditionValidated, Log) {
|
|
16
18
|
"use strict";
|
|
17
19
|
|
|
18
20
|
var NavType = NavLibrary.NavType,
|
|
@@ -28,7 +30,7 @@ sap.ui.define(
|
|
|
28
30
|
var oView = this.getView(),
|
|
29
31
|
oController = oView.getController(),
|
|
30
32
|
oFilterBar = oController._getFilterBarControl(),
|
|
31
|
-
aTables = oController.
|
|
33
|
+
aTables = oController._getControls("table");
|
|
32
34
|
|
|
33
35
|
oFilterBar.setSuspendSelection(true);
|
|
34
36
|
aTables.forEach(function(oTable) {
|
|
@@ -43,11 +45,20 @@ sap.ui.define(
|
|
|
43
45
|
oController = oView.getController();
|
|
44
46
|
oController._getFilterBarControl().setSuspendSelection(false);
|
|
45
47
|
},
|
|
48
|
+
adaptBindingRefreshControls: function(aControls) {
|
|
49
|
+
var oView = this.getView(),
|
|
50
|
+
oController = oView.getController(),
|
|
51
|
+
aViewControls = oController._getControls(),
|
|
52
|
+
aControlsToRefresh = KeepAliveHelper.getControlsForRefresh(oView, aViewControls);
|
|
53
|
+
|
|
54
|
+
Array.prototype.push.apply(aControls, aControlsToRefresh);
|
|
55
|
+
},
|
|
46
56
|
adaptStateControls: function(aStateControls) {
|
|
47
57
|
var oView = this.getView(),
|
|
48
58
|
oController = oView.getController(),
|
|
49
59
|
oViewData = oView.getViewData(),
|
|
50
|
-
bControlVM = oViewData.variantManagement === VariantManagement.Control
|
|
60
|
+
bControlVM = oViewData.variantManagement === VariantManagement.Control,
|
|
61
|
+
that = this;
|
|
51
62
|
|
|
52
63
|
if (oController._isMultiMode()) {
|
|
53
64
|
aStateControls.push(oController._getMultiModeControl());
|
|
@@ -57,7 +68,7 @@ sap.ui.define(
|
|
|
57
68
|
if (oFilterBarVM) {
|
|
58
69
|
aStateControls.push(oFilterBarVM);
|
|
59
70
|
}
|
|
60
|
-
oController.
|
|
71
|
+
oController._getControls("table").forEach(function(oTable) {
|
|
61
72
|
var oQuickFilter = oTable.getQuickFilter();
|
|
62
73
|
if (oQuickFilter) {
|
|
63
74
|
aStateControls.push(oQuickFilter);
|
|
@@ -65,6 +76,9 @@ sap.ui.define(
|
|
|
65
76
|
if (bControlVM) {
|
|
66
77
|
aStateControls.push(oTable.getVariant());
|
|
67
78
|
}
|
|
79
|
+
if (that.getView().getController().bTestAppState) {
|
|
80
|
+
aStateControls.push(oTable);
|
|
81
|
+
}
|
|
68
82
|
});
|
|
69
83
|
|
|
70
84
|
if (oController._hasMultiVisualizations()) {
|
|
@@ -74,6 +88,22 @@ sap.ui.define(
|
|
|
74
88
|
aStateControls.push(oController._getFilterBarControl());
|
|
75
89
|
aStateControls.push(oView.byId("fe::ListReport"));
|
|
76
90
|
},
|
|
91
|
+
adaptControlStateHandler: function(oControl, aControlHandler) {
|
|
92
|
+
if (oControl.isA("sap.ui.fl.variants.VariantManagement")) {
|
|
93
|
+
aControlHandler.push({
|
|
94
|
+
retrieve: function(oVM) {
|
|
95
|
+
return {
|
|
96
|
+
"variantId": oVM.getCurrentVariantKey()
|
|
97
|
+
};
|
|
98
|
+
},
|
|
99
|
+
apply: function(oVM, oControlState) {
|
|
100
|
+
if (oControlState && oControlState.variantId !== undefined) {
|
|
101
|
+
oVM.setModified(true);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
},
|
|
77
107
|
retrieveAdditionalStates: function(mAdditionalStates) {
|
|
78
108
|
var oView = this.getView(),
|
|
79
109
|
oController = oView.getController(),
|
|
@@ -113,28 +143,112 @@ sap.ui.define(
|
|
|
113
143
|
},
|
|
114
144
|
applyNavigationParameters: function(oNavigationParameter, aResults) {
|
|
115
145
|
var oView = this.getView(),
|
|
146
|
+
that = this,
|
|
147
|
+
oController = oView.getController(),
|
|
148
|
+
oComponent = oController.getOwnerComponent(),
|
|
149
|
+
oAppComponent = sap.ui.core.Component.getOwnerComponentFor(oComponent),
|
|
150
|
+
oComponentData = oAppComponent.getComponentData(),
|
|
151
|
+
oStartupParameters = (oComponentData && oComponentData.startupParameters) || {},
|
|
152
|
+
oVariantPromise = that.handleVariantIdPassedViaURLParams(oStartupParameters),
|
|
153
|
+
bFilterVariantApplied;
|
|
154
|
+
oVariantPromise
|
|
155
|
+
.then(function(aVariants) {
|
|
156
|
+
if (aVariants && aVariants.length > 0) {
|
|
157
|
+
if (aVariants[0] === true || aVariants[1] === true) {
|
|
158
|
+
bFilterVariantApplied = true;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
var oRes = that._applySelectionVariant(oView, oNavigationParameter, bFilterVariantApplied).then(function() {
|
|
162
|
+
var oController = oView.getController();
|
|
163
|
+
var oDynamicPage = oView.byId("fe::ListReport");
|
|
164
|
+
var bPreventInitialSearch = false;
|
|
165
|
+
var oFilterBarVM = that._getFilterBarVM(oView);
|
|
166
|
+
var oFilterBarControl = oController._getFilterBarControl();
|
|
167
|
+
if (
|
|
168
|
+
(oNavigationParameter.navigationType !== NavType.initial && oNavigationParameter.requiresStandardVariant) ||
|
|
169
|
+
(!oFilterBarVM && oView.getViewData().initialLoad === InitialLoadMode.Enabled) ||
|
|
170
|
+
oController._shouldAutoTriggerSearch(oFilterBarVM)
|
|
171
|
+
) {
|
|
172
|
+
oFilterBarControl.triggerSearch();
|
|
173
|
+
} else {
|
|
174
|
+
bPreventInitialSearch = that._preventInitialSearch(oFilterBarVM);
|
|
175
|
+
}
|
|
176
|
+
that._bSearchTriggered = !bPreventInitialSearch;
|
|
177
|
+
oDynamicPage.setHeaderExpanded(Device.system.desktop || bPreventInitialSearch);
|
|
178
|
+
});
|
|
179
|
+
aResults.push(oRes);
|
|
180
|
+
})
|
|
181
|
+
.catch(function() {
|
|
182
|
+
Log.error("Variant ID cannot be applied");
|
|
183
|
+
});
|
|
184
|
+
},
|
|
185
|
+
|
|
186
|
+
handleVariantIdPassedViaURLParams: function(oUrlParams) {
|
|
187
|
+
var aPageVariantId = oUrlParams["sap-ui-fe-variant-id"],
|
|
188
|
+
aFilterBarVariantId = oUrlParams["sap-ui-fe-filterbar-variant-id"],
|
|
189
|
+
aTableVariantId = oUrlParams["sap-ui-fe-table-variant-id"],
|
|
190
|
+
oVariant;
|
|
191
|
+
if (aPageVariantId || aFilterBarVariantId || aTableVariantId) {
|
|
192
|
+
oVariant = {
|
|
193
|
+
sPageVariantId: aPageVariantId && aPageVariantId[0],
|
|
194
|
+
sFilterBarVariantId: aFilterBarVariantId && aFilterBarVariantId[0],
|
|
195
|
+
sTableVariantId: aTableVariantId && aTableVariantId[0]
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
return this._handleControlVariantId(oVariant);
|
|
199
|
+
},
|
|
200
|
+
|
|
201
|
+
_handleControlVariantId: function(oVariantIDs) {
|
|
202
|
+
var oView = this.getView(),
|
|
203
|
+
aPromises = [],
|
|
116
204
|
that = this;
|
|
117
|
-
var
|
|
118
|
-
|
|
119
|
-
var
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
205
|
+
var sVariantManagement = oView.getViewData().variantManagement;
|
|
206
|
+
if (oVariantIDs && oVariantIDs.sPageVariantId && sVariantManagement === "Page") {
|
|
207
|
+
var oVM = oView.byId("fe::PageVariantManagement");
|
|
208
|
+
oVM.getVariants().forEach(function(oVariant) {
|
|
209
|
+
if (oVariant.key === oVariantIDs.sPageVariantId) {
|
|
210
|
+
aPromises.push(that._applyControlVariant(oVM, oVariantIDs.sPageVariantId, true));
|
|
211
|
+
}
|
|
212
|
+
});
|
|
213
|
+
} else if (oVariantIDs && sVariantManagement === "Control") {
|
|
214
|
+
if (oVariantIDs.sFilterBarVariantId) {
|
|
215
|
+
var oVM = oView.byId(oView.getContent()[0].data("filterBarVariantId"));
|
|
216
|
+
oVM.getVariants().forEach(function(oVariant) {
|
|
217
|
+
if (oVariant.key === oVariantIDs.sFilterBarVariantId) {
|
|
218
|
+
aPromises.push(that._applyControlVariant(oVM, oVariantIDs.sFilterBarVariantId, true));
|
|
219
|
+
}
|
|
220
|
+
});
|
|
131
221
|
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
222
|
+
if (oVariantIDs.sTableVariantId) {
|
|
223
|
+
var oController = oView.getController(),
|
|
224
|
+
aTables = oController._getControls("table");
|
|
225
|
+
aTables.forEach(function(oTable) {
|
|
226
|
+
var oTableVariant = oTable.getVariant();
|
|
227
|
+
if (oTable && oTableVariant) {
|
|
228
|
+
oTableVariant.getVariants().forEach(function(oVariant) {
|
|
229
|
+
if (oVariant.key === oVariantIDs.sTableVariantId) {
|
|
230
|
+
aPromises.push(that._applyControlVariant(oTableVariant, oVariantIDs.sTableVariantId));
|
|
231
|
+
}
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
return Promise.all(aPromises);
|
|
136
238
|
},
|
|
137
239
|
|
|
240
|
+
_applyControlVariant: function(oVariant, sVariantID, bFilterVariantApplied) {
|
|
241
|
+
var sVariantReference = this._checkIfVariantIdIsAvailable(oVariant, sVariantID)
|
|
242
|
+
? sVariantID
|
|
243
|
+
: oVariant.getStandardVariantKey();
|
|
244
|
+
var oVM = ControlVariantApplyAPI.activateVariant({
|
|
245
|
+
element: oVariant,
|
|
246
|
+
variantReference: sVariantReference
|
|
247
|
+
});
|
|
248
|
+
return oVM.then(function() {
|
|
249
|
+
return bFilterVariantApplied;
|
|
250
|
+
});
|
|
251
|
+
},
|
|
138
252
|
/************************************* private helper *****************************************/
|
|
139
253
|
|
|
140
254
|
_getFilterBarVM: function(oView) {
|
|
@@ -162,7 +276,7 @@ sap.ui.define(
|
|
|
162
276
|
return !oCurrentVariant.executeOnSelect;
|
|
163
277
|
},
|
|
164
278
|
|
|
165
|
-
_applySelectionVariant: function(oView, oNavigationParameter) {
|
|
279
|
+
_applySelectionVariant: function(oView, oNavigationParameter, bFilterVariantApplied) {
|
|
166
280
|
var oSelectionVariant = oNavigationParameter.selectionVariant,
|
|
167
281
|
oSelectionVariantDefaults = oNavigationParameter.selectionVariantDefaults;
|
|
168
282
|
if (!oSelectionVariant) {
|
|
@@ -178,6 +292,9 @@ sap.ui.define(
|
|
|
178
292
|
oVariant,
|
|
179
293
|
bRequiresStandardVariant = oNavigationParameter.requiresStandardVariant;
|
|
180
294
|
|
|
295
|
+
if (bFilterVariantApplied) {
|
|
296
|
+
oConditions = oFilterBar.getConditions();
|
|
297
|
+
}
|
|
181
298
|
CommonUtils.addDefaultDisplayCurrency(aMandatoryFilterFields, oSelectionVariant, oSelectionVariantDefaults);
|
|
182
299
|
CommonUtils.addSelectionVariantToConditions(oSelectionVariant, oConditions, oMetaModel, sContextPath);
|
|
183
300
|
switch (oViewData.variantManagement) {
|
|
@@ -191,13 +308,13 @@ sap.ui.define(
|
|
|
191
308
|
default:
|
|
192
309
|
break;
|
|
193
310
|
}
|
|
194
|
-
return this._activateSelectionVariant(oFilterBar, oConditions, oVariant, bRequiresStandardVariant);
|
|
311
|
+
return this._activateSelectionVariant(oFilterBar, oConditions, oVariant, bRequiresStandardVariant, bFilterVariantApplied);
|
|
195
312
|
},
|
|
196
|
-
_activateSelectionVariant: function(oFilterBar, oConditions, oVariant, bRequiresStandardVariant) {
|
|
313
|
+
_activateSelectionVariant: function(oFilterBar, oConditions, oVariant, bRequiresStandardVariant, bFilterVariantApplied) {
|
|
197
314
|
var that = this,
|
|
198
315
|
oPromise;
|
|
199
316
|
|
|
200
|
-
if (oVariant) {
|
|
317
|
+
if (oVariant && !bFilterVariantApplied) {
|
|
201
318
|
var oVariantKey = bRequiresStandardVariant ? oVariant.getStandardVariantKey() : oVariant.getDefaultVariantKey();
|
|
202
319
|
if (oVariantKey === null) {
|
|
203
320
|
oVariantKey = oVariant.getId();
|
|
@@ -211,9 +328,11 @@ sap.ui.define(
|
|
|
211
328
|
} else {
|
|
212
329
|
oPromise = Promise.resolve(true);
|
|
213
330
|
}
|
|
214
|
-
|
|
215
331
|
return oPromise.then(function(bClearFilterAndReplaceWithAppState) {
|
|
216
332
|
if (bClearFilterAndReplaceWithAppState) {
|
|
333
|
+
if (that.getView().getController().bTestAppState) {
|
|
334
|
+
return that._fnApplyConditions(oFilterBar, oConditions);
|
|
335
|
+
}
|
|
217
336
|
return that._fnClearFilterAndReplaceWithAppState(oFilterBar, oConditions);
|
|
218
337
|
}
|
|
219
338
|
});
|
|
@@ -247,6 +366,10 @@ sap.ui.define(
|
|
|
247
366
|
}
|
|
248
367
|
if (oPropertyInfo.hasValueHelp) {
|
|
249
368
|
mFilter[oPropertyInfo.path].forEach(fnAdjustValueHelpCondition);
|
|
369
|
+
} else {
|
|
370
|
+
mFilter[oPropertyInfo.path].forEach(function(oCondition) {
|
|
371
|
+
oCondition.validated = ConditionValidated.NotValidated;
|
|
372
|
+
});
|
|
250
373
|
}
|
|
251
374
|
} else {
|
|
252
375
|
mFilter[oPropertyInfo.path] = [];
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
<template:with path="view>presentation" var="presentationContext">
|
|
20
20
|
<IconTabFilter
|
|
21
21
|
text="{view>title}"
|
|
22
|
-
key="{= ${view>tableControlId} || ${view>customTabId} }"
|
|
22
|
+
key="{= ${view>tableControlId} || ${view>customTabId} || ${view>chartControlId}}"
|
|
23
23
|
customData:selectionVariant="{view>selectionVariantPath}"
|
|
24
24
|
>
|
|
25
25
|
<content>
|
|
@@ -29,12 +29,12 @@
|
|
|
29
29
|
</template:then>
|
|
30
30
|
<template:else>
|
|
31
31
|
<MessageStrip
|
|
32
|
-
text="{= '{parts: [{path: \'internal>tabs/ignoredFields/' + ${view>tableControlId} + '\'}, {path: \'\', value: \'' + ${view>title} + '\' }], formatter: \'.formatters.setTabMessageStrip\'}' }"
|
|
32
|
+
text="{= '{parts: [{path: \'internal>tabs/ignoredFields/' + (${view>tableControlId} || ${view>chartControlId}) + '\'}, {path: \'\', value: \'' + ${view>title} + '\' }], formatter: \'.formatters.setTabMessageStrip\'}' }"
|
|
33
33
|
type="Information"
|
|
34
34
|
showIcon="true"
|
|
35
35
|
showCloseButton="true"
|
|
36
36
|
class="sapUiSmallMargin"
|
|
37
|
-
visible="{= '{= (${internal>tabs/ignoredFields/' +
|
|
37
|
+
visible="{= '{= (${internal>tabs/ignoredFields/' +(${view>tableControlId} || ${view>chartControlId}) + '} || []).length>0 }' }"
|
|
38
38
|
>
|
|
39
39
|
</MessageStrip>
|
|
40
40
|
<core:Fragment fragmentName="sap.fe.templates.ListReport.view.fragments.CollectionVisualization" type="XML" />
|
|
@@ -69,16 +69,32 @@ sap.ui.define(
|
|
|
69
69
|
},
|
|
70
70
|
|
|
71
71
|
/**
|
|
72
|
-
* Function to
|
|
73
|
-
*
|
|
74
|
-
* @param {
|
|
75
|
-
* @
|
|
72
|
+
* Function to find an action from the array of header actions in the converter context.
|
|
73
|
+
*
|
|
74
|
+
* @param {object[]} aConverterContextHeaderActions Array of 'header' actions on the object page.
|
|
75
|
+
* @param {string} sActionType The action type
|
|
76
|
+
* @returns {object | undefined} The action with the matching action type
|
|
77
|
+
* @private
|
|
76
78
|
*/
|
|
77
|
-
|
|
78
|
-
var
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
79
|
+
_findAction: function(aConverterContextHeaderActions, sActionType) {
|
|
80
|
+
var oAction;
|
|
81
|
+
if (aConverterContextHeaderActions && aConverterContextHeaderActions.length) {
|
|
82
|
+
oAction = aConverterContextHeaderActions.find(function(oHeaderAction) {
|
|
83
|
+
return oHeaderAction.type === sActionType;
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
return oAction;
|
|
87
|
+
},
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Function to format the 'enabled' property for the Delete button on the object page or subobject page in case of a Command Execution.
|
|
91
|
+
*
|
|
92
|
+
* @param {Array} aConverterContextHeaderActions Array of header actions on the object page
|
|
93
|
+
* @returns {string} Returns expression binding or Boolean value from the converter output
|
|
94
|
+
*/
|
|
95
|
+
getDeleteCommandExecutionEnabled: function(aConverterContextHeaderActions) {
|
|
96
|
+
var oDeleteAction = AnnotationHelper._findAction(aConverterContextHeaderActions, "Secondary");
|
|
97
|
+
return oDeleteAction ? oDeleteAction.enabled : "true";
|
|
82
98
|
},
|
|
83
99
|
/**
|
|
84
100
|
* Function to format the 'visible' property for the Delete button on the object page or subobject page in case of a Command Execution.
|
|
@@ -87,10 +103,7 @@ sap.ui.define(
|
|
|
87
103
|
* @returns {string} Returns expression binding or Boolean value from the converter output
|
|
88
104
|
*/
|
|
89
105
|
getDeleteCommandExecutionVisible: function(aConverterContextHeaderActions) {
|
|
90
|
-
var oDeleteAction =
|
|
91
|
-
return oAction.type === "Secondary";
|
|
92
|
-
});
|
|
93
|
-
|
|
106
|
+
var oDeleteAction = AnnotationHelper._findAction(aConverterContextHeaderActions, "Secondary");
|
|
94
107
|
return oDeleteAction ? oDeleteAction.visible : "true";
|
|
95
108
|
},
|
|
96
109
|
/**
|
|
@@ -100,38 +113,18 @@ sap.ui.define(
|
|
|
100
113
|
* @returns {string} Returns expression binding or Boolean value from the converter output
|
|
101
114
|
*/
|
|
102
115
|
getEditCommandExecutionVisible: function(aConverterContextHeaderActions) {
|
|
103
|
-
var oEditAction =
|
|
104
|
-
return oAction.type === "Primary";
|
|
105
|
-
});
|
|
106
|
-
|
|
116
|
+
var oEditAction = AnnotationHelper._findAction(aConverterContextHeaderActions, "Primary");
|
|
107
117
|
return oEditAction ? oEditAction.visible : "true";
|
|
108
118
|
},
|
|
109
119
|
/**
|
|
110
|
-
* Function to
|
|
120
|
+
* Function to format the 'enabled' property for the Edit button on the object page or subobject page in case of a Command Execution.
|
|
111
121
|
*
|
|
112
|
-
* @param {
|
|
113
|
-
* @returns {string} Returns expression binding or Boolean value
|
|
114
|
-
*/
|
|
115
|
-
fnGetDeleteButtonEnabled: function(oDeletable) {
|
|
116
|
-
if (oDeletable === "false") {
|
|
117
|
-
return false;
|
|
118
|
-
} else if (oDeletable && oDeletable !== "true") {
|
|
119
|
-
return "{= $" + oDeletable + "}";
|
|
120
|
-
} else {
|
|
121
|
-
return true;
|
|
122
|
-
}
|
|
123
|
-
},
|
|
124
|
-
|
|
125
|
-
/**
|
|
126
|
-
* Function to get the enablement for the Delete button in the object page/sub-object page based on current and parent entity-set restrictions.
|
|
127
|
-
*
|
|
128
|
-
* @param {object} [oDeletable] Current Entity Set delete restriction value.
|
|
129
|
-
* @param {object} [bParentDeleteRestrictionEnabled] The parent entity's delete restriction value via navigation restriction.
|
|
130
|
-
* @returns {string} Returns expression binding or boolean value based on oDeletable
|
|
122
|
+
* @param {Array} aConverterContextHeaderActions Array of header actions on the object page
|
|
123
|
+
* @returns {string} Returns expression binding or Boolean value from the converter output
|
|
131
124
|
*/
|
|
132
|
-
|
|
133
|
-
var
|
|
134
|
-
return
|
|
125
|
+
getEditCommandExecutionEnabled: function(aConverterContextHeaderActions) {
|
|
126
|
+
var oEditAction = AnnotationHelper._findAction(aConverterContextHeaderActions, "Primary");
|
|
127
|
+
return oEditAction ? oEditAction.enabled : "true";
|
|
135
128
|
},
|
|
136
129
|
/**
|
|
137
130
|
* Function to get the EditAction from the Entityset based on Draft or sticky based application.
|
|
@@ -307,63 +300,6 @@ sap.ui.define(
|
|
|
307
300
|
? "{fclhelper>/breadCrumbIsVisible}"
|
|
308
301
|
: oViewData.showBreadCrumbs;
|
|
309
302
|
},
|
|
310
|
-
/*
|
|
311
|
-
* Get expression for header action's enable property.
|
|
312
|
-
*
|
|
313
|
-
* @function
|
|
314
|
-
* @param {Object} [operationAvailable] operationAvailable object,
|
|
315
|
-
* @param {object} [oEntitySet] entity set information
|
|
316
|
-
* @param {string} [sOperationAvailableFormatted] formatted value of operational available
|
|
317
|
-
* returns {*} Expression or boolean values true if operationAvailable is not path based
|
|
318
|
-
*/
|
|
319
|
-
getEnabledExpressionForHeaderActions: function(operationAvailable, oEntitySet, sOperationAvailableFormatted) {
|
|
320
|
-
if (operationAvailable === null) {
|
|
321
|
-
var oEditAction =
|
|
322
|
-
(oEntitySet["@com.sap.vocabularies.Common.v1.DraftRoot"] &&
|
|
323
|
-
oEntitySet["@com.sap.vocabularies.Common.v1.DraftRoot"].EditAction) ||
|
|
324
|
-
(oEntitySet["@com.sap.vocabularies.Common.v1.StickySessionSupported"] &&
|
|
325
|
-
oEntitySet["@com.sap.vocabularies.Common.v1.StickySessionSupported"].EditAction);
|
|
326
|
-
if (oEditAction) {
|
|
327
|
-
return "{= ${#" + oEditAction + "} ? true : false }";
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
if (operationAvailable && operationAvailable.$Path) {
|
|
331
|
-
return sOperationAvailableFormatted;
|
|
332
|
-
} else {
|
|
333
|
-
return true;
|
|
334
|
-
}
|
|
335
|
-
},
|
|
336
|
-
|
|
337
|
-
/*
|
|
338
|
-
* Gets the expression for the enablement of the action annotation.
|
|
339
|
-
*
|
|
340
|
-
* @function
|
|
341
|
-
* @param {object} [oBound] The Bound action context
|
|
342
|
-
* @param {object} [oActionContext] The object of the action context
|
|
343
|
-
* @param {object} [oDataField] The object of the data field
|
|
344
|
-
* @param {string} [sFormattedValueOperationalAvailable] The string value of the available operation
|
|
345
|
-
* returns {*} returns {*} both Boolean and expression with the following logic:
|
|
346
|
-
* if none of the conditions is met, the button is enabled
|
|
347
|
-
* if bound is false, then 'true' is returned as a string
|
|
348
|
-
* in all other cases a runtime binding expression is returned
|
|
349
|
-
*/
|
|
350
|
-
getButtonEnabledForAnnotationAction: function(oBound, oActionContext, oDataField, sFormattedValueOperationalAvailable) {
|
|
351
|
-
if (oBound && oBound.$IsBound !== true) {
|
|
352
|
-
return "true";
|
|
353
|
-
}
|
|
354
|
-
if (oActionContext && oActionContext["@Org.OData.Core.V1.OperationAvailable"] === null && oDataField) {
|
|
355
|
-
return "{= !${#" + oDataField.Action + "} ? false : true } }";
|
|
356
|
-
}
|
|
357
|
-
if (
|
|
358
|
-
oActionContext &&
|
|
359
|
-
oActionContext["@Org.OData.Core.V1.OperationAvailable"] &&
|
|
360
|
-
oActionContext["@Org.OData.Core.V1.OperationAvailable"].$Path
|
|
361
|
-
) {
|
|
362
|
-
return "{= $" + sFormattedValueOperationalAvailable + "}";
|
|
363
|
-
}
|
|
364
|
-
return true;
|
|
365
|
-
},
|
|
366
|
-
|
|
367
303
|
getShareButtonVisibility: function(viewData) {
|
|
368
304
|
var sShareButtonVisibilityExp = "!${ui>createMode}";
|
|
369
305
|
if (viewData.fclEnabled) {
|
|
@@ -395,8 +331,8 @@ sap.ui.define(
|
|
|
395
331
|
*/
|
|
396
332
|
getPressExpressionForDelete: function(sEntitySetName) {
|
|
397
333
|
var sDeletableContexts = "${$view>/getBindingContext}",
|
|
398
|
-
sTitle = "${$view>/#fe::ObjectPage/getHeaderTitle/getExpandedHeading/getItems/1/
|
|
399
|
-
sDescription = "${$view>/#fe::ObjectPage/getHeaderTitle/
|
|
334
|
+
sTitle = "${$view>/#fe::ObjectPage/getHeaderTitle/getExpandedHeading/getItems/1/getText}",
|
|
335
|
+
sDescription = "${$view>/#fe::ObjectPage/getHeaderTitle/getExpandedContent/0/getItems/0/getText}";
|
|
400
336
|
var oParams = {
|
|
401
337
|
title: sTitle,
|
|
402
338
|
entitySetName: CommonHelper.addSingleQuotes(sEntitySetName),
|
|
@@ -70,10 +70,10 @@ sap.ui.define(
|
|
|
70
70
|
defaultValue: false
|
|
71
71
|
},
|
|
72
72
|
/**
|
|
73
|
-
*
|
|
73
|
+
* Defines the properties which can be used for inbound Navigation
|
|
74
74
|
*/
|
|
75
|
-
|
|
76
|
-
type: "
|
|
75
|
+
inboundParameters: {
|
|
76
|
+
type: "object"
|
|
77
77
|
}
|
|
78
78
|
},
|
|
79
79
|
library: "sap.fe.templates",
|
|
@@ -105,12 +105,23 @@ sap.ui.define(
|
|
|
105
105
|
oParamters
|
|
106
106
|
);
|
|
107
107
|
|
|
108
|
+
var oStartUpParams =
|
|
109
|
+
this.oAppComponent &&
|
|
110
|
+
this.oAppComponent.getComponentData() &&
|
|
111
|
+
this.oAppComponent.getComponentData().startupParameters,
|
|
112
|
+
oInboundParameters = this.getViewData().inboundParameters,
|
|
113
|
+
createParams;
|
|
114
|
+
if (oStartUpParams.preferredMode && oStartUpParams.preferredMode[0].indexOf("create") !== -1) {
|
|
115
|
+
createParams = CommonUtils.getAdditionalParamsForCreate(oStartUpParams, oInboundParameters);
|
|
116
|
+
}
|
|
117
|
+
|
|
108
118
|
// for now wait until the view and the controller is created
|
|
109
119
|
that.getRootControl()
|
|
110
120
|
.getController()
|
|
111
121
|
.editFlow.createDocument(oListBinding, {
|
|
112
122
|
creationMode: "Sync",
|
|
113
|
-
createAction: bActionCreate
|
|
123
|
+
createAction: bActionCreate,
|
|
124
|
+
data: createParams
|
|
114
125
|
})
|
|
115
126
|
.finally(function() {
|
|
116
127
|
that.DeferredContextCreated = false;
|
|
@@ -93,12 +93,27 @@ sap.ui.define(["sap/fe/core/ExtensionAPI", "sap/fe/core/CommonUtils", "sap/fe/co
|
|
|
93
93
|
oBindingContext
|
|
94
94
|
);
|
|
95
95
|
},
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Gets the list entries currently selected for the table.
|
|
99
|
+
*
|
|
100
|
+
* @alias sap.fe.templates.ObjectPage.ExtensionAPI#getSelectedContexts
|
|
101
|
+
* @param {string} sTableId The ID identifying the table the selected context is requested for
|
|
102
|
+
* @returns {sap.ui.model.odata.v4.Context[]} Array containing the selected contexts
|
|
103
|
+
*
|
|
104
|
+
* @public
|
|
105
|
+
*/
|
|
106
|
+
getSelectedContexts: function(sTableId) {
|
|
107
|
+
var oTable = this._view.byId(sTableId);
|
|
108
|
+
return (oTable && oTable.isA("sap.ui.mdc.Table") && oTable.getSelectedContexts()) || [];
|
|
109
|
+
},
|
|
110
|
+
|
|
96
111
|
/**
|
|
97
|
-
* Displays
|
|
112
|
+
* Displays or hides the side content of an object page block.
|
|
98
113
|
*
|
|
99
114
|
* @alias sap.fe.templates.ObjectPage.ExtensionAPI#showSideContent
|
|
100
|
-
* @param {string} sSubSectionKey Key of the
|
|
101
|
-
* @param {boolean} [bShow] Optional
|
|
115
|
+
* @param {string} sSubSectionKey Key of the side content fragment as defined in the manifest.json
|
|
116
|
+
* @param {boolean} [bShow] Optional Boolean flag to show or hide the side content
|
|
102
117
|
*
|
|
103
118
|
* @public
|
|
104
119
|
*/
|