@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,19 +1,39 @@
|
|
|
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
|
[
|
|
7
8
|
"sap/fe/core/library",
|
|
8
9
|
"sap/fe/navigation/library",
|
|
9
10
|
"sap/fe/core/CommonUtils",
|
|
11
|
+
"sap/fe/core/helpers/KeepAliveHelper",
|
|
10
12
|
"sap/ui/fl/apply/api/ControlVariantApplyAPI",
|
|
11
13
|
"sap/ui/mdc/p13n/StateUtil",
|
|
12
14
|
"sap/ui/Device",
|
|
13
15
|
"sap/ui/mdc/enum/ConditionValidated",
|
|
16
|
+
"sap/fe/macros/DelegateUtil",
|
|
17
|
+
"sap/fe/core/helpers/ModelHelper",
|
|
18
|
+
"sap/fe/macros/filter/FilterUtils",
|
|
19
|
+
"sap/fe/core/templating/PropertyFormatters",
|
|
14
20
|
"sap/base/Log"
|
|
15
21
|
],
|
|
16
|
-
function(
|
|
22
|
+
function(
|
|
23
|
+
CoreLibrary,
|
|
24
|
+
NavLibrary,
|
|
25
|
+
CommonUtils,
|
|
26
|
+
KeepAliveHelper,
|
|
27
|
+
ControlVariantApplyAPI,
|
|
28
|
+
StateUtil,
|
|
29
|
+
Device,
|
|
30
|
+
ConditionValidated,
|
|
31
|
+
DelegateUtil,
|
|
32
|
+
ModelHelper,
|
|
33
|
+
FilterUtils,
|
|
34
|
+
PropertyFormatters,
|
|
35
|
+
Log
|
|
36
|
+
) {
|
|
17
37
|
"use strict";
|
|
18
38
|
|
|
19
39
|
var NavType = NavLibrary.NavType,
|
|
@@ -21,6 +41,9 @@ sap.ui.define(
|
|
|
21
41
|
TemplateContentView = CoreLibrary.TemplateContentView,
|
|
22
42
|
InitialLoadMode = CoreLibrary.InitialLoadMode;
|
|
23
43
|
|
|
44
|
+
var FilterRestrictions = CommonUtils.FilterRestrictions,
|
|
45
|
+
CONDITION_PATH_TO_PROPERTY_PATH_REGEX = /\+|\*/g;
|
|
46
|
+
|
|
24
47
|
return {
|
|
25
48
|
applyInitialStateOnly: function() {
|
|
26
49
|
return true;
|
|
@@ -30,25 +53,39 @@ sap.ui.define(
|
|
|
30
53
|
oController = oView.getController(),
|
|
31
54
|
oFilterBar = oController._getFilterBarControl(),
|
|
32
55
|
aTables = oController._getControls("table");
|
|
33
|
-
|
|
34
|
-
|
|
56
|
+
if (oFilterBar) {
|
|
57
|
+
oFilterBar.setSuspendSelection(true);
|
|
58
|
+
aPromises.push(oFilterBar.initialized());
|
|
59
|
+
}
|
|
35
60
|
aTables.forEach(function(oTable) {
|
|
36
61
|
aPromises.push(oTable.initialized());
|
|
37
62
|
});
|
|
38
|
-
aPromises.push(oFilterBar.initialized());
|
|
39
63
|
|
|
40
64
|
delete this._bSearchTriggered;
|
|
41
65
|
},
|
|
42
66
|
onAfterStateApplied: function() {
|
|
43
|
-
var
|
|
44
|
-
|
|
45
|
-
|
|
67
|
+
var oController = this.getView().getController();
|
|
68
|
+
var oFilterBar = oController._getFilterBarControl();
|
|
69
|
+
if (oFilterBar) {
|
|
70
|
+
oFilterBar.setSuspendSelection(false);
|
|
71
|
+
} else if (oController._isFilterBarHidden()) {
|
|
72
|
+
var oInternalModelContext = oController.getView().getBindingContext("internal"),
|
|
73
|
+
aControls = oController._getControls();
|
|
74
|
+
oInternalModelContext.setProperty("hasPendingFilters", false);
|
|
75
|
+
if (oController._isMultiMode()) {
|
|
76
|
+
oController._setCountsOutDated();
|
|
77
|
+
var sDisplayedControlId = oController._getCurrentControl().getId();
|
|
78
|
+
aControls.forEach(function(oControl) {
|
|
79
|
+
oControl.data("outdatedRows", oControl.getId() !== sDisplayedControlId);
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
}
|
|
46
83
|
},
|
|
47
84
|
adaptBindingRefreshControls: function(aControls) {
|
|
48
85
|
var oView = this.getView(),
|
|
49
86
|
oController = oView.getController(),
|
|
50
87
|
aViewControls = oController._getControls(),
|
|
51
|
-
aControlsToRefresh =
|
|
88
|
+
aControlsToRefresh = KeepAliveHelper.getControlsForRefresh(oView, aViewControls);
|
|
52
89
|
|
|
53
90
|
Array.prototype.push.apply(aControls, aControlsToRefresh);
|
|
54
91
|
},
|
|
@@ -58,14 +95,13 @@ sap.ui.define(
|
|
|
58
95
|
oViewData = oView.getViewData(),
|
|
59
96
|
bControlVM = oViewData.variantManagement === VariantManagement.Control;
|
|
60
97
|
|
|
61
|
-
if (oController._isMultiMode()) {
|
|
62
|
-
aStateControls.push(oController._getMultiModeControl());
|
|
63
|
-
}
|
|
64
|
-
|
|
65
98
|
var oFilterBarVM = this._getFilterBarVM(oView);
|
|
66
99
|
if (oFilterBarVM) {
|
|
67
100
|
aStateControls.push(oFilterBarVM);
|
|
68
101
|
}
|
|
102
|
+
if (oController._isMultiMode()) {
|
|
103
|
+
aStateControls.push(oController._getMultiModeControl());
|
|
104
|
+
}
|
|
69
105
|
oController._getControls("table").forEach(function(oTable) {
|
|
70
106
|
var oQuickFilter = oTable.getQuickFilter();
|
|
71
107
|
if (oQuickFilter) {
|
|
@@ -74,13 +110,17 @@ sap.ui.define(
|
|
|
74
110
|
if (bControlVM) {
|
|
75
111
|
aStateControls.push(oTable.getVariant());
|
|
76
112
|
}
|
|
113
|
+
aStateControls.push(oTable);
|
|
77
114
|
});
|
|
78
115
|
|
|
79
116
|
if (oController._hasMultiVisualizations()) {
|
|
80
117
|
aStateControls.push(oController._getSegmentedButton(TemplateContentView.Chart));
|
|
81
118
|
aStateControls.push(oController._getSegmentedButton(TemplateContentView.Table));
|
|
82
119
|
}
|
|
83
|
-
|
|
120
|
+
var oFilterBar = oController._getFilterBarControl();
|
|
121
|
+
if (oFilterBar) {
|
|
122
|
+
aStateControls.push(oFilterBar);
|
|
123
|
+
}
|
|
84
124
|
aStateControls.push(oView.byId("fe::ListReport"));
|
|
85
125
|
},
|
|
86
126
|
retrieveAdditionalStates: function(mAdditionalStates) {
|
|
@@ -103,10 +143,13 @@ sap.ui.define(
|
|
|
103
143
|
|
|
104
144
|
if (oAdditionalStates) {
|
|
105
145
|
// explicit check for boolean values - 'undefined' should not alter the triggered search property
|
|
106
|
-
if (oAdditionalStates.dataLoaded === false) {
|
|
146
|
+
if (oAdditionalStates.dataLoaded === false && oFilterBar) {
|
|
147
|
+
// without this, the data is loaded on navigating back
|
|
107
148
|
oFilterBar._bSearchTriggered = false;
|
|
108
149
|
} else if (oAdditionalStates.dataLoaded === true) {
|
|
109
|
-
|
|
150
|
+
if (oFilterBar) {
|
|
151
|
+
oFilterBar.triggerSearch();
|
|
152
|
+
}
|
|
110
153
|
this._bSearchTriggered = true;
|
|
111
154
|
}
|
|
112
155
|
if (oController._hasMultiVisualizations()) {
|
|
@@ -142,18 +185,20 @@ sap.ui.define(
|
|
|
142
185
|
var bPreventInitialSearch = false;
|
|
143
186
|
var oFilterBarVM = that._getFilterBarVM(oView);
|
|
144
187
|
var oFilterBarControl = oController._getFilterBarControl();
|
|
145
|
-
if (
|
|
146
|
-
(
|
|
147
|
-
oNavigationParameter.
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
188
|
+
if (oFilterBarControl) {
|
|
189
|
+
if (
|
|
190
|
+
(oNavigationParameter.navigationType !== NavType.initial &&
|
|
191
|
+
oNavigationParameter.requiresStandardVariant) ||
|
|
192
|
+
(!oFilterBarVM && oView.getViewData().initialLoad === InitialLoadMode.Enabled) ||
|
|
193
|
+
oController._shouldAutoTriggerSearch(oFilterBarVM)
|
|
194
|
+
) {
|
|
195
|
+
oFilterBarControl.triggerSearch();
|
|
196
|
+
} else {
|
|
197
|
+
bPreventInitialSearch = that._preventInitialSearch(oFilterBarVM);
|
|
198
|
+
}
|
|
199
|
+
that._bSearchTriggered = !bPreventInitialSearch;
|
|
200
|
+
oDynamicPage.setHeaderExpanded(Device.system.desktop || bPreventInitialSearch);
|
|
154
201
|
}
|
|
155
|
-
that._bSearchTriggered = !bPreventInitialSearch;
|
|
156
|
-
oDynamicPage.setHeaderExpanded(Device.system.desktop || bPreventInitialSearch);
|
|
157
202
|
});
|
|
158
203
|
})
|
|
159
204
|
.catch(function() {
|
|
@@ -192,11 +237,13 @@ sap.ui.define(
|
|
|
192
237
|
} else if (oVariantIDs && sVariantManagement === "Control") {
|
|
193
238
|
if (oVariantIDs.sFilterBarVariantId) {
|
|
194
239
|
var oVM = oView.byId(oView.getContent()[0].data("filterBarVariantId"));
|
|
195
|
-
oVM
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
240
|
+
if (oVM) {
|
|
241
|
+
oVM.getVariants().forEach(function(oVariant) {
|
|
242
|
+
if (oVariant.key === oVariantIDs.sFilterBarVariantId) {
|
|
243
|
+
aPromises.push(that._applyControlVariant(oVM, oVariantIDs.sFilterBarVariantId, true));
|
|
244
|
+
}
|
|
245
|
+
});
|
|
246
|
+
}
|
|
200
247
|
}
|
|
201
248
|
if (oVariantIDs.sTableVariantId) {
|
|
202
249
|
var oController = oView.getController(),
|
|
@@ -217,9 +264,12 @@ sap.ui.define(
|
|
|
217
264
|
},
|
|
218
265
|
|
|
219
266
|
_applyControlVariant: function(oVariant, sVariantID, bFilterVariantApplied) {
|
|
267
|
+
var sVariantReference = this._checkIfVariantIdIsAvailable(oVariant, sVariantID)
|
|
268
|
+
? sVariantID
|
|
269
|
+
: oVariant.getStandardVariantKey();
|
|
220
270
|
var oVM = ControlVariantApplyAPI.activateVariant({
|
|
221
271
|
element: oVariant,
|
|
222
|
-
variantReference:
|
|
272
|
+
variantReference: sVariantReference
|
|
223
273
|
});
|
|
224
274
|
return oVM.then(function() {
|
|
225
275
|
return bFilterVariantApplied;
|
|
@@ -253,17 +303,16 @@ sap.ui.define(
|
|
|
253
303
|
},
|
|
254
304
|
|
|
255
305
|
_applySelectionVariant: function(oView, oNavigationParameter, bFilterVariantApplied) {
|
|
256
|
-
var
|
|
306
|
+
var oFilterBar = oView.getController()._getFilterBarControl(),
|
|
307
|
+
oSelectionVariant = oNavigationParameter.selectionVariant,
|
|
257
308
|
oSelectionVariantDefaults = oNavigationParameter.selectionVariantDefaults;
|
|
258
|
-
if (!oSelectionVariant) {
|
|
309
|
+
if (!oFilterBar || !oSelectionVariant) {
|
|
259
310
|
return Promise.resolve();
|
|
260
311
|
}
|
|
261
|
-
|
|
262
312
|
var oConditions = {},
|
|
263
313
|
oMetaModel = oView.getModel().getMetaModel(),
|
|
264
314
|
oViewData = oView.getViewData(),
|
|
265
315
|
sContextPath = oViewData.contextPath || "/" + oViewData.entitySet,
|
|
266
|
-
oFilterBar = oView.byId(oView.getContent()[0].data("filterBarId")),
|
|
267
316
|
aMandatoryFilterFields = CommonUtils.getMandatoryFilterFields(oMetaModel, sContextPath),
|
|
268
317
|
oVariant,
|
|
269
318
|
bRequiresStandardVariant = oNavigationParameter.requiresStandardVariant;
|
|
@@ -304,10 +353,9 @@ sap.ui.define(
|
|
|
304
353
|
} else {
|
|
305
354
|
oPromise = Promise.resolve(true);
|
|
306
355
|
}
|
|
307
|
-
|
|
308
356
|
return oPromise.then(function(bClearFilterAndReplaceWithAppState) {
|
|
309
357
|
if (bClearFilterAndReplaceWithAppState) {
|
|
310
|
-
return that.
|
|
358
|
+
return that._fnApplyConditions(oFilterBar, oConditions);
|
|
311
359
|
}
|
|
312
360
|
});
|
|
313
361
|
},
|
|
@@ -326,9 +374,35 @@ sap.ui.define(
|
|
|
326
374
|
}
|
|
327
375
|
delete oCondition.isEmpty;
|
|
328
376
|
};
|
|
377
|
+
var fnGetPropertyInfo = function(oFilterControl, sEntityTypePath) {
|
|
378
|
+
var sEntitySetPath = ModelHelper.getEntitySetPath(sEntityTypePath),
|
|
379
|
+
oMetaModel = oFilterControl.getModel().getMetaModel(),
|
|
380
|
+
oFR = CommonUtils.getFilterRestrictionsByPath(sEntitySetPath, oMetaModel),
|
|
381
|
+
aNonFilterableProps = oFR[FilterRestrictions.NON_FILTERABLE_PROPERTIES],
|
|
382
|
+
mFilterFields = FilterUtils.getConvertedFilterFields(oFilterControl, sEntityTypePath),
|
|
383
|
+
aPropertyInfo = [];
|
|
384
|
+
Object.keys(mFilterFields).forEach(function(sFilterFieldKey) {
|
|
385
|
+
var oConvertedProperty = mFilterFields[sFilterFieldKey];
|
|
386
|
+
var sPropertyPath = oConvertedProperty.conditionPath.replace(CONDITION_PATH_TO_PROPERTY_PATH_REGEX, "");
|
|
387
|
+
if (aNonFilterableProps.indexOf(sPropertyPath) === -1) {
|
|
388
|
+
var sAnnotationPath = oConvertedProperty.annotationPath;
|
|
389
|
+
var oPropertyContext = oMetaModel.createBindingContext(sAnnotationPath);
|
|
390
|
+
aPropertyInfo.push({
|
|
391
|
+
path: oConvertedProperty.conditionPath,
|
|
392
|
+
hiddenFilter: oConvertedProperty.availability === "Hidden",
|
|
393
|
+
hasValueHelp: !sAnnotationPath
|
|
394
|
+
? false
|
|
395
|
+
: PropertyFormatters.hasValueHelp(oPropertyContext.getObject(), { context: oPropertyContext })
|
|
396
|
+
});
|
|
397
|
+
return;
|
|
398
|
+
}
|
|
399
|
+
});
|
|
400
|
+
return aPropertyInfo;
|
|
401
|
+
};
|
|
329
402
|
return oFilterBar.initialized().then(function() {
|
|
330
|
-
oFilterBar
|
|
331
|
-
|
|
403
|
+
var sEntityTypePath = DelegateUtil.getCustomData(oFilterBar, "entityType");
|
|
404
|
+
var aPropertyInfo = fnGetPropertyInfo(oFilterBar, sEntityTypePath);
|
|
405
|
+
aPropertyInfo
|
|
332
406
|
.filter(function(oPropertyInfo) {
|
|
333
407
|
return oPropertyInfo.path !== "$editState" && oPropertyInfo.path !== "$search";
|
|
334
408
|
})
|
|
@@ -351,9 +425,6 @@ sap.ui.define(
|
|
|
351
425
|
});
|
|
352
426
|
return StateUtil.applyExternalState(oFilterBar, { filter: mFilter, items: aItems });
|
|
353
427
|
});
|
|
354
|
-
},
|
|
355
|
-
_fnClearFilterAndReplaceWithAppState: function(oFilterBar, oConditions) {
|
|
356
|
-
return this._fnApplyConditions(oFilterBar, {}).then(this._fnApplyConditions.bind(this, oFilterBar, oConditions));
|
|
357
428
|
}
|
|
358
429
|
};
|
|
359
430
|
}
|
|
@@ -10,6 +10,14 @@
|
|
|
10
10
|
<template:repeat list="{converterContext>views}" var="view">
|
|
11
11
|
<template:with path="view>primaryVisualization" var="presentationContext">
|
|
12
12
|
<template:repeat list="{presentationContext>visualizations}" var="visualizationDefinition">
|
|
13
|
+
<m:MessageStrip
|
|
14
|
+
text="{= '{path:\'internal>controls/ignoredFields' + (${visualizationDefinition>collection}) + (${visualizationDefinition>type}) + '\', formatter: \'.formatters.setChartMessageStrip\'}'}"
|
|
15
|
+
type="Information"
|
|
16
|
+
showIcon="true"
|
|
17
|
+
showCloseButton="true"
|
|
18
|
+
class="sapUiSmallMargin"
|
|
19
|
+
visible="{= '{= (${internal>controls/ignoredFields' + (${visualizationDefinition>collection}) + (${visualizationDefinition>type}) + '} || []).length>0 && ${pageInternal>alpContentView} !== \'Table\'}' }"
|
|
20
|
+
/>
|
|
13
21
|
<core:Fragment fragmentName="sap.fe.templates.controls.{visualizationDefinition>type}" type="XML" />
|
|
14
22
|
</template:repeat>
|
|
15
23
|
</template:with>
|
|
@@ -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(
|
|
@@ -48,7 +49,7 @@ sap.ui.define(
|
|
|
48
49
|
*/
|
|
49
50
|
getSwitchToActiveVisibility: function(oAnnotations) {
|
|
50
51
|
if (this.checkDraftState(oAnnotations)) {
|
|
51
|
-
return "{= (${ui>/editMode} === 'Editable') && !${ui>createMode} && %{DraftAdministrativeData/DraftIsCreatedByMe} }";
|
|
52
|
+
return "{= (%{DraftAdministrativeData/DraftIsCreatedByMe}) ? ( (${ui>/editMode} === 'Editable') && !${ui>createMode} && %{DraftAdministrativeData/DraftIsCreatedByMe} ) : false }";
|
|
52
53
|
} else {
|
|
53
54
|
return false;
|
|
54
55
|
}
|
|
@@ -62,7 +63,7 @@ sap.ui.define(
|
|
|
62
63
|
*/
|
|
63
64
|
getSwitchToDraftVisibility: function(oAnnotations) {
|
|
64
65
|
if (this.checkDraftState(oAnnotations)) {
|
|
65
|
-
return "{= !(${ui>/editMode} === 'Editable') && !${ui>createMode} &&
|
|
66
|
+
return "{= (%{DraftAdministrativeData/DraftIsCreatedByMe}) ? ( !(${ui>/editMode} === 'Editable') && !${ui>createMode} && ${HasDraftEntity} && %{DraftAdministrativeData/DraftIsCreatedByMe} ) : false }";
|
|
66
67
|
} else {
|
|
67
68
|
return false;
|
|
68
69
|
}
|
|
@@ -465,7 +466,7 @@ sap.ui.define(
|
|
|
465
466
|
" ? true : false) }"
|
|
466
467
|
);
|
|
467
468
|
} else {
|
|
468
|
-
return sSubSectionvisible && sSubSectiontitle !== "undefined" && (sSubSectionshowTitle ? true : false);
|
|
469
|
+
return sSubSectionvisible && sSubSectiontitle !== "undefined" && (sSubSectionshowTitle ? "true" : "false");
|
|
469
470
|
}
|
|
470
471
|
}
|
|
471
472
|
};
|
|
@@ -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
|
[
|
|
@@ -15,6 +16,7 @@ sap.ui.define(
|
|
|
15
16
|
"use strict";
|
|
16
17
|
|
|
17
18
|
var VariantManagement = CoreLibrary.VariantManagement,
|
|
19
|
+
CreationMode = CoreLibrary.CreationMode,
|
|
18
20
|
ObjectPageComponent = TemplateComponent.extend("sap.fe.templates.ObjectPage.Component", {
|
|
19
21
|
metadata: {
|
|
20
22
|
properties: {
|
|
@@ -68,6 +70,12 @@ sap.ui.define(
|
|
|
68
70
|
prepareOnEdit: {
|
|
69
71
|
type: "boolean",
|
|
70
72
|
defaultValue: false
|
|
73
|
+
},
|
|
74
|
+
/**
|
|
75
|
+
* Defines the properties which can be used for inbound Navigation
|
|
76
|
+
*/
|
|
77
|
+
inboundParameters: {
|
|
78
|
+
type: "object"
|
|
71
79
|
}
|
|
72
80
|
},
|
|
73
81
|
library: "sap.fe.templates",
|
|
@@ -80,31 +88,43 @@ sap.ui.define(
|
|
|
80
88
|
|
|
81
89
|
// TODO: this should be ideally be handled by the editflow/routing without the need to have this method in the
|
|
82
90
|
// object page - for now keep it here
|
|
83
|
-
createDeferredContext: function(sPath, bActionCreate) {
|
|
91
|
+
createDeferredContext: function(sPath, oListBinding, bActionCreate) {
|
|
84
92
|
if (!this.DeferredContextCreated) {
|
|
85
93
|
this.DeferredContextCreated = true;
|
|
86
|
-
var
|
|
87
|
-
that = this,
|
|
94
|
+
var that = this,
|
|
88
95
|
oParamters = {
|
|
89
96
|
"$$groupId": "$auto.Heroes",
|
|
90
97
|
"$$updateGroupId": "$auto"
|
|
91
98
|
};
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
99
|
+
if (!oListBinding || oListBinding.isRelative() === false) {
|
|
100
|
+
oListBinding = new ODataListBinding(
|
|
101
|
+
this.getModel(),
|
|
102
|
+
sPath.replace("(...)", ""),
|
|
103
|
+
undefined,
|
|
104
|
+
undefined,
|
|
105
|
+
undefined,
|
|
106
|
+
oParamters
|
|
107
|
+
);
|
|
108
|
+
} else {
|
|
109
|
+
oListBinding.mParameters = oParamters;
|
|
110
|
+
}
|
|
111
|
+
var oStartUpParams =
|
|
112
|
+
this.oAppComponent &&
|
|
113
|
+
this.oAppComponent.getComponentData() &&
|
|
114
|
+
this.oAppComponent.getComponentData().startupParameters,
|
|
115
|
+
oInboundParameters = this.getViewData().inboundParameters,
|
|
116
|
+
createParams;
|
|
117
|
+
if (oStartUpParams && oStartUpParams.preferredMode && oStartUpParams.preferredMode[0].indexOf("create") !== -1) {
|
|
118
|
+
createParams = CommonUtils.getAdditionalParamsForCreate(oStartUpParams, oInboundParameters);
|
|
119
|
+
}
|
|
101
120
|
|
|
102
121
|
// for now wait until the view and the controller is created
|
|
103
122
|
that.getRootControl()
|
|
104
123
|
.getController()
|
|
105
124
|
.editFlow.createDocument(oListBinding, {
|
|
106
|
-
creationMode:
|
|
107
|
-
createAction: bActionCreate
|
|
125
|
+
creationMode: CreationMode.Sync,
|
|
126
|
+
createAction: bActionCreate,
|
|
127
|
+
data: createParams
|
|
108
128
|
})
|
|
109
129
|
.finally(function() {
|
|
110
130
|
that.DeferredContextCreated = false;
|
|
@@ -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/core/CommonUtils", "sap/fe/core/converters/helpers/ID"], function(
|
|
6
7
|
ExtensionAPI,
|
|
@@ -105,6 +106,9 @@ sap.ui.define(["sap/fe/core/ExtensionAPI", "sap/fe/core/CommonUtils", "sap/fe/co
|
|
|
105
106
|
*/
|
|
106
107
|
getSelectedContexts: function(sTableId) {
|
|
107
108
|
var oTable = this._view.byId(sTableId);
|
|
109
|
+
if (oTable && oTable.isA("sap.fe.macros.TableAPI")) {
|
|
110
|
+
oTable = oTable.getContent();
|
|
111
|
+
}
|
|
108
112
|
return (oTable && oTable.isA("sap.ui.mdc.Table") && oTable.getSelectedContexts()) || [];
|
|
109
113
|
},
|
|
110
114
|
|
|
@@ -122,6 +126,18 @@ sap.ui.define(["sap/fe/core/ExtensionAPI", "sap/fe/core/CommonUtils", "sap/fe/co
|
|
|
122
126
|
oBlock = this._view.byId(sBlockID),
|
|
123
127
|
bBlockState = bShow === undefined ? !oBlock.getShowSideContent() : bShow;
|
|
124
128
|
oBlock.setShowSideContent(bBlockState);
|
|
129
|
+
},
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Gets the bound context of the current object page.
|
|
133
|
+
*
|
|
134
|
+
* @alias sap.fe.templates.ObjectPage.ExtensionAPI#getBindingContext
|
|
135
|
+
* @returns {sap.ui.model.odata.v4.Context} Context bound to the object page
|
|
136
|
+
*
|
|
137
|
+
* @public
|
|
138
|
+
*/
|
|
139
|
+
getBindingContext: function() {
|
|
140
|
+
return this._view.getBindingContext();
|
|
125
141
|
}
|
|
126
142
|
});
|
|
127
143
|
|
|
@@ -79,107 +79,85 @@
|
|
|
79
79
|
/>
|
|
80
80
|
</uxap:dependents>
|
|
81
81
|
<template:if test="{converterContext>header/visible}">
|
|
82
|
-
<
|
|
83
|
-
<uxap:
|
|
84
|
-
<uxap:
|
|
82
|
+
<template:with path="converterContext>header" var="header">
|
|
83
|
+
<uxap:headerTitle>
|
|
84
|
+
<uxap:ObjectPageDynamicHeaderTitle primaryArea="Begin">
|
|
85
|
+
<core:Fragment fragmentName="sap.fe.templates.ObjectPage.view.fragments.Heading" type="XML" />
|
|
86
|
+
<uxap:expandedContent>
|
|
85
87
|
<FlexBox>
|
|
86
|
-
<
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
wrapping="true"
|
|
93
|
-
/>
|
|
94
|
-
</template:with>
|
|
95
|
-
</FlexBox>
|
|
96
|
-
</uxap:expandedHeading>
|
|
97
|
-
<uxap:snappedHeading>
|
|
98
|
-
<FlexBox>
|
|
99
|
-
<core:Fragment fragmentName="sap.fe.templates.ObjectPage.view.fragments.HeaderImage" type="XML" />
|
|
100
|
-
<template:with path="entityType>@com.sap.vocabularies.UI.v1.HeaderInfo" var="headerInfo">
|
|
101
|
-
<Title
|
|
102
|
-
text="{= OPTemplating.getExpressionForTitle(${headerInfo>@@UI.getConverterContext}, ${viewData>}, ${fullContextPath>@@UI.getDataModelObjectPath}, ${entitySet>@com.sap.vocabularies.Common.v1.DraftRoot})}"
|
|
103
|
-
wrapping="true"
|
|
104
|
-
/>
|
|
105
|
-
</template:with>
|
|
88
|
+
<template:if test="{entityType>@com.sap.vocabularies.UI.v1.HeaderInfo/Description}">
|
|
89
|
+
<Label
|
|
90
|
+
text="{= OPTemplating.getExpressionForDescription(${headerInfo>@@UI.getConverterContext}, ${fullContextPath>@@UI.getDataModelObjectPath})}"
|
|
91
|
+
wrapping="true"
|
|
92
|
+
/>
|
|
93
|
+
</template:if>
|
|
106
94
|
</FlexBox>
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
id="fe::
|
|
95
|
+
</uxap:expandedContent>
|
|
96
|
+
<uxap:snappedContent>
|
|
97
|
+
<FlexBox>
|
|
98
|
+
<template:if test="{entityType>@com.sap.vocabularies.UI.v1.HeaderInfo/Description}">
|
|
99
|
+
<Label
|
|
100
|
+
text="{= OPTemplating.getExpressionForDescription(${headerInfo>@@UI.getConverterContext}, ${fullContextPath>@@UI.getDataModelObjectPath})}"
|
|
101
|
+
wrapping="true"
|
|
102
|
+
/>
|
|
103
|
+
</template:if>
|
|
104
|
+
</FlexBox>
|
|
105
|
+
</uxap:snappedContent>
|
|
106
|
+
<uxap:content>
|
|
107
|
+
<template:if test="{entitySet>@com.sap.vocabularies.Common.v1.DraftRoot}">
|
|
108
|
+
<macro:DraftIndicator DraftIndicatorType="IconOnly" class="sapUiTinyMarginBegin sapMTB sapMTBNewFlex" entitySet="{entitySet>}" />
|
|
109
|
+
</template:if>
|
|
110
|
+
<internal:SituationsIndicator xmlns:internal="sap.fe.macros.internal" entitySet="{entitySet>}" />
|
|
111
|
+
</uxap:content>
|
|
112
|
+
<uxap:navigationActions>
|
|
113
|
+
<template:if test="{= ${viewData>/viewLevel} > 1}">
|
|
114
|
+
<macro:Paginator id="fe::Paginator" />
|
|
115
|
+
</template:if>
|
|
116
|
+
<!-- Flexible column layout menu-->
|
|
117
|
+
<template:if test="{= ${viewData>/fclEnabled} }">
|
|
118
|
+
<macro:FlexibleColumnLayoutActions />
|
|
119
|
+
</template:if>
|
|
120
|
+
</uxap:navigationActions>
|
|
121
|
+
<uxap:actions>
|
|
122
|
+
<core:Fragment fragmentName="sap.fe.templates.ObjectPage.view.fragments.Actions" type="XML" />
|
|
123
|
+
</uxap:actions>
|
|
124
|
+
<uxap:breadcrumbs>
|
|
125
|
+
<Breadcrumbs
|
|
126
|
+
unittest:id="BreadcrumbsTest"
|
|
127
|
+
visible="{= OP.getVisibleExpressionForBreadcrumbs(${viewData>/}) }"
|
|
128
|
+
modelContextChange="._setBreadcrumbLinks(${$source>/})"
|
|
129
|
+
id="fe::Breadcrumbs"
|
|
130
|
+
>
|
|
131
|
+
</Breadcrumbs>
|
|
132
|
+
</uxap:breadcrumbs>
|
|
133
|
+
</uxap:ObjectPageDynamicHeaderTitle>
|
|
134
|
+
</uxap:headerTitle>
|
|
135
|
+
<template:if test="{header>hasContent}">
|
|
136
|
+
<uxap:headerContent>
|
|
137
|
+
<FlexBox
|
|
138
|
+
id="fe::HeaderContentContainer"
|
|
139
|
+
unittest:id="FlexBoxTest"
|
|
140
|
+
dt:designtime="sap/fe/templates/ObjectPage/designtime/FlexBox.designtime"
|
|
141
|
+
wrap="Wrap"
|
|
142
|
+
fitContainer="true"
|
|
143
|
+
alignItems="Stretch"
|
|
151
144
|
>
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
</uxap:ObjectPageDynamicHeaderTitle>
|
|
155
|
-
</uxap:headerTitle>
|
|
156
|
-
<template:if test="{converterContext>header/hasContent}">
|
|
157
|
-
<uxap:headerContent>
|
|
158
|
-
<FlexBox
|
|
159
|
-
id="fe::HeaderContentContainer"
|
|
160
|
-
unittest:id="FlexBoxTest"
|
|
161
|
-
dt:designtime="sap/fe/templates/ObjectPage/designtime/FlexBox.designtime"
|
|
162
|
-
wrap="Wrap"
|
|
163
|
-
fitContainer="true"
|
|
164
|
-
alignItems="Stretch"
|
|
165
|
-
>
|
|
166
|
-
<template:if test="{converterContext>header/avatar}">
|
|
167
|
-
<template:with path="converterContext>header/avatar" var="avatar">
|
|
168
|
-
<Avatar
|
|
145
|
+
<template:if test="{header>avatar}">
|
|
146
|
+
<Avatar
|
|
169
147
|
unittest:id="AvatarOPHeaderContent"
|
|
170
148
|
class="sapUiSmallMarginEnd sapUiSmallMarginBottom"
|
|
171
|
-
src="{avatar
|
|
172
|
-
initials="{avatar
|
|
173
|
-
fallbackIcon="{avatar
|
|
174
|
-
displayShape="{avatar
|
|
149
|
+
src="{header>avatar/src}"
|
|
150
|
+
initials="{header>avatar/initials}"
|
|
151
|
+
fallbackIcon="{header>avatar/fallbackIcon}"
|
|
152
|
+
displayShape="{header>avatar/displayShape}"
|
|
175
153
|
displaySize="XL"
|
|
176
154
|
/>
|
|
177
|
-
</template:
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
</
|
|
181
|
-
</
|
|
182
|
-
</template:
|
|
155
|
+
</template:if>
|
|
156
|
+
<core:Fragment fragmentName="sap.fe.templates.ObjectPage.view.fragments.HeaderContent" type="XML" />
|
|
157
|
+
</FlexBox>
|
|
158
|
+
</uxap:headerContent>
|
|
159
|
+
</template:if>
|
|
160
|
+
</template:with>
|
|
183
161
|
</template:if>
|
|
184
162
|
<uxap:sections>
|
|
185
163
|
<core:Fragment fragmentName="sap.fe.templates.ObjectPage.view.fragments.Section" type="XML" />
|