@openui5/sap.ui.integration 1.128.0 → 1.130.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/THIRDPARTY.txt +2 -2
- package/package.json +7 -7
- package/src/sap/ui/integration/.library +1 -1
- package/src/sap/ui/integration/ActionDefinition.js +1 -1
- package/src/sap/ui/integration/Designtime.js +1 -1
- package/src/sap/ui/integration/Extension.js +13 -1
- package/src/sap/ui/integration/Host.js +13 -1
- package/src/sap/ui/integration/cards/AdaptiveContent.js +1 -1
- package/src/sap/ui/integration/cards/AnalyticalContent.js +1 -1
- package/src/sap/ui/integration/cards/AnalyticsCloudContent.js +1 -1
- package/src/sap/ui/integration/cards/BaseContent.js +8 -7
- package/src/sap/ui/integration/cards/BaseContentRenderer.js +30 -8
- package/src/sap/ui/integration/cards/BaseListContent.js +44 -19
- package/src/sap/ui/integration/cards/BaseListContentRenderer.js +52 -0
- package/src/sap/ui/integration/cards/CalendarContent.js +12 -2
- package/src/sap/ui/integration/cards/CalendarContentRenderer.js +2 -2
- package/src/sap/ui/integration/cards/ComponentContent.js +5 -5
- package/src/sap/ui/integration/cards/Footer.js +110 -35
- package/src/sap/ui/integration/cards/Header.js +4 -3
- package/src/sap/ui/integration/cards/ListContent.js +2 -1
- package/src/sap/ui/integration/cards/ListContentRenderer.js +5 -3
- package/src/sap/ui/integration/cards/NumericHeader.js +4 -3
- package/src/sap/ui/integration/cards/ObjectContent.js +2 -2
- package/src/sap/ui/integration/cards/TableContent.js +1 -1
- package/src/sap/ui/integration/cards/TableContentRenderer.js +2 -2
- package/src/sap/ui/integration/cards/TimelineContent.js +1 -1
- package/src/sap/ui/integration/cards/TimelineContentRenderer.js +2 -2
- package/src/sap/ui/integration/cards/WebPageContent.js +1 -1
- package/src/sap/ui/integration/cards/actions/CardActions.js +6 -2
- package/src/sap/ui/integration/cards/actions/ShowCardAction.js +12 -83
- package/src/sap/ui/integration/cards/adaptivecards/elements/UI5InputChoiceSet.js +1 -1
- package/src/sap/ui/integration/cards/adaptivecards/elements/UI5InputDate.js +1 -1
- package/src/sap/ui/integration/cards/adaptivecards/elements/UI5InputNumber.js +1 -1
- package/src/sap/ui/integration/cards/adaptivecards/elements/UI5InputText.js +1 -1
- package/src/sap/ui/integration/cards/adaptivecards/elements/UI5InputToggle.js +1 -1
- package/src/sap/ui/integration/cards/filters/BaseFilter.js +16 -5
- package/src/sap/ui/integration/cards/filters/ComboBoxFilter.js +27 -4
- package/src/sap/ui/integration/cards/filters/DateRangeFilter.js +11 -1
- package/src/sap/ui/integration/cards/filters/FilterBar.js +1 -1
- package/src/sap/ui/integration/cards/filters/FilterBarFactory.js +1 -1
- package/src/sap/ui/integration/cards/filters/SearchFilter.js +8 -1
- package/src/sap/ui/integration/cards/filters/SelectFilter.js +12 -1
- package/src/sap/ui/integration/cards/list/MicrochartsResizeHelper.js +1 -1
- package/src/sap/ui/integration/controls/ActionsStrip.js +1 -1
- package/src/sap/ui/integration/controls/ActionsToolbar.js +1 -1
- package/src/sap/ui/integration/controls/BlockingMessage.js +1 -1
- package/src/sap/ui/integration/controls/ComboBox.js +47 -0
- package/src/sap/ui/integration/controls/ImageWithOverlay.js +1 -1
- package/src/sap/ui/integration/controls/ListContentItem.js +7 -4
- package/src/sap/ui/integration/controls/ListContentItemRenderer.js +4 -4
- package/src/sap/ui/integration/controls/Microchart.js +1 -1
- package/src/sap/ui/integration/controls/MicrochartLegend.js +1 -1
- package/src/sap/ui/integration/controls/ObjectStatus.js +26 -1
- package/src/sap/ui/integration/delegate/Paginator.js +287 -0
- package/src/sap/ui/integration/designtime/baseEditor/BaseEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/PropertyEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/PropertyEditors.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/BasePropertyEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/PropertyEditorFactory.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/arrayEditor/ArrayEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/booleanEditor/BooleanEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/codeEditor/CodeEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/dateEditor/DateEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/dateTimeEditor/DateTimeEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/enumStringEditor/EnumStringEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/groupEditor/GroupEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/iconEditor/IconEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/iconEditor/IsInIconPool.validator.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/integerEditor/IntegerEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/jsonEditor/JsonEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/listEditor/ListEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/mapEditor/MapEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/multiSelectEditor/MultiSelectEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/numberEditor/NumberEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/objectArrayEditor/ObjectArrayEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/selectEditor/SelectEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/separatorEditor/SeparatorEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/stringEditor/StringEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/textAreaEditor/TextAreaEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/util/binding/ObjectBinding.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/util/unset.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/validator/IsBoolean.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/validator/IsDate.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/validator/IsInteger.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/validator/IsNumber.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/validator/IsSelectedKey.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/validator/IsStringList.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/validator/IsUniqueKey.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/validator/IsUniqueList.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/validator/IsValidBinding.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/validator/MaxLength.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/validator/NotABinding.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/validator/ValidatorRegistry.js +1 -1
- package/src/sap/ui/integration/designtime/cardEditor/propertyEditor/complexMapEditor/ComplexMapEditor.js +1 -1
- package/src/sap/ui/integration/designtime/cardEditor/propertyEditor/destinationsEditor/DestinationsEditor.js +1 -1
- package/src/sap/ui/integration/designtime/cardEditor/propertyEditor/filtersEditor/FiltersEditor.js +1 -1
- package/src/sap/ui/integration/designtime/cardEditor/propertyEditor/iconEditor/IconEditor.js +1 -1
- package/src/sap/ui/integration/designtime/cardEditor/propertyEditor/parametersEditor/ParametersEditor.js +1 -1
- package/src/sap/ui/integration/designtime/editor/Card.js +1 -1
- package/src/sap/ui/integration/designtime/editor/CardEditor.js +1 -1
- package/src/sap/ui/integration/designtime/editor/CardPreview.js +1 -1
- package/src/sap/ui/integration/editor/Editor.js +119 -82
- package/src/sap/ui/integration/editor/EditorResourceBundles.js +1 -1
- package/src/sap/ui/integration/editor/Extension.js +1 -1
- package/src/sap/ui/integration/editor/Manifest.js +1 -1
- package/src/sap/ui/integration/editor/Settings.js +1 -1
- package/src/sap/ui/integration/editor/css/Editor.css +7 -0
- package/src/sap/ui/integration/editor/fields/BaseField.js +1 -1
- package/src/sap/ui/integration/editor/fields/BooleanField.js +1 -1
- package/src/sap/ui/integration/editor/fields/DateField.js +1 -1
- package/src/sap/ui/integration/editor/fields/DateTimeField.js +1 -1
- package/src/sap/ui/integration/editor/fields/DestinationField.js +1 -1
- package/src/sap/ui/integration/editor/fields/GroupField.js +1 -1
- package/src/sap/ui/integration/editor/fields/IntegerField.js +1 -1
- package/src/sap/ui/integration/editor/fields/NumberField.js +1 -1
- package/src/sap/ui/integration/editor/fields/ObjectField.js +1 -1
- package/src/sap/ui/integration/editor/fields/ObjectListField.js +1 -1
- package/src/sap/ui/integration/editor/fields/StringField.js +1 -1
- package/src/sap/ui/integration/editor/fields/StringListField.js +1 -1
- package/src/sap/ui/integration/editor/fields/fragment/Controller.js +1 -1
- package/src/sap/ui/integration/editor/fields/viz/ColorSelect.js +1 -1
- package/src/sap/ui/integration/editor/fields/viz/IconSelect.js +1 -1
- package/src/sap/ui/integration/editor/fields/viz/ImageSelect.js +1 -1
- package/src/sap/ui/integration/editor/fields/viz/ShapeSelect.js +1 -1
- package/src/sap/ui/integration/editor/fields/viz/VizBase.js +1 -1
- package/src/sap/ui/integration/extensions/OAuth3LO.js +1 -1
- package/src/sap/ui/integration/library.js +2 -2
- package/src/sap/ui/integration/messagebundle.properties +3 -0
- package/src/sap/ui/integration/messagebundle_ar.properties +2 -0
- package/src/sap/ui/integration/messagebundle_bg.properties +2 -0
- package/src/sap/ui/integration/messagebundle_ca.properties +3 -1
- package/src/sap/ui/integration/messagebundle_cnr.properties +2 -0
- package/src/sap/ui/integration/messagebundle_cs.properties +2 -0
- package/src/sap/ui/integration/messagebundle_cy.properties +2 -0
- package/src/sap/ui/integration/messagebundle_da.properties +3 -1
- package/src/sap/ui/integration/messagebundle_de.properties +2 -0
- package/src/sap/ui/integration/messagebundle_el.properties +2 -0
- package/src/sap/ui/integration/messagebundle_en.properties +2 -0
- package/src/sap/ui/integration/messagebundle_en_GB.properties +2 -0
- package/src/sap/ui/integration/messagebundle_en_US_saprigi.properties +2 -0
- package/src/sap/ui/integration/messagebundle_es.properties +3 -1
- package/src/sap/ui/integration/messagebundle_es_MX.properties +2 -0
- package/src/sap/ui/integration/messagebundle_et.properties +2 -0
- package/src/sap/ui/integration/messagebundle_fi.properties +2 -0
- package/src/sap/ui/integration/messagebundle_fr.properties +2 -0
- package/src/sap/ui/integration/messagebundle_fr_CA.properties +2 -0
- package/src/sap/ui/integration/messagebundle_hi.properties +2 -0
- package/src/sap/ui/integration/messagebundle_hr.properties +2 -0
- package/src/sap/ui/integration/messagebundle_hu.properties +2 -0
- package/src/sap/ui/integration/messagebundle_id.properties +3 -1
- package/src/sap/ui/integration/messagebundle_it.properties +2 -0
- package/src/sap/ui/integration/messagebundle_iw.properties +2 -0
- package/src/sap/ui/integration/messagebundle_ja.properties +2 -0
- package/src/sap/ui/integration/messagebundle_kk.properties +3 -1
- package/src/sap/ui/integration/messagebundle_ko.properties +3 -1
- package/src/sap/ui/integration/messagebundle_lt.properties +2 -0
- package/src/sap/ui/integration/messagebundle_lv.properties +2 -0
- package/src/sap/ui/integration/messagebundle_mk.properties +2 -0
- package/src/sap/ui/integration/messagebundle_ms.properties +2 -0
- package/src/sap/ui/integration/messagebundle_nl.properties +2 -0
- package/src/sap/ui/integration/messagebundle_no.properties +2 -0
- package/src/sap/ui/integration/messagebundle_pl.properties +2 -0
- package/src/sap/ui/integration/messagebundle_pt.properties +2 -0
- package/src/sap/ui/integration/messagebundle_pt_PT.properties +2 -0
- package/src/sap/ui/integration/messagebundle_ro.properties +2 -0
- package/src/sap/ui/integration/messagebundle_ru.properties +2 -0
- package/src/sap/ui/integration/messagebundle_sh.properties +2 -0
- package/src/sap/ui/integration/messagebundle_sk.properties +2 -0
- package/src/sap/ui/integration/messagebundle_sl.properties +2 -0
- package/src/sap/ui/integration/messagebundle_sr.properties +2 -0
- package/src/sap/ui/integration/messagebundle_sv.properties +2 -0
- package/src/sap/ui/integration/messagebundle_th.properties +2 -0
- package/src/sap/ui/integration/messagebundle_tr.properties +2 -0
- package/src/sap/ui/integration/messagebundle_uk.properties +2 -0
- package/src/sap/ui/integration/messagebundle_vi.properties +3 -1
- package/src/sap/ui/integration/messagebundle_zh_CN.properties +2 -0
- package/src/sap/ui/integration/messagebundle_zh_TW.properties +3 -1
- package/src/sap/ui/integration/model/ContextModel.js +1 -1
- package/src/sap/ui/integration/model/ObservableModel.js +3 -16
- package/src/sap/ui/integration/schemas/sap-card.json +27 -4
- package/src/sap/ui/integration/themes/base/Card.less +4 -0
- package/src/sap/ui/integration/themes/base/CardVariants.less +2 -2
- package/src/sap/ui/integration/themes/base/Footer.less +2 -2
- package/src/sap/ui/integration/themes/base/Paginator.less +5 -118
- package/src/sap/ui/integration/themes/sap_hcb/library.source.less +0 -1
- package/src/sap/ui/integration/util/AnalyticsCloudHelper.js +1 -1
- package/src/sap/ui/integration/util/BaseFactory.js +1 -1
- package/src/sap/ui/integration/util/BindingHelper.js +1 -1
- package/src/sap/ui/integration/util/BindingResolver.js +1 -1
- package/src/sap/ui/integration/util/CacheAndRequestDataProvider.js +19 -17
- package/src/sap/ui/integration/util/CardObserver.js +1 -1
- package/src/sap/ui/integration/util/ComboBoxHelper.js +1 -1
- package/src/sap/ui/integration/util/ContentFactory.js +9 -3
- package/src/sap/ui/integration/util/CsrfTokenHandler.js +1 -1
- package/src/sap/ui/integration/util/DataProvider.js +49 -23
- package/src/sap/ui/integration/util/DataProviderFactory.js +22 -23
- package/src/sap/ui/integration/util/Destinations.js +3 -2
- package/src/sap/ui/integration/util/DisplayVariants.js +1 -1
- package/src/sap/ui/integration/util/ErrorHandler.js +1 -1
- package/src/sap/ui/integration/util/ExtensionDataProvider.js +6 -6
- package/src/sap/ui/integration/util/Form.js +1 -1
- package/src/sap/ui/integration/util/HeaderFactory.js +10 -4
- package/src/sap/ui/integration/util/JSONBindingHelper.js +1 -1
- package/src/sap/ui/integration/util/LoadingProvider.js +1 -1
- package/src/sap/ui/integration/util/Manifest.js +1 -1
- package/src/sap/ui/integration/util/OAuth3LOHelper.js +1 -1
- package/src/sap/ui/integration/util/RequestDataProvider.js +59 -21
- package/src/sap/ui/integration/util/ServiceDataProvider.js +9 -7
- package/src/sap/ui/integration/util/ServiceManager.js +1 -1
- package/src/sap/ui/integration/util/SkeletonCard.js +1 -1
- package/src/sap/ui/integration/util/Utils.js +1 -1
- package/src/sap/ui/integration/util/Validators.js +1 -1
- package/src/sap/ui/integration/util/openCardDialog.js +191 -0
- package/src/sap/ui/integration/widgets/Card.js +98 -28
- package/src/sap/ui/integration/controls/Paginator.js +0 -449
- package/src/sap/ui/integration/controls/PaginatorRenderer.js +0 -114
- package/src/sap/ui/integration/model/PagingModelListBinding.js +0 -40
- package/src/sap/ui/integration/themes/sap_hcb/base_Paginator.less +0 -125
|
@@ -17,7 +17,7 @@ sap.ui.define(["sap/ui/integration/util/DataProvider"], function (DataProvider)
|
|
|
17
17
|
* @extends sap.ui.integration.util.DataProvider
|
|
18
18
|
*
|
|
19
19
|
* @author SAP SE
|
|
20
|
-
* @version 1.
|
|
20
|
+
* @version 1.130.0
|
|
21
21
|
*
|
|
22
22
|
* @constructor
|
|
23
23
|
* @private
|
|
@@ -44,24 +44,24 @@ sap.ui.define(["sap/ui/integration/util/DataProvider"], function (DataProvider)
|
|
|
44
44
|
* @returns {Promise} A promise resolved when the data is available and rejected in case of an error.
|
|
45
45
|
*/
|
|
46
46
|
ExtensionDataProvider.prototype.getData = function () {
|
|
47
|
-
|
|
47
|
+
const oConfiguration = this.getResolvedConfiguration().extension;
|
|
48
48
|
|
|
49
49
|
if (!this._oExtension) {
|
|
50
50
|
return Promise.reject("The extension module is not loaded properly or doesn't export a correct value.");
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
if (!this._oExtension[
|
|
54
|
-
return Promise.reject("Extension doesn't implement " +
|
|
53
|
+
if (!this._oExtension[oConfiguration.method]) {
|
|
54
|
+
return Promise.reject("Extension doesn't implement " + oConfiguration.method + " method.");
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
return this._oExtension[
|
|
57
|
+
return this._oExtension[oConfiguration.method].apply(this._oExtension, oConfiguration.args);
|
|
58
58
|
};
|
|
59
59
|
|
|
60
60
|
/**
|
|
61
61
|
* @override
|
|
62
62
|
*/
|
|
63
63
|
ExtensionDataProvider.prototype.getDetails = function () {
|
|
64
|
-
return "Load data from Extension. Method: " + this.
|
|
64
|
+
return "Load data from Extension. Method: " + this.getResolvedConfiguration().extension.method;
|
|
65
65
|
};
|
|
66
66
|
|
|
67
67
|
return ExtensionDataProvider;
|
|
@@ -15,7 +15,8 @@ sap.ui.define([
|
|
|
15
15
|
"sap/ui/integration/cards/NumericHeader",
|
|
16
16
|
"sap/ui/integration/cards/Header",
|
|
17
17
|
"sap/ui/integration/util/Utils",
|
|
18
|
-
"sap/m/Button"
|
|
18
|
+
"sap/m/Button",
|
|
19
|
+
"sap/m/AvatarImageFitType"
|
|
19
20
|
], function (
|
|
20
21
|
BaseFactory,
|
|
21
22
|
Log,
|
|
@@ -28,7 +29,8 @@ sap.ui.define([
|
|
|
28
29
|
NumericHeader,
|
|
29
30
|
Header,
|
|
30
31
|
Utils,
|
|
31
|
-
Button
|
|
32
|
+
Button,
|
|
33
|
+
AvatarImageFitType
|
|
32
34
|
) {
|
|
33
35
|
"use strict";
|
|
34
36
|
|
|
@@ -50,7 +52,7 @@ sap.ui.define([
|
|
|
50
52
|
* @extends sap.ui.integration.util.BaseFactory
|
|
51
53
|
*
|
|
52
54
|
* @author SAP SE
|
|
53
|
-
* @version 1.
|
|
55
|
+
* @version 1.130.0
|
|
54
56
|
*
|
|
55
57
|
* @constructor
|
|
56
58
|
* @private
|
|
@@ -72,7 +74,7 @@ sap.ui.define([
|
|
|
72
74
|
|
|
73
75
|
mConfiguration = this.createBindingInfos(mConfiguration, oCard.getBindingNamespaces());
|
|
74
76
|
|
|
75
|
-
if (bIsInDialog) {
|
|
77
|
+
if (bIsInDialog && !oCard.hasPaginator()) {
|
|
76
78
|
oToolbar = this._createCloseButton(mConfiguration);
|
|
77
79
|
}
|
|
78
80
|
|
|
@@ -163,6 +165,10 @@ sap.ui.define([
|
|
|
163
165
|
oHeader.setTitleMaxLines(bIsFlatTile ? 1 : 2);
|
|
164
166
|
}
|
|
165
167
|
|
|
168
|
+
if (!mConfiguration.icon?.fitType) {
|
|
169
|
+
oHeader.setIconFitType(AvatarImageFitType.Contain);
|
|
170
|
+
}
|
|
171
|
+
|
|
166
172
|
if (bIsFlatTile) {
|
|
167
173
|
oHeader.setIconSize("XS");
|
|
168
174
|
|
|
@@ -72,7 +72,7 @@ sap.ui.define([
|
|
|
72
72
|
* @extends sap.ui.integration.util.DataProvider
|
|
73
73
|
*
|
|
74
74
|
* @author SAP SE
|
|
75
|
-
* @version 1.
|
|
75
|
+
* @version 1.130.0
|
|
76
76
|
*
|
|
77
77
|
* @constructor
|
|
78
78
|
* @private
|
|
@@ -127,8 +127,8 @@ sap.ui.define([
|
|
|
127
127
|
* @override
|
|
128
128
|
*/
|
|
129
129
|
RequestDataProvider.prototype.getData = function () {
|
|
130
|
-
|
|
131
|
-
|
|
130
|
+
const oRequestConfig = this._getResolvedRequestConfiguration();
|
|
131
|
+
let pRequestChain = Promise.resolve(oRequestConfig);
|
|
132
132
|
|
|
133
133
|
if (this._oDestinations) {
|
|
134
134
|
pRequestChain = this._oDestinations.process(oRequestConfig);
|
|
@@ -156,6 +156,25 @@ sap.ui.define([
|
|
|
156
156
|
return DataProvider.prototype.triggerDataUpdate.apply(this, arguments);
|
|
157
157
|
};
|
|
158
158
|
|
|
159
|
+
/**
|
|
160
|
+
* @override
|
|
161
|
+
*/
|
|
162
|
+
RequestDataProvider.prototype.getResolvedConfiguration = function () {
|
|
163
|
+
const oConfiguration = DataProvider.prototype.getResolvedConfiguration.apply(this, arguments);
|
|
164
|
+
|
|
165
|
+
this._reviveFormData(oConfiguration);
|
|
166
|
+
|
|
167
|
+
return oConfiguration;
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
RequestDataProvider.prototype._reviveFormData = function (oResolvedConfiguration) {
|
|
171
|
+
const oConfiguration = this.getConfiguration();
|
|
172
|
+
|
|
173
|
+
if (oConfiguration?.request?.parameters instanceof FormData) {
|
|
174
|
+
oResolvedConfiguration.request.parameters = oConfiguration.request.parameters;
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
|
|
159
178
|
RequestDataProvider.prototype._handleExpiredToken = function (oError) {
|
|
160
179
|
if (!this._oCsrfTokenHandler.isExpiredToken(this.getLastResponse())) {
|
|
161
180
|
throw oError;
|
|
@@ -209,6 +228,8 @@ sap.ui.define([
|
|
|
209
228
|
vBody = JSON.stringify(oParameters);
|
|
210
229
|
} else if (bGetMethod) {
|
|
211
230
|
sUrl = combineUrlAndParams(sUrl, oParameters);
|
|
231
|
+
} else if (oParameters instanceof FormData) {
|
|
232
|
+
vBody = oParameters;
|
|
212
233
|
} else {
|
|
213
234
|
// application/x-www-form-urlencoded
|
|
214
235
|
vBody = new URLSearchParams(oParameters);
|
|
@@ -242,7 +263,7 @@ sap.ui.define([
|
|
|
242
263
|
oRequest.options.headers.set("Accept", mDataTypeHeaders[sDataType]);
|
|
243
264
|
}
|
|
244
265
|
|
|
245
|
-
oRequest = this._modifyRequestBeforeSent(oRequest, this.
|
|
266
|
+
oRequest = this._modifyRequestBeforeSent(oRequest, this.getResolvedConfiguration());
|
|
246
267
|
|
|
247
268
|
if (!this._isValidRequest(oRequest)) {
|
|
248
269
|
Log.error(sMessage);
|
|
@@ -262,7 +283,7 @@ sap.ui.define([
|
|
|
262
283
|
};
|
|
263
284
|
|
|
264
285
|
RequestDataProvider.prototype._request = function (oRequest, bNoRetry) {
|
|
265
|
-
var fnFetch = this._getFetchMethod(this.
|
|
286
|
+
var fnFetch = this._getFetchMethod(this._getResolvedRequestConfiguration());
|
|
266
287
|
|
|
267
288
|
return fnFetch(oRequest.url, oRequest.options)
|
|
268
289
|
.then(function (oResponse) {
|
|
@@ -342,7 +363,7 @@ sap.ui.define([
|
|
|
342
363
|
* @returns {int} The number of seconds after which to retry the request.
|
|
343
364
|
*/
|
|
344
365
|
RequestDataProvider.prototype._getRetryAfter = function (oResponse) {
|
|
345
|
-
|
|
366
|
+
const oRequestConfig = this._getResolvedRequestConfiguration(),
|
|
346
367
|
vRetryAfter = oResponse.headers.get("Retry-After") || oRequestConfig.retryAfter;
|
|
347
368
|
|
|
348
369
|
if (!vRetryAfter) {
|
|
@@ -364,31 +385,48 @@ sap.ui.define([
|
|
|
364
385
|
/**
|
|
365
386
|
* Gets the method which should execute the HTTP fetch.
|
|
366
387
|
* @private
|
|
367
|
-
* @param {object}
|
|
388
|
+
* @param {object} oRequestConfiguration Configuration in manifest format
|
|
368
389
|
* @returns {Function} The function to use for HTTP fetch.
|
|
369
390
|
*/
|
|
370
|
-
RequestDataProvider.prototype._getFetchMethod = function (
|
|
371
|
-
var oCard =
|
|
391
|
+
RequestDataProvider.prototype._getFetchMethod = function (oRequestConfiguration) {
|
|
392
|
+
var oCard = this.getCardInstance(),
|
|
372
393
|
oExtension = oCard && oCard.getAggregation("_extension"),
|
|
373
394
|
oHost = Element.getElementById(this.getHost());
|
|
374
395
|
|
|
375
396
|
if (oExtension) {
|
|
376
|
-
return
|
|
377
|
-
return oExtension.fetch(sResource, mOptions,
|
|
397
|
+
return (sResource, mOptions) => {
|
|
398
|
+
return oExtension.fetch(sResource, mOptions, this._cloneRequestConfiguration(oRequestConfiguration));
|
|
378
399
|
};
|
|
379
400
|
}
|
|
380
401
|
|
|
381
402
|
if (oHost) {
|
|
382
|
-
return
|
|
383
|
-
return oHost.fetch(sResource, mOptions,
|
|
403
|
+
return (sResource, mOptions) => {
|
|
404
|
+
return oHost.fetch(sResource, mOptions, this._cloneRequestConfiguration(oRequestConfiguration), oCard);
|
|
384
405
|
};
|
|
385
406
|
}
|
|
386
407
|
|
|
387
408
|
return fetch;
|
|
388
409
|
};
|
|
389
410
|
|
|
390
|
-
RequestDataProvider.prototype.
|
|
391
|
-
return this.
|
|
411
|
+
RequestDataProvider.prototype._getResolvedRequestConfiguration = function () {
|
|
412
|
+
return this.getResolvedConfiguration().request;
|
|
413
|
+
};
|
|
414
|
+
|
|
415
|
+
RequestDataProvider.prototype._cloneRequestConfiguration = function (oRequestConfiguration) {
|
|
416
|
+
let oFormData;
|
|
417
|
+
|
|
418
|
+
if (oRequestConfiguration?.parameters instanceof FormData) {
|
|
419
|
+
oFormData = oRequestConfiguration.parameters;
|
|
420
|
+
delete oRequestConfiguration.parameters;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
const oClonedConfiguration = deepClone(oRequestConfiguration, 1000);
|
|
424
|
+
|
|
425
|
+
if (oFormData) {
|
|
426
|
+
oClonedConfiguration.parameters = oFormData;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
return oClonedConfiguration;
|
|
392
430
|
};
|
|
393
431
|
|
|
394
432
|
/**
|
|
@@ -495,11 +533,11 @@ sap.ui.define([
|
|
|
495
533
|
* Override if modification to the request is needed.
|
|
496
534
|
* Allows the host to modify the headers or the full request.
|
|
497
535
|
* @param {object} oRequest The current request.
|
|
498
|
-
* @param {object}
|
|
536
|
+
* @param {object} oConfiguration The request configuration
|
|
499
537
|
* @returns {object} The modified request
|
|
500
538
|
*/
|
|
501
|
-
RequestDataProvider.prototype._modifyRequestBeforeSent = function (oRequest,
|
|
502
|
-
var oCard =
|
|
539
|
+
RequestDataProvider.prototype._modifyRequestBeforeSent = function (oRequest, oConfiguration) {
|
|
540
|
+
var oCard = this.getCardInstance(),
|
|
503
541
|
oHost = Element.getElementById(this.getHost());
|
|
504
542
|
|
|
505
543
|
if (!oHost) {
|
|
@@ -510,14 +548,14 @@ sap.ui.define([
|
|
|
510
548
|
* @deprecated since 1.113
|
|
511
549
|
*/
|
|
512
550
|
if (oHost.modifyRequestHeaders) {
|
|
513
|
-
oRequest.options.headers = new Headers(oHost.modifyRequestHeaders(Object.fromEntries(oRequest.options.headers),
|
|
551
|
+
oRequest.options.headers = new Headers(oHost.modifyRequestHeaders(Object.fromEntries(oRequest.options.headers), oConfiguration, oCard));
|
|
514
552
|
}
|
|
515
553
|
|
|
516
554
|
/**
|
|
517
555
|
* @deprecated since 1.113
|
|
518
556
|
*/
|
|
519
557
|
if (oHost.modifyRequest) {
|
|
520
|
-
oRequest = oHost.modifyRequest(oRequest,
|
|
558
|
+
oRequest = oHost.modifyRequest(oRequest, oConfiguration, oCard);
|
|
521
559
|
}
|
|
522
560
|
|
|
523
561
|
return oRequest;
|
|
@@ -527,7 +565,7 @@ sap.ui.define([
|
|
|
527
565
|
* @override
|
|
528
566
|
*/
|
|
529
567
|
RequestDataProvider.prototype.getDetails = function () {
|
|
530
|
-
return "Backend interaction - load data from URL: " + this.
|
|
568
|
+
return "Backend interaction - load data from URL: " + this._getResolvedRequestConfiguration().url;
|
|
531
569
|
};
|
|
532
570
|
|
|
533
571
|
return RequestDataProvider;
|
|
@@ -17,7 +17,7 @@ sap.ui.define(["sap/ui/integration/util/DataProvider"], function (DataProvider)
|
|
|
17
17
|
* @extends sap.ui.integration.util.DataProvider
|
|
18
18
|
*
|
|
19
19
|
* @author SAP SE
|
|
20
|
-
* @version 1.
|
|
20
|
+
* @version 1.130.0
|
|
21
21
|
*
|
|
22
22
|
* @constructor
|
|
23
23
|
* @private
|
|
@@ -50,12 +50,14 @@ sap.ui.define(["sap/ui/integration/util/DataProvider"], function (DataProvider)
|
|
|
50
50
|
*/
|
|
51
51
|
ServiceDataProvider.prototype.createServiceInstances = function (oServiceManager) {
|
|
52
52
|
this._oServiceManager = oServiceManager;
|
|
53
|
+
const oConfiguration = this.getResolvedConfiguration();
|
|
53
54
|
|
|
54
|
-
if (!
|
|
55
|
+
if (!oConfiguration || !oConfiguration.service) {
|
|
55
56
|
return;
|
|
56
57
|
}
|
|
57
58
|
|
|
58
|
-
|
|
59
|
+
let vService = oConfiguration.service;
|
|
60
|
+
|
|
59
61
|
if (vService && typeof vService === "object") {
|
|
60
62
|
vService = vService.name;
|
|
61
63
|
}
|
|
@@ -69,14 +71,14 @@ sap.ui.define(["sap/ui/integration/util/DataProvider"], function (DataProvider)
|
|
|
69
71
|
* @param {string} sServiceName The name of the service to create an instance of.
|
|
70
72
|
*/
|
|
71
73
|
ServiceDataProvider.prototype._createServiceInstance = function (sServiceName) {
|
|
72
|
-
|
|
74
|
+
const oConfiguration = this.getResolvedConfiguration();
|
|
73
75
|
|
|
74
76
|
this._oDataServicePromise = this._oServiceManager
|
|
75
77
|
.getService(sServiceName)
|
|
76
78
|
.then(function (oDataService) {
|
|
77
79
|
oDataService.attachDataChanged(function (oEvent) {
|
|
78
80
|
this.fireDataChanged({ data: oEvent.data });
|
|
79
|
-
}.bind(this),
|
|
81
|
+
}.bind(this), oConfiguration.service.parameters);
|
|
80
82
|
|
|
81
83
|
return oDataService;
|
|
82
84
|
}.bind(this));
|
|
@@ -87,8 +89,8 @@ sap.ui.define(["sap/ui/integration/util/DataProvider"], function (DataProvider)
|
|
|
87
89
|
* @returns {Promise} A promise resolved when the data is available and rejected in case of an error.
|
|
88
90
|
*/
|
|
89
91
|
ServiceDataProvider.prototype.getData = function () {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
+
const oConfiguration = this.getResolvedConfiguration();
|
|
93
|
+
const oService = oConfiguration.service;
|
|
92
94
|
|
|
93
95
|
return new Promise(function (resolve, reject) {
|
|
94
96
|
if (oService && this._oDataServicePromise) {
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
sap.ui.define([
|
|
8
|
+
"sap/m/Dialog",
|
|
9
|
+
"sap/ui/Device",
|
|
10
|
+
"sap/ui/core/Element",
|
|
11
|
+
"sap/ui/integration/library",
|
|
12
|
+
// jQuery Plugin "firstFocusableDomRef", "lastFocusableDomRef"
|
|
13
|
+
"sap/ui/dom/jquery/Focusable"
|
|
14
|
+
], (
|
|
15
|
+
Dialog,
|
|
16
|
+
Device,
|
|
17
|
+
Element,
|
|
18
|
+
library
|
|
19
|
+
) => {
|
|
20
|
+
"use strict";
|
|
21
|
+
|
|
22
|
+
const CardDataMode = library.CardDataMode;
|
|
23
|
+
|
|
24
|
+
function _addDimensionsDelegate(oDialog, oParentCard, bSetMinSize) {
|
|
25
|
+
const oChildCard = oDialog.getContent()[0];
|
|
26
|
+
let bSetMaxDimensions = true;
|
|
27
|
+
|
|
28
|
+
oChildCard.addEventDelegate({
|
|
29
|
+
onAfterRendering: () => {
|
|
30
|
+
const oChildCardDomRef = oChildCard.getDomRef();
|
|
31
|
+
|
|
32
|
+
if (bSetMinSize) {
|
|
33
|
+
oChildCardDomRef.style.minHeight = oParentCard.getDomRef().offsetHeight + "px";
|
|
34
|
+
oChildCardDomRef.style.minWidth = oParentCard.getDomRef().offsetWidth + "px";
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
if (bSetMaxDimensions) {
|
|
38
|
+
oChildCardDomRef.style.maxHeight = oDialog._getAreaDimensions().height * 70 / 100 + "px";
|
|
39
|
+
oChildCardDomRef.style.maxWidth = oDialog._getAreaDimensions().width * 70 / 100 + "px";
|
|
40
|
+
} else {
|
|
41
|
+
oChildCardDomRef.style.maxHeight = "";
|
|
42
|
+
oChildCardDomRef.style.maxWidth = "";
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
oDialog.addEventDelegate({
|
|
48
|
+
onmousedown: (e) => {
|
|
49
|
+
if (e.target.closest(".sapMDialogResizeHandle")) {
|
|
50
|
+
bSetMaxDimensions = false;
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
onAfterRendering: () => {
|
|
54
|
+
oDialog.getDomRef().style.minHeight = "8.25rem";
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function _addAnimationDelegate(oDialog, oParentCard) {
|
|
60
|
+
const oParentRect = oParentCard.getDomRef().getBoundingClientRect();
|
|
61
|
+
const oParentPos = {
|
|
62
|
+
top: Math.round(oParentRect.top) + window.scrollX,
|
|
63
|
+
left: Math.round(oParentRect.left) + window.scrollX,
|
|
64
|
+
width: Math.round(oParentRect.width),
|
|
65
|
+
height: Math.round(oParentRect.height)
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
oDialog.attachBeforeClose(() => {
|
|
69
|
+
const oDialogRef = oDialog.getDomRef();
|
|
70
|
+
|
|
71
|
+
oDialogRef.classList.add("sapUiIntCardDialogAnimate");
|
|
72
|
+
oDialogRef.style.top = oParentPos.top + "px";
|
|
73
|
+
oDialogRef.style.left = oParentPos.left + "px";
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
oDialog.addEventDelegate({
|
|
77
|
+
onAfterRendering: () => {
|
|
78
|
+
const oDialogRef = oDialog.getDomRef();
|
|
79
|
+
|
|
80
|
+
if (!oDialog.isOpen()) {
|
|
81
|
+
oDialogRef.classList.add("sapUiIntCardDialogAnimate");
|
|
82
|
+
oDialogRef.style.top = oParentPos.top + "px";
|
|
83
|
+
oDialogRef.style.left = oParentPos.left + "px";
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
const fnTransitionEnd = (oEvent) => {
|
|
87
|
+
if (["left", "right"].includes(oEvent.propertyName)) {
|
|
88
|
+
oDialogRef.classList.remove("sapUiIntCardDialogAnimate");
|
|
89
|
+
oDialogRef.removeEventListener("transitionend", fnTransitionEnd);
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
oDialogRef.addEventListener("transitionend", fnTransitionEnd);
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
function _addResizeDelegate(oDialog, oChildCard) {
|
|
99
|
+
const oDelegate = {
|
|
100
|
+
onmousedown: (e) => {
|
|
101
|
+
if (e.target.closest(".sapMDialogResizeHandle")) {
|
|
102
|
+
oChildCard.setHeight("100%");
|
|
103
|
+
oDialog.setContentHeight(oDialog.getDomRef("cont").offsetHeight + "px");
|
|
104
|
+
oDialog.setVerticalScrolling(false);
|
|
105
|
+
oDialog.removeEventDelegate(oDelegate);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
oDialog.addEventDelegate(oDelegate);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
function _openDialog(oChildCard, oParentCard, oParameters, bSetMinSize) {
|
|
114
|
+
oChildCard.setDisplayVariant("Large"); // always use large variant for dialog, scrolling content is possible
|
|
115
|
+
oParentCard.setBusy(true).setBusyIndicatorDelay(750);
|
|
116
|
+
|
|
117
|
+
const oDialog = new Dialog({
|
|
118
|
+
content: [
|
|
119
|
+
oChildCard
|
|
120
|
+
],
|
|
121
|
+
contentWidth: oParameters.width,
|
|
122
|
+
verticalScrolling: false,
|
|
123
|
+
horizontalScrolling: false,
|
|
124
|
+
draggable: true,
|
|
125
|
+
showHeader: false,
|
|
126
|
+
ariaLabelledBy: oChildCard.getId(),
|
|
127
|
+
escapeHandler: function (oPromise) {
|
|
128
|
+
oChildCard.hide();
|
|
129
|
+
oPromise.resolve();
|
|
130
|
+
},
|
|
131
|
+
resizable: oParameters.resizable,
|
|
132
|
+
afterOpen: () => {
|
|
133
|
+
oParentCard.setBusy(false);
|
|
134
|
+
},
|
|
135
|
+
afterClose: () => {
|
|
136
|
+
oDialog.destroy();
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
oDialog.addStyleClass("sapUiIntCardDialog");
|
|
141
|
+
|
|
142
|
+
oParentCard.addDependent(oDialog);
|
|
143
|
+
oChildCard.attachEventOnce("_ready", () => {
|
|
144
|
+
oDialog.open();
|
|
145
|
+
_setFocus(oChildCard, oDialog);
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
if (!Device.system.phone) {
|
|
149
|
+
_addDimensionsDelegate(oDialog, oParentCard, bSetMinSize);
|
|
150
|
+
_addAnimationDelegate(oDialog, oParentCard);
|
|
151
|
+
_addResizeDelegate(oDialog, oChildCard);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
oChildCard.startManifestProcessing();
|
|
155
|
+
|
|
156
|
+
return oDialog;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
function _setFocus(oCard, oDialog) {
|
|
160
|
+
var oFilters = oCard.getAggregation("_filter"),
|
|
161
|
+
oContent = oCard.getAggregation("_content"),
|
|
162
|
+
oFooter = oCard.getAggregation("_footer"),
|
|
163
|
+
oFirstFocusable;
|
|
164
|
+
|
|
165
|
+
oFirstFocusable = oFilters && oFilters.$().firstFocusableDomRef()
|
|
166
|
+
|| oContent && oContent.$().firstFocusableDomRef()
|
|
167
|
+
|| oFooter && oFooter.$().firstFocusableDomRef();
|
|
168
|
+
|
|
169
|
+
if (oFirstFocusable) {
|
|
170
|
+
oDialog.setInitialFocus(oFirstFocusable.id);
|
|
171
|
+
oFirstFocusable.focus();
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
function openCardDialog(oParentCard, oParameters, bSetMinSize = false) {
|
|
176
|
+
let oChildCard;
|
|
177
|
+
|
|
178
|
+
if (oParameters._cardId) {
|
|
179
|
+
oChildCard = Element.getElementById(oParameters._cardId);
|
|
180
|
+
} else {
|
|
181
|
+
oChildCard = oParentCard._createChildCard({
|
|
182
|
+
dataMode: CardDataMode.Active,
|
|
183
|
+
...oParameters
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
return _openDialog(oChildCard, oParentCard, oParameters, bSetMinSize);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
return openCardDialog;
|
|
191
|
+
});
|