@sapui5/sap.fe.templates 1.98.0 → 1.99.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +5 -3
- package/src/sap/fe/templates/.library +1 -1
- package/src/sap/fe/templates/AnalyticalListPage/Component.js +3 -2
- package/src/sap/fe/templates/AnalyticalListPage/chart/FEChartDelegate.js +3 -2
- package/src/sap/fe/templates/ListComponent.js +3 -2
- package/src/sap/fe/templates/ListReport/Component.js +11 -2
- package/src/sap/fe/templates/ListReport/ExtensionAPI.js +11 -5
- package/src/sap/fe/templates/ListReport/ListReport.view.xml +11 -6
- package/src/sap/fe/templates/ListReport/ListReportController.controller.js +117 -31
- package/src/sap/fe/templates/ListReport/overrides/IntentBasedNavigation.js +13 -12
- package/src/sap/fe/templates/ListReport/overrides/Share.js +10 -8
- package/src/sap/fe/templates/ListReport/overrides/ViewState.js +78 -55
- package/src/sap/fe/templates/ListReport/view/fragments/CollectionVisualization.fragment.xml +8 -0
- package/src/sap/fe/templates/ObjectPage/AnnotationHelper.js +6 -5
- package/src/sap/fe/templates/ObjectPage/Component.js +4 -3
- package/src/sap/fe/templates/ObjectPage/ExtensionAPI.js +3 -2
- package/src/sap/fe/templates/ObjectPage/ObjectPage.view.xml +8 -45
- package/src/sap/fe/templates/ObjectPage/ObjectPageController.controller.js +20 -69
- package/src/sap/fe/templates/ObjectPage/controls/StashableHBox.js +3 -2
- package/src/sap/fe/templates/ObjectPage/controls/StashableVBox.js +3 -2
- package/src/sap/fe/templates/ObjectPage/controls/SubSectionBlock.js +3 -2
- package/src/sap/fe/templates/ObjectPage/designtime/FlexBox.designtime.js +3 -2
- package/src/sap/fe/templates/ObjectPage/designtime/StashableHBox.designtime.js +3 -2
- package/src/sap/fe/templates/ObjectPage/designtime/StashableVBox.designtime.js +3 -2
- package/src/sap/fe/templates/ObjectPage/flexibility/StashableHBox.flexibility.js +3 -2
- package/src/sap/fe/templates/ObjectPage/flexibility/StashableVBox.flexibility.js +3 -2
- package/src/sap/fe/templates/ObjectPage/overrides/IntentBasedNavigation.js +3 -2
- package/src/sap/fe/templates/ObjectPage/overrides/InternalRouting.js +3 -2
- package/src/sap/fe/templates/ObjectPage/overrides/MessageHandler.js +3 -2
- package/src/sap/fe/templates/ObjectPage/overrides/Paginator.js +3 -2
- package/src/sap/fe/templates/ObjectPage/overrides/Share.js +3 -2
- package/src/sap/fe/templates/ObjectPage/overrides/ViewState.js +3 -2
- package/src/sap/fe/templates/ObjectPage/templating/ObjectPageTemplating.js +1 -1
- package/src/sap/fe/templates/ObjectPage/templating/ObjectPageTemplating.ts +2 -2
- package/src/sap/fe/templates/ObjectPage/view/fragments/FooterContent.fragment.xml +5 -1
- package/src/sap/fe/templates/ObjectPage/view/fragments/Heading.fragment.xml +33 -0
- package/src/sap/fe/templates/ObjectPage/view/fragments/HeadingAvatar.fragment.xml +17 -0
- package/src/sap/fe/templates/ObjectPage/view/fragments/HeadingTitle.fragment.xml +18 -0
- package/src/sap/fe/templates/ObjectPage/view/fragments/SectionFormContent.fragment.xml +3 -3
- package/src/sap/fe/templates/ObjectPage/view/fragments/SectionMoreFormContent.fragment.xml +3 -3
- package/src/sap/fe/templates/RootContainer/controller/Fcl.controller.js +3 -2
- package/src/sap/fe/templates/RootContainer/controller/NavContainer.controller.js +3 -2
- package/src/sap/fe/templates/RootContainer/controller/RootContainerBaseController.js +3 -2
- package/src/sap/fe/templates/RootContainer/overrides/EditFlow.js +3 -2
- package/src/sap/fe/templates/TableScroller.js +3 -2
- package/src/sap/fe/templates/library.js +4 -3
- package/src/sap/fe/templates/messagebundle.properties +14 -30
- package/src/sap/fe/templates/messagebundle_ar.properties +24 -6
- package/src/sap/fe/templates/messagebundle_bg.properties +24 -6
- package/src/sap/fe/templates/messagebundle_ca.properties +24 -6
- package/src/sap/fe/templates/messagebundle_cs.properties +24 -6
- package/src/sap/fe/templates/messagebundle_cy.properties +24 -6
- package/src/sap/fe/templates/messagebundle_da.properties +24 -6
- package/src/sap/fe/templates/messagebundle_de.properties +24 -6
- package/src/sap/fe/templates/messagebundle_el.properties +25 -7
- package/src/sap/fe/templates/messagebundle_en.properties +24 -6
- package/src/sap/fe/templates/messagebundle_en_GB.properties +24 -6
- package/src/sap/fe/templates/messagebundle_en_US_sappsd.properties +24 -6
- package/src/sap/fe/templates/messagebundle_en_US_saprigi.properties +24 -6
- package/src/sap/fe/templates/messagebundle_en_US_saptrc.properties +24 -6
- package/src/sap/fe/templates/messagebundle_es.properties +24 -6
- package/src/sap/fe/templates/messagebundle_es_MX.properties +24 -6
- package/src/sap/fe/templates/messagebundle_et.properties +24 -6
- package/src/sap/fe/templates/messagebundle_fi.properties +24 -6
- package/src/sap/fe/templates/messagebundle_fr.properties +24 -6
- package/src/sap/fe/templates/messagebundle_fr_CA.properties +24 -6
- package/src/sap/fe/templates/messagebundle_hi.properties +24 -6
- package/src/sap/fe/templates/messagebundle_hr.properties +25 -7
- package/src/sap/fe/templates/messagebundle_hu.properties +24 -6
- package/src/sap/fe/templates/messagebundle_id.properties +26 -8
- package/src/sap/fe/templates/messagebundle_it.properties +24 -6
- package/src/sap/fe/templates/messagebundle_iw.properties +24 -6
- package/src/sap/fe/templates/messagebundle_ja.properties +24 -6
- package/src/sap/fe/templates/messagebundle_kk.properties +24 -6
- package/src/sap/fe/templates/messagebundle_ko.properties +24 -6
- package/src/sap/fe/templates/messagebundle_lt.properties +24 -6
- package/src/sap/fe/templates/messagebundle_lv.properties +24 -6
- package/src/sap/fe/templates/messagebundle_ms.properties +24 -6
- package/src/sap/fe/templates/messagebundle_nl.properties +24 -6
- package/src/sap/fe/templates/messagebundle_no.properties +24 -6
- package/src/sap/fe/templates/messagebundle_pl.properties +24 -6
- package/src/sap/fe/templates/messagebundle_pt.properties +27 -9
- package/src/sap/fe/templates/messagebundle_pt_PT.properties +25 -7
- package/src/sap/fe/templates/messagebundle_ro.properties +24 -6
- package/src/sap/fe/templates/messagebundle_ru.properties +24 -6
- package/src/sap/fe/templates/messagebundle_sh.properties +24 -6
- package/src/sap/fe/templates/messagebundle_sk.properties +24 -6
- package/src/sap/fe/templates/messagebundle_sl.properties +24 -6
- package/src/sap/fe/templates/messagebundle_sv.properties +25 -7
- package/src/sap/fe/templates/messagebundle_th.properties +24 -6
- package/src/sap/fe/templates/messagebundle_tr.properties +24 -6
- package/src/sap/fe/templates/messagebundle_uk.properties +25 -7
- package/src/sap/fe/templates/messagebundle_vi.properties +24 -6
- package/src/sap/fe/templates/messagebundle_zh_CN.properties +24 -6
- package/src/sap/fe/templates/messagebundle_zh_TW.properties +24 -6
- package/ui5.yaml +0 -3
- package/src/sap/fe/templates/ListReport/overrides/MassEdit.js +0 -95
|
@@ -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
|
[
|
|
@@ -52,19 +53,33 @@ sap.ui.define(
|
|
|
52
53
|
oController = oView.getController(),
|
|
53
54
|
oFilterBar = oController._getFilterBarControl(),
|
|
54
55
|
aTables = oController._getControls("table");
|
|
55
|
-
|
|
56
|
-
|
|
56
|
+
if (oFilterBar) {
|
|
57
|
+
oFilterBar.setSuspendSelection(true);
|
|
58
|
+
aPromises.push(oFilterBar.initialized());
|
|
59
|
+
}
|
|
57
60
|
aTables.forEach(function(oTable) {
|
|
58
61
|
aPromises.push(oTable.initialized());
|
|
59
62
|
});
|
|
60
|
-
aPromises.push(oFilterBar.initialized());
|
|
61
63
|
|
|
62
64
|
delete this._bSearchTriggered;
|
|
63
65
|
},
|
|
64
66
|
onAfterStateApplied: function() {
|
|
65
|
-
var
|
|
66
|
-
|
|
67
|
-
|
|
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
|
+
}
|
|
68
83
|
},
|
|
69
84
|
adaptBindingRefreshControls: function(aControls) {
|
|
70
85
|
var oView = this.getView(),
|
|
@@ -80,14 +95,13 @@ sap.ui.define(
|
|
|
80
95
|
oViewData = oView.getViewData(),
|
|
81
96
|
bControlVM = oViewData.variantManagement === VariantManagement.Control;
|
|
82
97
|
|
|
83
|
-
if (oController._isMultiMode()) {
|
|
84
|
-
aStateControls.push(oController._getMultiModeControl());
|
|
85
|
-
}
|
|
86
|
-
|
|
87
98
|
var oFilterBarVM = this._getFilterBarVM(oView);
|
|
88
99
|
if (oFilterBarVM) {
|
|
89
100
|
aStateControls.push(oFilterBarVM);
|
|
90
101
|
}
|
|
102
|
+
if (oController._isMultiMode()) {
|
|
103
|
+
aStateControls.push(oController._getMultiModeControl());
|
|
104
|
+
}
|
|
91
105
|
oController._getControls("table").forEach(function(oTable) {
|
|
92
106
|
var oQuickFilter = oTable.getQuickFilter();
|
|
93
107
|
if (oQuickFilter) {
|
|
@@ -103,7 +117,10 @@ sap.ui.define(
|
|
|
103
117
|
aStateControls.push(oController._getSegmentedButton(TemplateContentView.Chart));
|
|
104
118
|
aStateControls.push(oController._getSegmentedButton(TemplateContentView.Table));
|
|
105
119
|
}
|
|
106
|
-
|
|
120
|
+
var oFilterBar = oController._getFilterBarControl();
|
|
121
|
+
if (oFilterBar) {
|
|
122
|
+
aStateControls.push(oFilterBar);
|
|
123
|
+
}
|
|
107
124
|
aStateControls.push(oView.byId("fe::ListReport"));
|
|
108
125
|
},
|
|
109
126
|
retrieveAdditionalStates: function(mAdditionalStates) {
|
|
@@ -126,10 +143,13 @@ sap.ui.define(
|
|
|
126
143
|
|
|
127
144
|
if (oAdditionalStates) {
|
|
128
145
|
// explicit check for boolean values - 'undefined' should not alter the triggered search property
|
|
129
|
-
if (oAdditionalStates.dataLoaded === false) {
|
|
146
|
+
if (oAdditionalStates.dataLoaded === false && oFilterBar) {
|
|
147
|
+
// without this, the data is loaded on navigating back
|
|
130
148
|
oFilterBar._bSearchTriggered = false;
|
|
131
149
|
} else if (oAdditionalStates.dataLoaded === true) {
|
|
132
|
-
|
|
150
|
+
if (oFilterBar) {
|
|
151
|
+
oFilterBar.triggerSearch();
|
|
152
|
+
}
|
|
133
153
|
this._bSearchTriggered = true;
|
|
134
154
|
}
|
|
135
155
|
if (oController._hasMultiVisualizations()) {
|
|
@@ -147,42 +167,44 @@ sap.ui.define(
|
|
|
147
167
|
var oView = this.getView(),
|
|
148
168
|
that = this,
|
|
149
169
|
oController = oView.getController(),
|
|
150
|
-
|
|
151
|
-
oAppComponent = sap.ui.core.Component.getOwnerComponentFor(oComponent),
|
|
170
|
+
oAppComponent = oController.getAppComponent(oView),
|
|
152
171
|
oComponentData = oAppComponent.getComponentData(),
|
|
153
172
|
oStartupParameters = (oComponentData && oComponentData.startupParameters) || {},
|
|
154
173
|
oVariantPromise = that.handleVariantIdPassedViaURLParams(oStartupParameters),
|
|
155
174
|
bFilterVariantApplied;
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
if (aVariants
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
var oRes = that._applySelectionVariant(oView, oNavigationParameter, bFilterVariantApplied).then(function() {
|
|
164
|
-
var oController = oView.getController();
|
|
165
|
-
var oDynamicPage = oView.byId("fe::ListReport");
|
|
166
|
-
var bPreventInitialSearch = false;
|
|
167
|
-
var oFilterBarVM = that._getFilterBarVM(oView);
|
|
168
|
-
var oFilterBarControl = oController._getFilterBarControl();
|
|
169
|
-
if (
|
|
170
|
-
(oNavigationParameter.navigationType !== NavType.initial && oNavigationParameter.requiresStandardVariant) ||
|
|
171
|
-
(!oFilterBarVM && oView.getViewData().initialLoad === InitialLoadMode.Enabled) ||
|
|
172
|
-
oController._shouldAutoTriggerSearch(oFilterBarVM)
|
|
173
|
-
) {
|
|
174
|
-
oFilterBarControl.triggerSearch();
|
|
175
|
-
} else {
|
|
176
|
-
bPreventInitialSearch = that._preventInitialSearch(oFilterBarVM);
|
|
175
|
+
aResults.push(
|
|
176
|
+
oVariantPromise
|
|
177
|
+
.then(function(aVariants) {
|
|
178
|
+
if (aVariants && aVariants.length > 0) {
|
|
179
|
+
if (aVariants[0] === true || aVariants[1] === true) {
|
|
180
|
+
bFilterVariantApplied = true;
|
|
181
|
+
}
|
|
177
182
|
}
|
|
178
|
-
that.
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
183
|
+
return that._applySelectionVariant(oView, oNavigationParameter, bFilterVariantApplied).then(function() {
|
|
184
|
+
var oDynamicPage = oView.byId("fe::ListReport");
|
|
185
|
+
var bPreventInitialSearch = false;
|
|
186
|
+
var oFilterBarVM = that._getFilterBarVM(oView);
|
|
187
|
+
var oFilterBarControl = oController._getFilterBarControl();
|
|
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);
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
})
|
|
204
|
+
.catch(function() {
|
|
205
|
+
Log.error("Variant ID cannot be applied");
|
|
206
|
+
})
|
|
207
|
+
);
|
|
186
208
|
},
|
|
187
209
|
|
|
188
210
|
handleVariantIdPassedViaURLParams: function(oUrlParams) {
|
|
@@ -215,11 +237,13 @@ sap.ui.define(
|
|
|
215
237
|
} else if (oVariantIDs && sVariantManagement === "Control") {
|
|
216
238
|
if (oVariantIDs.sFilterBarVariantId) {
|
|
217
239
|
var oVM = oView.byId(oView.getContent()[0].data("filterBarVariantId"));
|
|
218
|
-
oVM
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
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
|
+
}
|
|
223
247
|
}
|
|
224
248
|
if (oVariantIDs.sTableVariantId) {
|
|
225
249
|
var oController = oView.getController(),
|
|
@@ -279,17 +303,16 @@ sap.ui.define(
|
|
|
279
303
|
},
|
|
280
304
|
|
|
281
305
|
_applySelectionVariant: function(oView, oNavigationParameter, bFilterVariantApplied) {
|
|
282
|
-
var
|
|
306
|
+
var oFilterBar = oView.getController()._getFilterBarControl(),
|
|
307
|
+
oSelectionVariant = oNavigationParameter.selectionVariant,
|
|
283
308
|
oSelectionVariantDefaults = oNavigationParameter.selectionVariantDefaults;
|
|
284
|
-
if (!oSelectionVariant) {
|
|
309
|
+
if (!oFilterBar || !oSelectionVariant) {
|
|
285
310
|
return Promise.resolve();
|
|
286
311
|
}
|
|
287
|
-
|
|
288
312
|
var oConditions = {},
|
|
289
313
|
oMetaModel = oView.getModel().getMetaModel(),
|
|
290
314
|
oViewData = oView.getViewData(),
|
|
291
315
|
sContextPath = oViewData.contextPath || "/" + oViewData.entitySet,
|
|
292
|
-
oFilterBar = oView.byId(oView.getContent()[0].data("filterBarId")),
|
|
293
316
|
aMandatoryFilterFields = CommonUtils.getMandatoryFilterFields(oMetaModel, sContextPath),
|
|
294
317
|
oVariant,
|
|
295
318
|
bRequiresStandardVariant = oNavigationParameter.requiresStandardVariant;
|
|
@@ -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
|
[
|
|
@@ -113,7 +114,7 @@ sap.ui.define(
|
|
|
113
114
|
this.oAppComponent.getComponentData().startupParameters,
|
|
114
115
|
oInboundParameters = this.getViewData().inboundParameters,
|
|
115
116
|
createParams;
|
|
116
|
-
if (oStartUpParams.preferredMode && oStartUpParams.preferredMode[0].indexOf("create") !== -1) {
|
|
117
|
+
if (oStartUpParams && oStartUpParams.preferredMode && oStartUpParams.preferredMode[0].indexOf("create") !== -1) {
|
|
117
118
|
createParams = CommonUtils.getAdditionalParamsForCreate(oStartUpParams, oInboundParameters);
|
|
118
119
|
}
|
|
119
120
|
|
|
@@ -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,
|
|
@@ -79,47 +79,10 @@
|
|
|
79
79
|
/>
|
|
80
80
|
</uxap:dependents>
|
|
81
81
|
<template:if test="{converterContext>header/visible}">
|
|
82
|
-
<template:with path="converterContext>header
|
|
82
|
+
<template:with path="converterContext>header" var="header">
|
|
83
83
|
<uxap:headerTitle>
|
|
84
84
|
<uxap:ObjectPageDynamicHeaderTitle primaryArea="Begin">
|
|
85
|
-
<
|
|
86
|
-
<FlexBox>
|
|
87
|
-
<FlexBox visible="{converterContext>header/title/expandedImageVisible}">
|
|
88
|
-
<Avatar
|
|
89
|
-
class="sapUiSmallMarginEnd"
|
|
90
|
-
src="{avatar>src}"
|
|
91
|
-
initials="{avatar>initials}"
|
|
92
|
-
fallbackIcon="{avatar>fallbackIcon}"
|
|
93
|
-
displayShape="{avatar>displayShape}"
|
|
94
|
-
displaySize="S"
|
|
95
|
-
/>
|
|
96
|
-
</FlexBox>
|
|
97
|
-
<template:with path="entityType>@com.sap.vocabularies.UI.v1.HeaderInfo" var="headerInfo">
|
|
98
|
-
<Title
|
|
99
|
-
text="{= OPTemplating.getExpressionForTitle(${headerInfo>@@UI.getConverterContext}, ${viewData>}, ${fullContextPath>@@UI.getDataModelObjectPath}, ${entitySet>@com.sap.vocabularies.Common.v1.DraftRoot})}"
|
|
100
|
-
wrapping="true"
|
|
101
|
-
/>
|
|
102
|
-
</template:with>
|
|
103
|
-
</FlexBox>
|
|
104
|
-
</uxap:expandedHeading>
|
|
105
|
-
<uxap:snappedHeading>
|
|
106
|
-
<FlexBox>
|
|
107
|
-
<Avatar
|
|
108
|
-
class="sapUiSmallMarginEnd"
|
|
109
|
-
src="{avatar>src}"
|
|
110
|
-
initials="{avatar>initials}"
|
|
111
|
-
fallbackIcon="{avatar>fallbackIcon}"
|
|
112
|
-
displayShape="{avatar>displayShape}"
|
|
113
|
-
displaySize="S"
|
|
114
|
-
/>
|
|
115
|
-
<template:with path="entityType>@com.sap.vocabularies.UI.v1.HeaderInfo" var="headerInfo">
|
|
116
|
-
<Title
|
|
117
|
-
text="{= OPTemplating.getExpressionForTitle(${headerInfo>@@UI.getConverterContext}, ${viewData>}, ${fullContextPath>@@UI.getDataModelObjectPath}, ${entitySet>@com.sap.vocabularies.Common.v1.DraftRoot})}"
|
|
118
|
-
wrapping="true"
|
|
119
|
-
/>
|
|
120
|
-
</template:with>
|
|
121
|
-
</FlexBox>
|
|
122
|
-
</uxap:snappedHeading>
|
|
85
|
+
<core:Fragment fragmentName="sap.fe.templates.ObjectPage.view.fragments.Heading" type="XML" />
|
|
123
86
|
<uxap:expandedContent>
|
|
124
87
|
<FlexBox>
|
|
125
88
|
<template:if test="{entityType>@com.sap.vocabularies.UI.v1.HeaderInfo/Description}">
|
|
@@ -169,7 +132,7 @@
|
|
|
169
132
|
</uxap:breadcrumbs>
|
|
170
133
|
</uxap:ObjectPageDynamicHeaderTitle>
|
|
171
134
|
</uxap:headerTitle>
|
|
172
|
-
<template:if test="{
|
|
135
|
+
<template:if test="{header>hasContent}">
|
|
173
136
|
<uxap:headerContent>
|
|
174
137
|
<FlexBox
|
|
175
138
|
id="fe::HeaderContentContainer"
|
|
@@ -179,14 +142,14 @@
|
|
|
179
142
|
fitContainer="true"
|
|
180
143
|
alignItems="Stretch"
|
|
181
144
|
>
|
|
182
|
-
<template:if test="{
|
|
145
|
+
<template:if test="{header>avatar}">
|
|
183
146
|
<Avatar
|
|
184
147
|
unittest:id="AvatarOPHeaderContent"
|
|
185
148
|
class="sapUiSmallMarginEnd sapUiSmallMarginBottom"
|
|
186
|
-
src="{avatar
|
|
187
|
-
initials="{avatar
|
|
188
|
-
fallbackIcon="{avatar
|
|
189
|
-
displayShape="{avatar
|
|
149
|
+
src="{header>avatar/src}"
|
|
150
|
+
initials="{header>avatar/initials}"
|
|
151
|
+
fallbackIcon="{header>avatar/fallbackIcon}"
|
|
152
|
+
displayShape="{header>avatar/displayShape}"
|
|
190
153
|
displaySize="XL"
|
|
191
154
|
/>
|
|
192
155
|
</template:if>
|
|
@@ -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
|
[
|
|
@@ -359,7 +360,9 @@ sap.ui.define(
|
|
|
359
360
|
for (var formElement = 0; formElement < aFormElements.length; formElement++) {
|
|
360
361
|
var aFields = aFormElements[formElement].getFields();
|
|
361
362
|
|
|
362
|
-
|
|
363
|
+
// The first field is not necessarily an InputBase (e.g. could be a Text)
|
|
364
|
+
// So we need to check whether it has a getRequired method
|
|
365
|
+
if (aFields[0].getRequired && aFields[0].getRequired() && !aFields[0].getValue()) {
|
|
363
366
|
return aFields[0];
|
|
364
367
|
}
|
|
365
368
|
}
|
|
@@ -421,8 +424,7 @@ sap.ui.define(
|
|
|
421
424
|
_onAfterBinding: function(oBindingContext, mParameters) {
|
|
422
425
|
var oObjectPage = this.byId("fe::ObjectPage"),
|
|
423
426
|
that = this,
|
|
424
|
-
aTables = this._findTables()
|
|
425
|
-
aFormContainers = this._findFormContainers();
|
|
427
|
+
aTables = this._findTables();
|
|
426
428
|
|
|
427
429
|
this._sideEffects.clearPropertiesStatus();
|
|
428
430
|
|
|
@@ -443,25 +445,6 @@ sap.ui.define(
|
|
|
443
445
|
// 2. Another problem is, that FormContainers assigned to a 'MoreBlock' does not have an
|
|
444
446
|
// internal model context at all.
|
|
445
447
|
|
|
446
|
-
aFormContainers.forEach(function(oFormContainer) {
|
|
447
|
-
var oInternalModelContext,
|
|
448
|
-
oInternalModel = oObjectPage.getModel("internal"),
|
|
449
|
-
sPageContextPath = "/pages/" + that.getView().getId(),
|
|
450
|
-
sFormContainerContextPath = "controls/" + that.getView().getLocalId(oFormContainer.getId()),
|
|
451
|
-
SHOW_DETAILS = "showDetails";
|
|
452
|
-
if (oFormContainer.getModel("internal") === undefined) {
|
|
453
|
-
oFormContainer.setModel(oInternalModel, "internal");
|
|
454
|
-
oFormContainer.setBindingContext(
|
|
455
|
-
oInternalModel.createBindingContext(sPageContextPath + "/" + sFormContainerContextPath),
|
|
456
|
-
"internal"
|
|
457
|
-
);
|
|
458
|
-
oFormContainer.bindElement({ path: "", model: "internal" });
|
|
459
|
-
} else {
|
|
460
|
-
oFormContainer.bindElement({ path: sFormContainerContextPath, model: "internal" });
|
|
461
|
-
}
|
|
462
|
-
oInternalModelContext = oFormContainer.getBindingContext("internal");
|
|
463
|
-
oInternalModelContext.setProperty(SHOW_DETAILS, false);
|
|
464
|
-
});
|
|
465
448
|
aTables.forEach(function(oTable) {
|
|
466
449
|
var oInternalModelContext = oTable.getBindingContext("internal");
|
|
467
450
|
oInternalModelContext.setProperty("creationRowFieldValidity", {});
|
|
@@ -822,20 +805,19 @@ sap.ui.define(
|
|
|
822
805
|
);
|
|
823
806
|
}
|
|
824
807
|
});
|
|
825
|
-
return Promise.all(aWaitCreateDocuments)
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
.saveDocument(oContext, mParameters)
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
});
|
|
808
|
+
return Promise.all(aWaitCreateDocuments)
|
|
809
|
+
.then(function(aBindings) {
|
|
810
|
+
var mParameters = {
|
|
811
|
+
bExecuteSideEffectsOnError: bExecuteSideEffectsOnError,
|
|
812
|
+
bindings: aBindings
|
|
813
|
+
};
|
|
814
|
+
return that.editFlow.saveDocument(oContext, mParameters).catch(that._showMessagePopover.bind(that));
|
|
815
|
+
})
|
|
816
|
+
.finally(function() {
|
|
817
|
+
if (BusyLocker.isLocked(oModel)) {
|
|
818
|
+
BusyLocker.unlock(oModel);
|
|
819
|
+
}
|
|
820
|
+
});
|
|
839
821
|
},
|
|
840
822
|
|
|
841
823
|
_cancelDocument: function(oContext, mParameters) {
|
|
@@ -916,37 +898,6 @@ sap.ui.define(
|
|
|
916
898
|
return aBlocks;
|
|
917
899
|
},
|
|
918
900
|
|
|
919
|
-
_findFormContainers: function() {
|
|
920
|
-
var aSubSections = this._getAllSubSections(),
|
|
921
|
-
aFormContainers = [];
|
|
922
|
-
|
|
923
|
-
function _collectFormContainersInBlocks(aBlocks) {
|
|
924
|
-
for (var i = 0; i < aBlocks.length; i++) {
|
|
925
|
-
var oElement = aBlocks[i].getContent instanceof Function && aBlocks[i].getContent();
|
|
926
|
-
if (oElement && oElement.isA && oElement.isA("sap.ui.layout.DynamicSideContent")) {
|
|
927
|
-
oElement = oElement.getMainContent instanceof Function && oElement.getMainContent();
|
|
928
|
-
if (oElement && oElement.length > 0) {
|
|
929
|
-
oElement = oElement[0];
|
|
930
|
-
}
|
|
931
|
-
}
|
|
932
|
-
if (
|
|
933
|
-
oElement &&
|
|
934
|
-
oElement.isA &&
|
|
935
|
-
oElement.isA("sap.ui.layout.form.Form") &&
|
|
936
|
-
oElement.getFormContainers instanceof Function
|
|
937
|
-
) {
|
|
938
|
-
aFormContainers = aFormContainers.concat(oElement.getFormContainers());
|
|
939
|
-
}
|
|
940
|
-
}
|
|
941
|
-
}
|
|
942
|
-
|
|
943
|
-
for (var i = 0; i < aSubSections.length; i++) {
|
|
944
|
-
_collectFormContainersInBlocks(aSubSections[i].getBlocks());
|
|
945
|
-
_collectFormContainersInBlocks(aSubSections[i].getMoreBlocks());
|
|
946
|
-
}
|
|
947
|
-
return aFormContainers;
|
|
948
|
-
},
|
|
949
|
-
|
|
950
901
|
//TODO: This is needed for two workarounds - to be removed again
|
|
951
902
|
_findTables: function() {
|
|
952
903
|
var aSubSections = this._getAllSubSections(),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* SAPUI5
|
|
3
|
-
|
|
2
|
+
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
3
|
+
(c) Copyright 2009-2021 SAP SE. All rights reserved
|
|
4
|
+
|
|
4
5
|
*/
|
|
5
6
|
sap.ui.define(
|
|
6
7
|
["sap/m/HBox", "sap/m/HBoxRenderer", "sap/ui/core/StashedControlSupport"],
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* SAPUI5
|
|
3
|
-
|
|
2
|
+
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
3
|
+
(c) Copyright 2009-2021 SAP SE. All rights reserved
|
|
4
|
+
|
|
4
5
|
*/
|
|
5
6
|
sap.ui.define(
|
|
6
7
|
["sap/m/VBox", "sap/m/VBoxRenderer", "sap/ui/core/StashedControlSupport"],
|
|
@@ -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
|
// Provides the Design Time Metadata for the sap.m.FlexBox control
|
|
6
7
|
sap.ui.define([], function() {
|
|
@@ -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
|
// Provides the Design Time Metadata for the sap.fe.templates.ObjectPage.controls.StashableHBox control
|
|
@@ -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
|
// Provides the Design Time Metadata for the sap.fe.templates.ObjectPage.controls.StashableVBox control
|
|
@@ -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/CommonUtils", "sap/fe/navigation/SelectionVariant"], function(CommonUtils, SelectionVariant) {
|
|
6
7
|
"use strict";
|
|
@@ -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/CommonUtils", "sap/fe/navigation/SelectionVariant"], function(CommonUtils, SelectionVariant) {
|
|
6
7
|
"use strict";
|
|
@@ -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/library", "sap/fe/core/helpers/KeepAliveHelper"], function(CoreLibrary, KeepAliveHelper) {
|
|
6
7
|
"use strict";
|