@sapui5/sap.fe.core 1.93.3 → 1.96.2
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 +2 -2
- package/src/sap/fe/core/.library +1 -1
- package/src/sap/fe/core/AppComponent.js +9 -40
- package/src/sap/fe/core/BusyLocker.js +12 -0
- package/src/sap/fe/core/CommonUtils.js +430 -27
- package/src/sap/fe/core/ExtensionAPI.js +1 -1
- package/src/sap/fe/core/PageController.js +13 -2
- package/src/sap/fe/core/TemplateComponent.js +6 -0
- package/src/sap/fe/core/TransactionHelper.js +248 -170
- package/src/sap/fe/core/actions/draft.js +13 -1
- package/src/sap/fe/core/actions/operations.js +165 -45
- package/src/sap/fe/core/controllerextensions/EditFlow.js +56 -37
- package/src/sap/fe/core/controllerextensions/InternalEditFlow.js +13 -6
- package/src/sap/fe/core/controllerextensions/InternalIntentBasedNavigation.js +127 -24
- package/src/sap/fe/core/controllerextensions/InternalRouting.js +183 -164
- package/src/sap/fe/core/controllerextensions/KPIManagement.js +834 -170
- package/src/sap/fe/core/controllerextensions/KPIManagement.ts +890 -189
- package/src/sap/fe/core/controllerextensions/PageReady.js +48 -33
- package/src/sap/fe/core/controllerextensions/PageReady.ts +49 -14
- package/src/sap/fe/core/controllerextensions/Paginator.js +150 -0
- package/src/sap/fe/core/controllerextensions/Placeholder.js +133 -270
- package/src/sap/fe/core/controllerextensions/Share.js +31 -13
- package/src/sap/fe/core/controllerextensions/SideEffects.js +5 -6
- package/src/sap/fe/core/controllerextensions/SideEffects.ts +13 -12
- package/src/sap/fe/core/controllerextensions/ViewState.js +173 -6
- package/src/sap/fe/core/controls/ActionParameterDialog.fragment.xml +39 -34
- package/src/sap/fe/core/controls/ActionParameterDialogValueHelp.fragment.xml +35 -0
- package/src/sap/fe/core/controls/ActionPartial.fragment.xml +1 -1
- package/src/sap/fe/core/controls/CustomQuickViewPage.js +3 -0
- package/src/sap/fe/core/controls/MultiValueParameterDelegate.js +45 -0
- package/src/sap/fe/core/controls/filterbar/FilterContainer.js +15 -4
- package/src/sap/fe/core/controls/filterbar/VisualFilter.js +250 -94
- package/src/sap/fe/core/controls/filterbar/VisualFilterContainer.js +129 -135
- package/src/sap/fe/core/controls/filterbar/utils/VisualFilterUtils.js +325 -0
- package/src/sap/fe/core/converters/ConverterContext.js +19 -5
- package/src/sap/fe/core/converters/ConverterContext.ts +13 -3
- package/src/sap/fe/core/converters/ManifestSettings.js +1 -1
- package/src/sap/fe/core/converters/ManifestSettings.ts +9 -2
- package/src/sap/fe/core/converters/ManifestWrapper.js +9 -9
- package/src/sap/fe/core/converters/MetaModelConverter.js +858 -871
- package/src/sap/fe/core/converters/MetaModelConverter.ts +763 -826
- package/src/sap/fe/core/converters/TemplateConverter.js +4 -4
- package/src/sap/fe/core/converters/annotations/DataField.js +57 -7
- package/src/sap/fe/core/converters/annotations/DataField.ts +52 -2
- package/src/sap/fe/core/converters/common/AnnotationConverter.js +80 -46
- package/src/sap/fe/core/converters/controls/Common/Action.js +56 -54
- package/src/sap/fe/core/converters/controls/Common/Action.ts +48 -36
- package/src/sap/fe/core/converters/controls/Common/Chart.js +101 -9
- package/src/sap/fe/core/converters/controls/Common/Chart.ts +100 -5
- package/src/sap/fe/core/converters/controls/Common/Criticality.js +1 -1
- package/src/sap/fe/core/converters/controls/Common/DataVisualization.js +15 -16
- package/src/sap/fe/core/converters/controls/Common/DataVisualization.ts +16 -30
- package/src/sap/fe/core/converters/controls/Common/Form.js +21 -12
- package/src/sap/fe/core/converters/controls/Common/Form.ts +28 -8
- package/src/sap/fe/core/converters/controls/Common/KPI.js +287 -109
- package/src/sap/fe/core/converters/controls/Common/KPI.ts +314 -139
- package/src/sap/fe/core/converters/controls/Common/Table.js +414 -171
- package/src/sap/fe/core/converters/controls/Common/Table.ts +412 -130
- package/src/sap/fe/core/converters/controls/ListReport/FilterBar.js +487 -0
- package/src/sap/fe/core/converters/controls/ListReport/FilterBar.ts +541 -0
- package/src/sap/fe/core/converters/controls/ListReport/VisualFilters.js +364 -0
- package/src/sap/fe/core/converters/controls/ListReport/VisualFilters.ts +338 -0
- package/src/sap/fe/core/converters/controls/ObjectPage/Avatar.js +74 -0
- package/src/sap/fe/core/converters/controls/ObjectPage/Avatar.ts +50 -0
- package/src/sap/fe/core/converters/controls/ObjectPage/HeaderFacet.js +11 -11
- package/src/sap/fe/core/converters/controls/ObjectPage/SubSection.js +47 -35
- package/src/sap/fe/core/converters/controls/ObjectPage/SubSection.ts +45 -29
- package/src/sap/fe/core/converters/helpers/Aggregation.js +31 -32
- package/src/sap/fe/core/converters/helpers/Aggregation.ts +26 -27
- package/src/sap/fe/core/converters/helpers/BindingHelper.js +27 -2
- package/src/sap/fe/core/converters/helpers/BindingHelper.ts +22 -2
- package/src/sap/fe/core/converters/helpers/ConfigurableObject.js +1 -1
- package/src/sap/fe/core/converters/helpers/ID.js +1 -3
- package/src/sap/fe/core/converters/helpers/ID.ts +2 -3
- package/src/sap/fe/core/converters/helpers/IssueManager.js +5 -4
- package/src/sap/fe/core/converters/helpers/IssueManager.ts +4 -3
- package/src/sap/fe/core/converters/helpers/Key.js +3 -3
- package/src/sap/fe/core/converters/helpers/SelectionVariantHelper.js +11 -6
- package/src/sap/fe/core/converters/helpers/SelectionVariantHelper.ts +9 -5
- package/src/sap/fe/core/converters/objectPage/FormMenuActions.js +18 -5
- package/src/sap/fe/core/converters/objectPage/FormMenuActions.ts +14 -14
- package/src/sap/fe/core/converters/objectPage/HeaderAndFooterAction.js +91 -20
- package/src/sap/fe/core/converters/objectPage/HeaderAndFooterAction.ts +77 -5
- package/src/sap/fe/core/converters/templates/ListReportConverter.js +76 -714
- package/src/sap/fe/core/converters/templates/ListReportConverter.ts +75 -807
- package/src/sap/fe/core/converters/templates/ObjectPageConverter.js +106 -17
- package/src/sap/fe/core/converters/templates/ObjectPageConverter.ts +121 -16
- package/src/sap/fe/core/formatters/CriticalityFormatter.js +1 -1
- package/src/sap/fe/core/formatters/FPMFormatter.js +1 -1
- package/src/sap/fe/core/formatters/FPMFormatter.ts +8 -3
- package/src/sap/fe/core/formatters/KPIFormatter.js +1 -1
- package/src/sap/fe/core/formatters/TableFormatter.js +1 -1
- package/src/sap/fe/core/formatters/TableFormatterTypes.js +1 -1
- package/src/sap/fe/core/formatters/ValueFormatter.js +1 -1
- package/src/sap/fe/core/fpm/Component.js +1 -1
- package/src/sap/fe/core/helpers/AnnotationEnum.js +3 -3
- package/src/sap/fe/core/helpers/BindingExpression.js +6 -6
- package/src/sap/fe/core/helpers/ClassSupport.js +4 -4
- package/src/sap/fe/core/helpers/ExcelFormatHelper.js +0 -2
- package/src/sap/fe/core/helpers/ModelHelper.js +27 -0
- package/src/sap/fe/core/helpers/PasteHelper.js +6 -0
- package/src/sap/fe/core/helpers/SemanticKeyHelper.js +2 -2
- package/src/sap/fe/core/helpers/StableIdHelper.js +1 -1
- package/src/sap/fe/core/helpers/StableIdHelper.ts +1 -1
- package/src/sap/fe/core/jsx-runtime/jsx.js +2 -2
- package/src/sap/fe/core/jsx-runtime/jsxs.js +1 -1
- package/src/sap/fe/core/library.js +1 -1
- package/src/sap/fe/core/messagebundle.properties +30 -1
- package/src/sap/fe/core/messagebundle_ar.properties +43 -1
- package/src/sap/fe/core/messagebundle_bg.properties +42 -0
- package/src/sap/fe/core/messagebundle_ca.properties +44 -2
- package/src/sap/fe/core/messagebundle_cs.properties +42 -0
- package/src/sap/fe/core/messagebundle_cy.properties +42 -0
- package/src/sap/fe/core/messagebundle_da.properties +43 -1
- package/src/sap/fe/core/messagebundle_de.properties +45 -3
- package/src/sap/fe/core/messagebundle_el.properties +43 -1
- package/src/sap/fe/core/messagebundle_en.properties +42 -0
- package/src/sap/fe/core/messagebundle_en_GB.properties +43 -1
- package/src/sap/fe/core/messagebundle_en_US_sappsd.properties +43 -1
- package/src/sap/fe/core/messagebundle_en_US_saprigi.properties +48 -0
- package/src/sap/fe/core/messagebundle_en_US_saptrc.properties +42 -0
- package/src/sap/fe/core/messagebundle_es.properties +50 -8
- package/src/sap/fe/core/messagebundle_es_MX.properties +45 -3
- package/src/sap/fe/core/messagebundle_et.properties +42 -0
- package/src/sap/fe/core/messagebundle_fi.properties +42 -0
- package/src/sap/fe/core/messagebundle_fr.properties +51 -9
- package/src/sap/fe/core/messagebundle_fr_CA.properties +42 -0
- package/src/sap/fe/core/messagebundle_hi.properties +43 -1
- package/src/sap/fe/core/messagebundle_hr.properties +43 -1
- package/src/sap/fe/core/messagebundle_hu.properties +42 -0
- package/src/sap/fe/core/messagebundle_id.properties +43 -1
- package/src/sap/fe/core/messagebundle_it.properties +43 -1
- package/src/sap/fe/core/messagebundle_iw.properties +44 -2
- package/src/sap/fe/core/messagebundle_ja.properties +43 -1
- package/src/sap/fe/core/messagebundle_kk.properties +43 -1
- package/src/sap/fe/core/messagebundle_ko.properties +43 -1
- package/src/sap/fe/core/messagebundle_lt.properties +43 -1
- package/src/sap/fe/core/messagebundle_lv.properties +43 -1
- package/src/sap/fe/core/messagebundle_ms.properties +43 -1
- package/src/sap/fe/core/messagebundle_nl.properties +47 -5
- package/src/sap/fe/core/messagebundle_no.properties +44 -2
- package/src/sap/fe/core/messagebundle_pl.properties +43 -1
- package/src/sap/fe/core/messagebundle_pt.properties +43 -1
- package/src/sap/fe/core/messagebundle_pt_PT.properties +43 -1
- package/src/sap/fe/core/messagebundle_ro.properties +43 -1
- package/src/sap/fe/core/messagebundle_ru.properties +43 -1
- package/src/sap/fe/core/messagebundle_sh.properties +43 -1
- package/src/sap/fe/core/messagebundle_sk.properties +42 -0
- package/src/sap/fe/core/messagebundle_sl.properties +43 -1
- package/src/sap/fe/core/messagebundle_sv.properties +43 -1
- package/src/sap/fe/core/messagebundle_th.properties +42 -0
- package/src/sap/fe/core/messagebundle_tr.properties +42 -0
- package/src/sap/fe/core/messagebundle_uk.properties +42 -0
- package/src/sap/fe/core/messagebundle_vi.properties +43 -1
- package/src/sap/fe/core/messagebundle_zh_CN.properties +43 -1
- package/src/sap/fe/core/messagebundle_zh_TW.properties +43 -1
- package/src/sap/fe/core/services/AsyncComponentServiceFactory.js +5 -5
- package/src/sap/fe/core/services/EnvironmentServiceFactory.js +5 -5
- package/src/sap/fe/core/services/RoutingServiceFactory.js +155 -76
- package/src/sap/fe/core/services/ShellServicesFactory.js +9 -9
- package/src/sap/fe/core/services/SideEffectsServiceFactory.js +11 -12
- package/src/sap/fe/core/services/TemplatedViewServiceFactory.js +11 -1
- package/src/sap/fe/core/support/AnnotationIssue.support.js +2 -4
- package/src/sap/fe/core/support/CollectionFacetMissingID.support.js +2 -4
- package/src/sap/fe/core/support/CollectionFacetUnsupportedLevel.support.js +2 -4
- package/src/sap/fe/core/support/CommonHelper.js +2 -4
- package/src/sap/fe/core/support/Diagnostics.js +1 -1
- package/src/sap/fe/core/templating/CriticalityFormatters.js +4 -4
- package/src/sap/fe/core/templating/DataFieldFormatters.js +1 -1
- package/src/sap/fe/core/templating/DataModelPathHelper.js +54 -6
- package/src/sap/fe/core/templating/DataModelPathHelper.ts +54 -4
- package/src/sap/fe/core/templating/EntitySetHelper.js +13 -3
- package/src/sap/fe/core/templating/EntitySetHelper.ts +4 -0
- package/src/sap/fe/core/templating/FieldControlHelper.js +1 -1
- package/src/sap/fe/core/templating/FilterHelper.js +23 -5
- package/src/sap/fe/core/templating/FilterHelper.ts +15 -1
- package/src/sap/fe/core/templating/FilterTemplating.js +1 -1
- package/src/sap/fe/core/templating/PropertyFormatters.js +1 -1
- package/src/sap/fe/core/templating/PropertyHelper.js +8 -8
- package/src/sap/fe/core/templating/UIFormatters.js +72 -4
- package/src/sap/fe/core/templating/UIFormatters.ts +98 -3
- package/src/sap/fe/core/type/Email.js +1 -1
|
@@ -10,9 +10,10 @@ sap.ui.define(
|
|
|
10
10
|
"sap/base/util/merge",
|
|
11
11
|
"sap/ui/fl/apply/api/ControlVariantApplyAPI",
|
|
12
12
|
"sap/ui/mdc/p13n/StateUtil",
|
|
13
|
-
"sap/fe/navigation/library"
|
|
13
|
+
"sap/fe/navigation/library",
|
|
14
|
+
"sap/fe/core/CommonUtils"
|
|
14
15
|
],
|
|
15
|
-
function(ControllerExtension, OverrideExecution, Log, mergeObjects, ControlVariantApplyAPI, StateUtil, NavLibrary) {
|
|
16
|
+
function(ControllerExtension, OverrideExecution, Log, mergeObjects, ControlVariantApplyAPI, StateUtil, NavLibrary, CommonUtils) {
|
|
16
17
|
"use strict";
|
|
17
18
|
|
|
18
19
|
// additionalStates are stored next to control IDs, so name clash avoidance needed. Fortunately IDs have restrictions:
|
|
@@ -91,6 +92,26 @@ sap.ui.define(
|
|
|
91
92
|
if (oControlState) {
|
|
92
93
|
return StateUtil.applyExternalState(oTable, oControlState);
|
|
93
94
|
}
|
|
95
|
+
},
|
|
96
|
+
refreshBinding: function(oTable) {
|
|
97
|
+
var oTableBinding = oTable.getRowBinding();
|
|
98
|
+
if (oTableBinding) {
|
|
99
|
+
var oRootBinding = oTableBinding.getRootBinding();
|
|
100
|
+
if (oRootBinding === oTableBinding) {
|
|
101
|
+
// absolute binding
|
|
102
|
+
oTableBinding.refresh();
|
|
103
|
+
} else {
|
|
104
|
+
// relative binding
|
|
105
|
+
var oHeaderContext = oTableBinding.getHeaderContext();
|
|
106
|
+
var sGroupId = oTableBinding.getGroupId();
|
|
107
|
+
|
|
108
|
+
if (oHeaderContext) {
|
|
109
|
+
oHeaderContext.requestSideEffects([{ $NavigationPropertyPath: "" }], sGroupId);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
} else {
|
|
113
|
+
Log.info("Table: " + oTable.getId() + " was not refreshed. No binding found!");
|
|
114
|
+
}
|
|
94
115
|
}
|
|
95
116
|
},
|
|
96
117
|
"sap.uxap.ObjectPageLayout": {
|
|
@@ -101,6 +122,38 @@ sap.ui.define(
|
|
|
101
122
|
},
|
|
102
123
|
apply: function(oOPLayout, oControlState) {
|
|
103
124
|
oControlState && oOPLayout.setSelectedSection(oControlState.selectedSection);
|
|
125
|
+
},
|
|
126
|
+
refreshBinding: function(oOPLayout) {
|
|
127
|
+
var oBindingContext = oOPLayout.getBindingContext();
|
|
128
|
+
var oBinding = oBindingContext && oBindingContext.getBinding();
|
|
129
|
+
if (oBinding) {
|
|
130
|
+
var sMetaPath = CommonUtils.getMetaPathForContext(oBindingContext);
|
|
131
|
+
var sStrategy = CommonUtils.getControlRefreshStrategyForContextPath(oOPLayout, sMetaPath);
|
|
132
|
+
if (sStrategy === "self") {
|
|
133
|
+
// Refresh main context and 1-1 navigation properties or OP
|
|
134
|
+
var oModel = oBindingContext.getModel(),
|
|
135
|
+
oMetaModel = oModel.getMetaModel(),
|
|
136
|
+
oNavigationProperties =
|
|
137
|
+
CommonUtils.getContextPathProperties(oMetaModel, sMetaPath, {
|
|
138
|
+
$kind: "NavigationProperty"
|
|
139
|
+
}) || {},
|
|
140
|
+
aNavPropertiesToRequest = Object.keys(oNavigationProperties).reduce(function(aPrev, sNavProp) {
|
|
141
|
+
if (oNavigationProperties[sNavProp].$isCollection !== true) {
|
|
142
|
+
aPrev.push({ $NavigationPropertyPath: sNavProp });
|
|
143
|
+
}
|
|
144
|
+
return aPrev;
|
|
145
|
+
}, []),
|
|
146
|
+
aProperties = [{ $PropertyPath: "*" }],
|
|
147
|
+
sGroupId = oBinding.getGroupId();
|
|
148
|
+
|
|
149
|
+
oBindingContext.requestSideEffects(aProperties.concat(aNavPropertiesToRequest), sGroupId);
|
|
150
|
+
} else if (sStrategy === "includingDependents") {
|
|
151
|
+
// Complete refresh
|
|
152
|
+
oBinding.refresh();
|
|
153
|
+
}
|
|
154
|
+
} else {
|
|
155
|
+
Log.info("ObjectPage: " + oOPLayout.getId() + " was not refreshed. No binding found!");
|
|
156
|
+
}
|
|
104
157
|
}
|
|
105
158
|
},
|
|
106
159
|
"sap.fe.macros.table.QuickFilterContainer": {
|
|
@@ -156,6 +209,12 @@ sap.ui.define(
|
|
|
156
209
|
if (oController && oController.viewState) {
|
|
157
210
|
return oController.viewState.applyViewState(oControlState, oNavParameters);
|
|
158
211
|
}
|
|
212
|
+
},
|
|
213
|
+
refreshBinding: function(oView) {
|
|
214
|
+
var oController = oView.getController();
|
|
215
|
+
if (oController && oController.viewState) {
|
|
216
|
+
return oController.viewState.refreshViewBindings();
|
|
217
|
+
}
|
|
159
218
|
}
|
|
160
219
|
},
|
|
161
220
|
"sap.ui.core.ComponentContainer": {
|
|
@@ -188,6 +247,25 @@ sap.ui.define(
|
|
|
188
247
|
var ViewState = ControllerExtension.extend("sap.fe.core.controllerextensions.ViewState", {
|
|
189
248
|
metadata: {
|
|
190
249
|
methods: {
|
|
250
|
+
refreshViewBindings: { "public": true, "final": true },
|
|
251
|
+
adaptBindingRefreshControls: {
|
|
252
|
+
"public": true,
|
|
253
|
+
"final": false,
|
|
254
|
+
overrideExecution: OverrideExecution.After
|
|
255
|
+
},
|
|
256
|
+
getControlRefreshBindingHandler: {
|
|
257
|
+
"public": false,
|
|
258
|
+
"final": true
|
|
259
|
+
},
|
|
260
|
+
refreshControlBinding: {
|
|
261
|
+
"public": false,
|
|
262
|
+
"final": true
|
|
263
|
+
},
|
|
264
|
+
adaptBindingRefreshHandler: {
|
|
265
|
+
"public": true,
|
|
266
|
+
"final": false,
|
|
267
|
+
overrideExecution: OverrideExecution.After
|
|
268
|
+
},
|
|
191
269
|
collectResults: { "public": false, "final": true },
|
|
192
270
|
adaptControlStateHandler: {
|
|
193
271
|
"public": true,
|
|
@@ -221,7 +299,9 @@ sap.ui.define(
|
|
|
221
299
|
},
|
|
222
300
|
applyNavigationParameters: { "public": true, "final": false, overrideExecution: OverrideExecution.After },
|
|
223
301
|
onBeforeStateApplied: { "public": true, "final": false, overrideExecution: OverrideExecution.After },
|
|
224
|
-
onAfterStateApplied: { "public": true, "final": false, overrideExecution: OverrideExecution.After }
|
|
302
|
+
onAfterStateApplied: { "public": true, "final": false, overrideExecution: OverrideExecution.After },
|
|
303
|
+
onSuspend: { "public": true, "final": false, overrideExecution: OverrideExecution.After },
|
|
304
|
+
onRestore: { "public": true, "final": false, overrideExecution: OverrideExecution.After }
|
|
225
305
|
}
|
|
226
306
|
},
|
|
227
307
|
|
|
@@ -248,6 +328,96 @@ sap.ui.define(
|
|
|
248
328
|
* @function
|
|
249
329
|
*/
|
|
250
330
|
|
|
331
|
+
refreshViewBindings: function() {
|
|
332
|
+
var that = this;
|
|
333
|
+
return that.collectResults(that.base.viewState.adaptBindingRefreshControls).then(function(aControls) {
|
|
334
|
+
var oPromiseChain = Promise.resolve();
|
|
335
|
+
aControls
|
|
336
|
+
.filter(function(oControl) {
|
|
337
|
+
return oControl && oControl.isA && oControl.isA("sap.ui.base.ManagedObject");
|
|
338
|
+
})
|
|
339
|
+
.forEach(function(oControl) {
|
|
340
|
+
oPromiseChain = oPromiseChain.then(that.refreshControlBinding.bind(that, oControl));
|
|
341
|
+
});
|
|
342
|
+
return oPromiseChain;
|
|
343
|
+
});
|
|
344
|
+
},
|
|
345
|
+
/**
|
|
346
|
+
* This function should add all controls relevant for refreshing to the provided control array.
|
|
347
|
+
*
|
|
348
|
+
* This function is meant to be individually overridden by consuming controllers, but not to be called directly.
|
|
349
|
+
* The override execution is: {@link sap.ui.core.mvc.OverrideExecution.After}.
|
|
350
|
+
* @param {Array<sap.ui.base.ManagedObject>} aCollectedControls The collected controls
|
|
351
|
+
* @alias sap.fe.core.controllerextensions.ViewState#adaptBindingRefreshControls
|
|
352
|
+
* @protected
|
|
353
|
+
*/
|
|
354
|
+
adaptBindingRefreshControls: function(aCollectedControls) {},
|
|
355
|
+
|
|
356
|
+
refreshControlBinding: function(oControl) {
|
|
357
|
+
var oControlRefreshBindingHandler = this.getControlRefreshBindingHandler(oControl),
|
|
358
|
+
oPromiseChain = Promise.resolve(),
|
|
359
|
+
that = this;
|
|
360
|
+
if (typeof oControlRefreshBindingHandler.refreshBinding !== "function") {
|
|
361
|
+
Log.info("refreshBinding handler for control: " + oControl.getMetadata().getName() + " is not provided");
|
|
362
|
+
} else {
|
|
363
|
+
oPromiseChain = oPromiseChain.then(oControlRefreshBindingHandler.refreshBinding.bind(that, oControl));
|
|
364
|
+
}
|
|
365
|
+
return oPromiseChain;
|
|
366
|
+
},
|
|
367
|
+
|
|
368
|
+
/**
|
|
369
|
+
* Returns a map of <code>refreshBinding</code> function for a certain control.
|
|
370
|
+
*
|
|
371
|
+
* @param {sap.ui.base.ManagedObject} oControl The control to get state handler for
|
|
372
|
+
* @returns {object} A plain object with one function: <code>refreshBinding</code>
|
|
373
|
+
*/
|
|
374
|
+
|
|
375
|
+
getControlRefreshBindingHandler: function(oControl) {
|
|
376
|
+
var oRefreshBindingHandler = {};
|
|
377
|
+
if (oControl) {
|
|
378
|
+
for (var sType in _mControlStateHandlerMap) {
|
|
379
|
+
if (oControl.isA(sType)) {
|
|
380
|
+
// pass only the refreshBinding handler in an object so that :
|
|
381
|
+
// 1. Application has access only to refreshBinding and not apply and reterive at this stage
|
|
382
|
+
// 2. Application modifications to the object will be reflected here (as we pass by reference)
|
|
383
|
+
oRefreshBindingHandler["refreshBinding"] = _mControlStateHandlerMap[sType].refreshBinding || {};
|
|
384
|
+
break;
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
this.base.viewState.adaptBindingRefreshHandler(oControl, oRefreshBindingHandler);
|
|
389
|
+
return oRefreshBindingHandler;
|
|
390
|
+
},
|
|
391
|
+
/**
|
|
392
|
+
* Customize the <code>refreshBinding</code> function for a certain control.
|
|
393
|
+
*
|
|
394
|
+
* This function is meant to be individually overridden by consuming controllers, but not to be called directly.
|
|
395
|
+
* The override execution is: {@link sap.ui.core.mvc.OverrideExecution.After}.
|
|
396
|
+
*
|
|
397
|
+
* @param {sap.ui.base.ManagedObject} oControl The control for which the refresh handler is adapted.
|
|
398
|
+
* @param {Array<object>} oControlHandler A plain object which can have one function: <code>refreshBinding</code>
|
|
399
|
+
*
|
|
400
|
+
* @alias sap.fe.core.controllerextensions.ViewState#adaptBindingRefreshHandler
|
|
401
|
+
* @protected
|
|
402
|
+
*/
|
|
403
|
+
adaptBindingRefreshHandler: function(oControl, oControlHandler) {},
|
|
404
|
+
|
|
405
|
+
/**
|
|
406
|
+
* Called when the application is suspended due to keep-alive mode.
|
|
407
|
+
*
|
|
408
|
+
* @alias sap.fe.core.controllerextensions.ViewState#onSuspend
|
|
409
|
+
* @public
|
|
410
|
+
*/
|
|
411
|
+
onSuspend: function() {},
|
|
412
|
+
|
|
413
|
+
/**
|
|
414
|
+
* Called when the application is restored due to keep-alive mode.
|
|
415
|
+
*
|
|
416
|
+
* @alias sap.fe.core.controllerextensions.ViewState#onRestore
|
|
417
|
+
* @public
|
|
418
|
+
*/
|
|
419
|
+
onRestore: function() {},
|
|
420
|
+
|
|
251
421
|
/**
|
|
252
422
|
* Destructor method for objects.
|
|
253
423
|
*/
|
|
@@ -316,9 +486,7 @@ sap.ui.define(
|
|
|
316
486
|
*
|
|
317
487
|
* This function is meant to be individually overridden by consuming controllers, but not to be called directly.
|
|
318
488
|
* The override execution is: {@link sap.ui.core.mvc.OverrideExecution.After}.
|
|
319
|
-
*
|
|
320
489
|
* @param {Array<sap.ui.base.ManagedObject>} aCollectedControls The collected controls
|
|
321
|
-
*
|
|
322
490
|
* @alias sap.fe.core.controllerextensions.ViewState#adaptStateControls
|
|
323
491
|
* @protected
|
|
324
492
|
*/
|
|
@@ -459,7 +627,6 @@ sap.ui.define(
|
|
|
459
627
|
applyInitialStateOnly: function() {
|
|
460
628
|
return true;
|
|
461
629
|
},
|
|
462
|
-
|
|
463
630
|
/**
|
|
464
631
|
* Applies the given view state to this extensions view.
|
|
465
632
|
*
|
|
@@ -35,40 +35,45 @@
|
|
|
35
35
|
multipleLines?
|
|
36
36
|
-->
|
|
37
37
|
<!-- TODO: use new value helper -->
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
38
|
+
|
|
39
|
+
<template:if test="{= !${parameter>$isCollection} }">
|
|
40
|
+
<template:then>
|
|
41
|
+
<mdc:Field
|
|
42
|
+
delegate="{name: 'sap/ui/mdc/odata/v4/FieldBaseDelegate'}"
|
|
43
|
+
unittest:id="ActionParameterDialogFieldExpressionTest"
|
|
44
|
+
id="{= ID.generate(['APD_', ${parameter>$Name}]) }"
|
|
45
|
+
value="{parameter>@@MODEL.format}"
|
|
46
|
+
display="{actionParameter>@@FIELD.getAPDialogDisplayFormat}"
|
|
47
|
+
editMode="{actionParameter>@@COMMON.getParameterEditMode}"
|
|
48
|
+
width="100%"
|
|
49
|
+
multipleLines="{= ${actionParameter>@com.sap.vocabularies.UI.v1.MultiLineText} ? (${actionParameter>@com.sap.vocabularies.UI.v1.MultiLineText} !== false) : undefined}"
|
|
50
|
+
required="{= FIELD.isRequired(${actionParameter>@@FIELD.fieldControl}, 'Editable')}"
|
|
51
|
+
change="{= '.handleChange($event, \'' + ${parameter>$Name} + '\')' }"
|
|
52
|
+
fieldHelp="{= FIELD.getActionParameterDialogFieldHelp(${actionParameter>@}, ${actionName>@sapui.name}, ${parameter>$Name}) }"
|
|
53
|
+
visible="{actionParameter>@@COMMON.isVisible}"
|
|
54
|
+
>
|
|
55
|
+
<core:Fragment fragmentName="sap.fe.core.controls.ActionParameterDialogValueHelp" type="XML" />
|
|
56
|
+
</mdc:Field>
|
|
57
|
+
</template:then>
|
|
58
|
+
<template:else>
|
|
59
|
+
<mdc:MultiValueField
|
|
60
|
+
id="{= ID.generate(['APD_', ${parameter>$Name}]) }"
|
|
61
|
+
items="{actionParameter>@@FE_MODEL.getActionParameterItemsModelPath}"
|
|
62
|
+
delegate="{name: 'sap/fe/core/controls/MultiValueParameterDelegate'}"
|
|
63
|
+
unittest:id="ActionParameterDialogMultiValueFieldExpressionTest"
|
|
64
|
+
display="{actionParameter>@@FIELD.getAPDialogDisplayFormat}"
|
|
65
|
+
editMode="{actionParameter>@@COMMON.getParameterEditMode}"
|
|
66
|
+
width="100%"
|
|
67
|
+
multipleLines="{= ${actionParameter>@com.sap.vocabularies.UI.v1.MultiLineText} ? (${actionParameter>@com.sap.vocabularies.UI.v1.MultiLineText} !== false) : undefined}"
|
|
68
|
+
required="{= FIELD.isRequired(${actionParameter>@@FIELD.fieldControl}, 'Editable')}"
|
|
69
|
+
fieldHelp="{= FIELD.getActionParameterDialogFieldHelp(${actionParameter>@}, ${actionName>@sapui.name}, ${parameter>$Name}) }"
|
|
70
|
+
visible="{actionParameter>@@COMMON.isVisible}"
|
|
71
|
+
>
|
|
72
|
+
<mdcField:MultiValueFieldItem key="{path: 'mvfview>Key', type:'sap.ui.model.type.String'}" description="{mvfview>Desc}" />
|
|
73
|
+
<core:Fragment fragmentName="sap.fe.core.controls.ActionParameterDialogValueHelp" type="XML" />
|
|
74
|
+
</mdc:MultiValueField>
|
|
75
|
+
</template:else>
|
|
76
|
+
</template:if>
|
|
72
77
|
</template:if>
|
|
73
78
|
</template:with>
|
|
74
79
|
</template:repeat>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<core:FragmentDefinition
|
|
2
|
+
xmlns:template="http://schemas.sap.com/sapui5/extension/sap.ui.core.template/1"
|
|
3
|
+
xmlns="sap.m"
|
|
4
|
+
xmlns:core="sap.ui.core"
|
|
5
|
+
xmlns:mdc="sap.ui.mdc"
|
|
6
|
+
xmlns:mdcField="sap.ui.mdc.field"
|
|
7
|
+
xmlns:unittest="http://schemas.sap.com/sapui5/preprocessorextension/sap.fe.unittesting/1"
|
|
8
|
+
template:require="{
|
|
9
|
+
COMMON: 'sap/fe/macros/CommonHelper',
|
|
10
|
+
FIELD: 'sap/fe/macros/field/FieldHelper',
|
|
11
|
+
ID: 'sap/fe/core/helpers/StableIdHelper',
|
|
12
|
+
ValueHelpTemplating: 'sap/fe/macros/internal/valuehelp/ValueHelpTemplating',
|
|
13
|
+
Property: 'sap/fe/core/templating/PropertyFormatters'
|
|
14
|
+
}"
|
|
15
|
+
>
|
|
16
|
+
<template:if test="{= FIELD.hasValueHelpAnnotation(${actionParameter>@}) }">
|
|
17
|
+
<mdc:dependents>
|
|
18
|
+
<mdcField:FieldValueHelp
|
|
19
|
+
unittest:id="ActionParameterDialogValuehelpExpressionTest"
|
|
20
|
+
id="{= ID.generate([${actionName>@sapui.name},${parameter>$Name}]) }"
|
|
21
|
+
delegate="{= FIELD.getFieldValueHelpDelegate(${action>$IsBound}, ${entitySet>@@COMMON.getContextPath}, ${actionName>@sapui.name}, ${parameter>$Name}) }"
|
|
22
|
+
noDialog="{= ${actionParameter>@com.sap.vocabularies.Common.v1.ValueListWithFixedValues} ? (${actionParameter>@com.sap.vocabularies.Common.v1.ValueListWithFixedValues} !== false) : false}"
|
|
23
|
+
validateInput="{= ValueHelpTemplating.requiresValidation(${actionParameter>@@Property.getProperty})}"
|
|
24
|
+
caseSensitive="{= ValueHelpTemplating.useCaseSensitiveFilterRequests(${actionParameter>@@Property.getPropertyObjectPath}, ${actionParameter>/@Org.OData.Capabilities.V1.FilterFunctions})}"
|
|
25
|
+
>
|
|
26
|
+
<mdcField:dialogContent>
|
|
27
|
+
<mdcField:FieldValueHelpMdcTableWrapper />
|
|
28
|
+
</mdcField:dialogContent>
|
|
29
|
+
<mdcField:suggestContent>
|
|
30
|
+
<mdcField:FieldValueHelpMTableWrapper />
|
|
31
|
+
</mdcField:suggestContent>
|
|
32
|
+
</mdcField:FieldValueHelp>
|
|
33
|
+
</mdc:dependents>
|
|
34
|
+
</template:if>
|
|
35
|
+
</core:FragmentDefinition>
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
verticalScrolling="true"
|
|
18
18
|
horizontalScrolling="true"
|
|
19
19
|
class="sapUiContentPadding"
|
|
20
|
-
title="{
|
|
20
|
+
title="{label>title}"
|
|
21
21
|
>
|
|
22
22
|
<!--The list of items that cannot be actioned is based on the Header Info, which is mandatory -->
|
|
23
23
|
<template:if test="{= ${entityType>@com.sap.vocabularies.UI.v1.HeaderInfo}}">
|
|
@@ -79,6 +79,7 @@ sap.ui.define(["sap/m/QuickViewPage", "sap/m/Button", "sap/fe/core/CommonUtils",
|
|
|
79
79
|
} else {
|
|
80
80
|
oShellHash = oShellServiceHelper.parseShellHash(sQuickViewPageTitleLinkIntent);
|
|
81
81
|
}
|
|
82
|
+
CommonUtils.storeControlRefreshStrategyForHash(oView, oShellHash);
|
|
82
83
|
return {
|
|
83
84
|
target: {
|
|
84
85
|
semanticObject: oShellHash.semanticObject,
|
|
@@ -90,6 +91,8 @@ sap.ui.define(["sap/m/QuickViewPage", "sap/m/Button", "sap/fe/core/CommonUtils",
|
|
|
90
91
|
}
|
|
91
92
|
} else {
|
|
92
93
|
var oCurrentShellHash = oShellServiceHelper.parseShellHash(window.location.hash);
|
|
94
|
+
CommonUtils.storeControlRefreshStrategyForHash(oView, oCurrentShellHash);
|
|
95
|
+
|
|
93
96
|
return {
|
|
94
97
|
target: {
|
|
95
98
|
semanticObject: oCurrentShellHash.semanticObject,
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* SAPUI5
|
|
3
|
+
* (c) Copyright 2009-2021 SAP SE. All rights reserved.
|
|
4
|
+
*/
|
|
5
|
+
// ---------------------------------------------------------------------------------------
|
|
6
|
+
// Helper class used to help create content in the multi value field
|
|
7
|
+
// ---------------------------------------------------------------------------------------
|
|
8
|
+
// ---------------------------------------------------------------------------------------
|
|
9
|
+
/* eslint-disable no-console */
|
|
10
|
+
sap.ui.define(
|
|
11
|
+
["sap/ui/mdc/field/MultiValueFieldDelegate"],
|
|
12
|
+
function(MultiValueFieldDelegate) {
|
|
13
|
+
"use strict";
|
|
14
|
+
var oMultiValueFieldDelegate = Object.assign({}, MultiValueFieldDelegate, {
|
|
15
|
+
_transformConditions: function(aConditions, sKeyPath, sDescriptionPath) {
|
|
16
|
+
var aTransformedItems = [];
|
|
17
|
+
for (var i = 0; i < aConditions.length; i++) {
|
|
18
|
+
var oItem = {};
|
|
19
|
+
var oCondition = aConditions[i];
|
|
20
|
+
oItem[sKeyPath] = oCondition.values[0];
|
|
21
|
+
if (sDescriptionPath) {
|
|
22
|
+
oItem[sDescriptionPath] = oCondition.values[1];
|
|
23
|
+
}
|
|
24
|
+
aTransformedItems.push(oItem);
|
|
25
|
+
}
|
|
26
|
+
return aTransformedItems;
|
|
27
|
+
},
|
|
28
|
+
updateItems: function(oPayload, aConditions, oMultiValueField) {
|
|
29
|
+
var oListBinding = oMultiValueField.getBinding("items");
|
|
30
|
+
var oBindingInfo = oMultiValueField.getBindingInfo("items");
|
|
31
|
+
var sItemPath = oBindingInfo.path;
|
|
32
|
+
var oTemplate = oBindingInfo.template;
|
|
33
|
+
var oKeyBindingInfo = oTemplate.getBindingInfo("key");
|
|
34
|
+
var sKeyPath = oKeyBindingInfo && oKeyBindingInfo.parts[0].path;
|
|
35
|
+
var oDescriptionBindingInfo = oTemplate.getBindingInfo("description");
|
|
36
|
+
var sDescriptionPath = oDescriptionBindingInfo && oDescriptionBindingInfo.parts[0].path;
|
|
37
|
+
var oModel = oListBinding.getModel();
|
|
38
|
+
|
|
39
|
+
oModel.setProperty(sItemPath, this._transformConditions(aConditions, sKeyPath, sDescriptionPath));
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
return oMultiValueFieldDelegate;
|
|
43
|
+
},
|
|
44
|
+
/* bExport= */ false
|
|
45
|
+
);
|
|
@@ -52,12 +52,11 @@ sap.ui.define(["sap/ui/mdc/filterbar/aligned/FilterContainer"], function(MdcFilt
|
|
|
52
52
|
// hence find the filter field from the layout and remove it's content aggregation
|
|
53
53
|
var that = this;
|
|
54
54
|
oControl.getContent().forEach(function(oInnerControl) {
|
|
55
|
-
|
|
55
|
+
var oContent = oInnerControl.getContent && oInnerControl.getContent();
|
|
56
|
+
if (oInnerControl.isA("sap.ui.mdc.FilterField") && oContent && oContent.isA("sap.fe.core.controls.filterbar.VisualFilter")) {
|
|
56
57
|
// store the visual filter for later use.
|
|
57
58
|
var oVFId = oInnerControl.getId();
|
|
58
|
-
|
|
59
|
-
that.aAllVisualFilters[oVFId] = oInnerControl.getContent();
|
|
60
|
-
}
|
|
59
|
+
that.aAllVisualFilters[oVFId] = oContent;
|
|
61
60
|
// remove the content aggregation to render internal content of the field
|
|
62
61
|
oInnerControl.setContent(null);
|
|
63
62
|
}
|
|
@@ -73,6 +72,18 @@ sap.ui.define(["sap/ui/mdc/filterbar/aligned/FilterContainer"], function(MdcFilt
|
|
|
73
72
|
var oFilterFieldIndex = this.aAllFilterFields.findIndex(function(oFilterField) {
|
|
74
73
|
return oFilterField.getId() === oControl.getId();
|
|
75
74
|
});
|
|
75
|
+
|
|
76
|
+
var that = this;
|
|
77
|
+
// Setting VF content for Fillterfield before removing
|
|
78
|
+
oControl.getContent().forEach(function(oInnerControl) {
|
|
79
|
+
if (oInnerControl.isA("sap.ui.mdc.FilterField") && !oInnerControl.getContent()) {
|
|
80
|
+
var oVFId = oInnerControl.getId();
|
|
81
|
+
if (that.aAllVisualFilters[oVFId]) {
|
|
82
|
+
oInnerControl.setContent(that.aAllVisualFilters[oVFId]);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
|
|
76
87
|
this.aAllFilterFields.splice(oFilterFieldIndex, 1);
|
|
77
88
|
|
|
78
89
|
MdcFilterContainer.prototype.removeFilterField.apply(this, arguments);
|