@openui5/sap.ui.integration 1.112.2 → 1.113.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 +1 -1
- package/package.json +6 -6
- 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 +27 -3
- package/src/sap/ui/integration/Host.js +31 -8
- package/src/sap/ui/integration/cards/AdaptiveContent.js +30 -40
- package/src/sap/ui/integration/cards/AnalyticalContent.js +14 -5
- package/src/sap/ui/integration/cards/AnalyticsCloudContent.js +18 -7
- package/src/sap/ui/integration/cards/BaseContent.js +113 -41
- package/src/sap/ui/integration/cards/BaseContentRenderer.js +7 -2
- package/src/sap/ui/integration/cards/BaseListContent.js +22 -21
- package/src/sap/ui/integration/cards/CalendarContent.js +5 -12
- package/src/sap/ui/integration/cards/ComponentContent.js +12 -5
- package/src/sap/ui/integration/cards/Footer.js +1 -1
- package/src/sap/ui/integration/cards/Header.js +26 -13
- package/src/sap/ui/integration/cards/ListContent.js +27 -33
- package/src/sap/ui/integration/cards/NumericHeader.js +26 -13
- package/src/sap/ui/integration/cards/ObjectContent.js +29 -14
- package/src/sap/ui/integration/cards/TableContent.js +23 -15
- package/src/sap/ui/integration/cards/TimelineContent.js +11 -10
- package/src/sap/ui/integration/cards/WebPageContent.js +30 -23
- package/src/sap/ui/integration/cards/actions/CardActions.js +1 -1
- package/src/sap/ui/integration/cards/actions/SubmitAction.js +1 -3
- 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 +9 -5
- package/src/sap/ui/integration/cards/filters/DateRangeFilter.js +1 -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 +1 -1
- package/src/sap/ui/integration/cards/filters/SelectFilter.js +1 -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/LinkWithIcon.js +1 -1
- package/src/sap/ui/integration/controls/ListContentItem.js +35 -2
- package/src/sap/ui/integration/controls/ListContentItemRenderer.js +5 -11
- 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 +6 -2
- package/src/sap/ui/integration/controls/Paginator.js +12 -5
- package/src/sap/ui/integration/controls/PaginatorRenderer.js +0 -1
- 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 +38 -119
- package/src/sap/ui/integration/editor/Editor.js +85 -66
- package/src/sap/ui/integration/editor/EditorResourceBundles.js +58 -66
- 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/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 +15 -12
- 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 +3 -5
- package/src/sap/ui/integration/editor/fields/ObjectListField.js +1 -1
- package/src/sap/ui/integration/editor/fields/StringField.js +2 -4
- 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/ShapeSelect.js +1 -1
- package/src/sap/ui/integration/editor/fields/viz/VizBase.js +1 -1
- package/src/sap/ui/integration/library.js +2 -2
- package/src/sap/ui/integration/messagebundle.properties +69 -6
- package/src/sap/ui/integration/messagebundle_ar.properties +46 -4
- package/src/sap/ui/integration/messagebundle_bg.properties +46 -4
- package/src/sap/ui/integration/messagebundle_ca.properties +46 -4
- package/src/sap/ui/integration/messagebundle_cs.properties +46 -4
- package/src/sap/ui/integration/messagebundle_cy.properties +46 -4
- package/src/sap/ui/integration/messagebundle_da.properties +46 -4
- package/src/sap/ui/integration/messagebundle_de.properties +46 -4
- package/src/sap/ui/integration/messagebundle_el.properties +46 -4
- package/src/sap/ui/integration/messagebundle_en.properties +46 -4
- package/src/sap/ui/integration/messagebundle_en_GB.properties +46 -4
- package/src/sap/ui/integration/messagebundle_en_US_sappsd.properties +46 -4
- package/src/sap/ui/integration/messagebundle_en_US_saprigi.properties +45 -3
- package/src/sap/ui/integration/messagebundle_en_US_saptrc.properties +47 -5
- package/src/sap/ui/integration/messagebundle_es.properties +46 -4
- package/src/sap/ui/integration/messagebundle_es_MX.properties +46 -4
- package/src/sap/ui/integration/messagebundle_et.properties +46 -4
- package/src/sap/ui/integration/messagebundle_fi.properties +46 -4
- package/src/sap/ui/integration/messagebundle_fr.properties +43 -1
- package/src/sap/ui/integration/messagebundle_fr_CA.properties +43 -1
- package/src/sap/ui/integration/messagebundle_hi.properties +46 -4
- package/src/sap/ui/integration/messagebundle_hr.properties +46 -4
- package/src/sap/ui/integration/messagebundle_hu.properties +46 -4
- package/src/sap/ui/integration/messagebundle_id.properties +46 -4
- package/src/sap/ui/integration/messagebundle_it.properties +46 -4
- package/src/sap/ui/integration/messagebundle_iw.properties +46 -4
- package/src/sap/ui/integration/messagebundle_ja.properties +46 -4
- package/src/sap/ui/integration/messagebundle_kk.properties +46 -4
- package/src/sap/ui/integration/messagebundle_ko.properties +43 -1
- package/src/sap/ui/integration/messagebundle_lt.properties +46 -4
- package/src/sap/ui/integration/messagebundle_lv.properties +46 -4
- package/src/sap/ui/integration/messagebundle_ms.properties +46 -4
- package/src/sap/ui/integration/messagebundle_nl.properties +46 -4
- package/src/sap/ui/integration/messagebundle_no.properties +46 -4
- package/src/sap/ui/integration/messagebundle_pl.properties +46 -4
- package/src/sap/ui/integration/messagebundle_pt.properties +46 -4
- package/src/sap/ui/integration/messagebundle_pt_PT.properties +46 -4
- package/src/sap/ui/integration/messagebundle_ro.properties +46 -4
- package/src/sap/ui/integration/messagebundle_ru.properties +46 -4
- package/src/sap/ui/integration/messagebundle_sh.properties +46 -4
- package/src/sap/ui/integration/messagebundle_sk.properties +46 -4
- package/src/sap/ui/integration/messagebundle_sl.properties +46 -4
- package/src/sap/ui/integration/messagebundle_sv.properties +46 -4
- package/src/sap/ui/integration/messagebundle_th.properties +43 -1
- package/src/sap/ui/integration/messagebundle_tr.properties +46 -4
- package/src/sap/ui/integration/messagebundle_uk.properties +48 -6
- package/src/sap/ui/integration/messagebundle_vi.properties +46 -4
- package/src/sap/ui/integration/messagebundle_zh_CN.properties +46 -4
- package/src/sap/ui/integration/messagebundle_zh_TW.properties +46 -4
- package/src/sap/ui/integration/model/ContextModel.js +1 -1
- package/src/sap/ui/integration/model/ObservableModel.js +1 -1
- package/src/sap/ui/integration/model/PagingModelListBinding.js +1 -1
- package/src/sap/ui/integration/schemas/sap-card.json +51 -3
- package/src/sap/ui/integration/themes/base/Card.less +1 -1
- package/src/sap/ui/integration/themes/base/ListContentItem.less +4 -27
- package/src/sap/ui/integration/themes/base/ObjectStatusIcons.less +4 -6
- 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 +3 -3
- package/src/sap/ui/integration/util/CardObserver.js +2 -2
- package/src/sap/ui/integration/util/ContentFactory.js +15 -7
- package/src/sap/ui/integration/util/CsrfTokenHandler.js +7 -7
- package/src/sap/ui/integration/util/DataProvider.js +8 -3
- package/src/sap/ui/integration/util/DataProviderFactory.js +1 -1
- package/src/sap/ui/integration/util/Destinations.js +1 -1
- package/src/sap/ui/integration/util/ErrorHandler.js +297 -0
- package/src/sap/ui/integration/util/ExtensionDataProvider.js +1 -1
- package/src/sap/ui/integration/util/Form.js +11 -6
- package/src/sap/ui/integration/util/HeaderFactory.js +4 -3
- package/src/sap/ui/integration/util/JSONBindingHelper.js +1 -1
- package/src/sap/ui/integration/util/LoadingProvider.js +2 -18
- package/src/sap/ui/integration/util/Manifest.js +1 -1
- package/src/sap/ui/integration/util/RequestDataProvider.js +163 -77
- package/src/sap/ui/integration/util/ServiceDataProvider.js +1 -1
- package/src/sap/ui/integration/util/ServiceManager.js +1 -1
- package/src/sap/ui/integration/util/SkeletonCard.js +19 -2
- 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/widgets/Card.js +95 -127
package/THIRDPARTY.txt
CHANGED
|
@@ -478,7 +478,7 @@ License: Apache-2.0
|
|
|
478
478
|
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
|
|
479
479
|
Contained in: lib/jsdoc/ui5/plugin.js
|
|
480
480
|
|
|
481
|
-
Component: SAP Theming Base Content, version: 11.1
|
|
481
|
+
Component: SAP Theming Base Content, version: 11.2.1
|
|
482
482
|
Copyright: SAP SE or an SAP affiliate company and Theming Base Content contributors
|
|
483
483
|
License: Apache-2.0
|
|
484
484
|
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/Apache-2.0.txt
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openui5/sap.ui.integration",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.113.0",
|
|
4
4
|
"description": "OpenUI5 UI Library sap.ui.integration",
|
|
5
5
|
"author": "SAP SE (https://www.sap.com)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
"url": "https://github.com/SAP/openui5.git"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@openui5/sap.ui.core": "1.
|
|
18
|
-
"@openui5/sap.f": "1.
|
|
19
|
-
"@openui5/sap.m": "1.
|
|
20
|
-
"@openui5/sap.ui.unified": "1.
|
|
21
|
-
"@openui5/sap.ui.layout": "1.
|
|
17
|
+
"@openui5/sap.ui.core": "1.113.0",
|
|
18
|
+
"@openui5/sap.f": "1.113.0",
|
|
19
|
+
"@openui5/sap.m": "1.113.0",
|
|
20
|
+
"@openui5/sap.ui.unified": "1.113.0",
|
|
21
|
+
"@openui5/sap.ui.layout": "1.113.0"
|
|
22
22
|
}
|
|
23
23
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<copyright>OpenUI5
|
|
7
7
|
* (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
|
|
8
8
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.</copyright>
|
|
9
|
-
<version>1.
|
|
9
|
+
<version>1.113.0</version>
|
|
10
10
|
|
|
11
11
|
<documentation>SAPUI5 library with integration-related controls.</documentation>
|
|
12
12
|
|
|
@@ -6,10 +6,12 @@
|
|
|
6
6
|
sap.ui.define([
|
|
7
7
|
"sap/ui/integration/library",
|
|
8
8
|
"sap/base/Log",
|
|
9
|
-
"sap/ui/base/ManagedObject"
|
|
9
|
+
"sap/ui/base/ManagedObject",
|
|
10
|
+
"sap/base/util/fetch"
|
|
10
11
|
], function (library,
|
|
11
12
|
Log,
|
|
12
|
-
ManagedObject
|
|
13
|
+
ManagedObject,
|
|
14
|
+
fetch) {
|
|
13
15
|
"use strict";
|
|
14
16
|
|
|
15
17
|
/**
|
|
@@ -24,7 +26,7 @@ sap.ui.define([
|
|
|
24
26
|
* @extends sap.ui.base.ManagedObject
|
|
25
27
|
*
|
|
26
28
|
* @author SAP SE
|
|
27
|
-
* @version 1.
|
|
29
|
+
* @version 1.113.0
|
|
28
30
|
*
|
|
29
31
|
* @constructor
|
|
30
32
|
* @public
|
|
@@ -194,6 +196,28 @@ sap.ui.define([
|
|
|
194
196
|
return this._oCardInterface;
|
|
195
197
|
};
|
|
196
198
|
|
|
199
|
+
/**
|
|
200
|
+
* Starts the process of fetching a resource from the network, returning a promise that is fulfilled once the response is available.
|
|
201
|
+
* Use this method to override the default behavior when fetching network resources.
|
|
202
|
+
* Mimics the browser native Fetch API.
|
|
203
|
+
* @public
|
|
204
|
+
* @experimental Since 1.113. The API might change.
|
|
205
|
+
* @param {string} sResource This defines the resource that you wish to fetch.
|
|
206
|
+
* @param {object} mOptions An object containing any custom settings that you want to apply to the request.
|
|
207
|
+
* @param {object} mRequestSettings The map of request settings defined in the card manifest. Use this only for reading, they can not be modified.
|
|
208
|
+
* @returns {Promise<Response>} A <code>Promise</code> that resolves to a <code>Response</code> object.
|
|
209
|
+
*/
|
|
210
|
+
Extension.prototype.fetch = function (sResource, mOptions, mRequestSettings) {
|
|
211
|
+
var oCard = this._oCard,
|
|
212
|
+
oHost = this._oCard.getHostInstance();
|
|
213
|
+
|
|
214
|
+
if (oHost) {
|
|
215
|
+
return oHost.fetch(sResource, mOptions, mRequestSettings, oCard);
|
|
216
|
+
} else {
|
|
217
|
+
return fetch(sResource, mOptions);
|
|
218
|
+
}
|
|
219
|
+
};
|
|
220
|
+
|
|
197
221
|
/**
|
|
198
222
|
* Sets the card.
|
|
199
223
|
*
|
|
@@ -6,10 +6,14 @@
|
|
|
6
6
|
sap.ui.define([
|
|
7
7
|
"sap/ui/integration/library",
|
|
8
8
|
"sap/ui/core/Element",
|
|
9
|
-
"sap/ui/core/Configuration"
|
|
9
|
+
"sap/ui/core/Configuration",
|
|
10
|
+
"sap/base/util/fetch",
|
|
11
|
+
"sap/base/Log"
|
|
10
12
|
], function (library,
|
|
11
13
|
Element,
|
|
12
|
-
Configuration
|
|
14
|
+
Configuration,
|
|
15
|
+
fetch,
|
|
16
|
+
Log) {
|
|
13
17
|
"use strict";
|
|
14
18
|
/*global navigator, URL*/
|
|
15
19
|
|
|
@@ -27,7 +31,7 @@ sap.ui.define([
|
|
|
27
31
|
* @extends sap.ui.core.Element
|
|
28
32
|
*
|
|
29
33
|
* @author SAP SE
|
|
30
|
-
* @version 1.
|
|
34
|
+
* @version 1.113.0
|
|
31
35
|
*
|
|
32
36
|
* @constructor
|
|
33
37
|
* @public
|
|
@@ -141,8 +145,8 @@ sap.ui.define([
|
|
|
141
145
|
* Example:
|
|
142
146
|
* <pre>
|
|
143
147
|
* {
|
|
144
|
-
*
|
|
145
|
-
*
|
|
148
|
+
* "/sap.card/configuration/filters/shipper/value": "key3",
|
|
149
|
+
* "/sap.card/configuration/filters/item/value": "key2"
|
|
146
150
|
* }
|
|
147
151
|
* </pre>
|
|
148
152
|
*/
|
|
@@ -403,7 +407,7 @@ sap.ui.define([
|
|
|
403
407
|
* @returns {map} Map of http headers.
|
|
404
408
|
* @private
|
|
405
409
|
* @ui5-restricted
|
|
406
|
-
* @
|
|
410
|
+
* @deprecated Since 1.113 Use Host.prototype.fetch instead.
|
|
407
411
|
*/
|
|
408
412
|
Host.prototype.modifyRequestHeaders = function (mHeaders, mSettings, oCard) {
|
|
409
413
|
if (this.bUseExperimentalCaching) {
|
|
@@ -416,13 +420,15 @@ sap.ui.define([
|
|
|
416
420
|
/**
|
|
417
421
|
* Modifies the card HTTP data request before sending.
|
|
418
422
|
* Override if you need to change the default data request behavior.
|
|
419
|
-
* @param {map} mRequest The current request.
|
|
423
|
+
* @param {map} mRequest The current request.
|
|
424
|
+
* @param {string} mRequest.url The request url.
|
|
425
|
+
* @param {object} mRequest.options The request options in the same format as for the native Request object.
|
|
420
426
|
* @param {map} mSettings The map of request settings defined in the card manifest.
|
|
421
427
|
* @param {sap.ui.integration.widgets.Card} [oCard] Optional. The card for which the request is made.
|
|
422
428
|
* @returns {map} The modified request.
|
|
423
429
|
* @private
|
|
424
430
|
* @ui5-restricted
|
|
425
|
-
|
|
431
|
+
* @deprecated Since 1.113 Use Host.prototype.fetch instead.
|
|
426
432
|
*/
|
|
427
433
|
Host.prototype.modifyRequest = function (mRequest, mSettings, oCard) {
|
|
428
434
|
var oUrl;
|
|
@@ -438,6 +444,23 @@ sap.ui.define([
|
|
|
438
444
|
return mRequest;
|
|
439
445
|
};
|
|
440
446
|
|
|
447
|
+
/**
|
|
448
|
+
* Starts the process of fetching a resource from the network, returning a promise that is fulfilled once the response is available.
|
|
449
|
+
* Use this method to override the default behavior when fetching network resources.
|
|
450
|
+
* Mimics the browser native Fetch API.
|
|
451
|
+
* @private
|
|
452
|
+
* @ui5-restricted
|
|
453
|
+
* @experimental Since 1.113. The API might change.
|
|
454
|
+
* @param {string} sResource This defines the resource that you wish to fetch.
|
|
455
|
+
* @param {object} mOptions An object containing any custom settings that you want to apply to the request.
|
|
456
|
+
* @param {object} mRequestSettings The map of request settings defined in the card manifest. Use this only for reading, they can not be modified.
|
|
457
|
+
* @param {sap.ui.integration.widgets.Card} oCard The card which initiated the request.
|
|
458
|
+
* @returns {Promise<Response>} A <code>Promise</code> that resolves to a <code>Response</code> object.
|
|
459
|
+
*/
|
|
460
|
+
Host.prototype.fetch = function (sResource, mOptions, mRequestSettings, oCard) {
|
|
461
|
+
return fetch(sResource, mOptions);
|
|
462
|
+
};
|
|
463
|
+
|
|
441
464
|
/**
|
|
442
465
|
* @private
|
|
443
466
|
* @param {map} mHeaders The current map of headers.
|
|
@@ -37,7 +37,7 @@ sap.ui.define([
|
|
|
37
37
|
* @extends sap.ui.integration.cards.BaseContent
|
|
38
38
|
*
|
|
39
39
|
* @author SAP SE
|
|
40
|
-
* @version 1.
|
|
40
|
+
* @version 1.113.0
|
|
41
41
|
*
|
|
42
42
|
* @constructor
|
|
43
43
|
* @private
|
|
@@ -61,23 +61,22 @@ sap.ui.define([
|
|
|
61
61
|
AdaptiveContent.prototype.init = function () {
|
|
62
62
|
BaseContent.prototype.init.apply(this, arguments);
|
|
63
63
|
|
|
64
|
+
this.awaitEvent("_adaptiveCardElementsReady");
|
|
64
65
|
//workaround until actions refactor
|
|
65
66
|
this.fireEvent("_actionContentReady"); // todo
|
|
66
67
|
this.setComponentsReady(false);
|
|
67
|
-
this._bAdaptiveCardElementsReady = false;
|
|
68
68
|
this._setupCardContent();
|
|
69
69
|
};
|
|
70
70
|
|
|
71
71
|
AdaptiveContent.prototype.onAfterRendering = function () {
|
|
72
|
-
this._renderMSCardContent(this._oCardTemplate || this.
|
|
72
|
+
this._renderMSCardContent(this._oCardTemplate || this.getConfiguration());
|
|
73
73
|
};
|
|
74
74
|
|
|
75
75
|
/**
|
|
76
76
|
* @override
|
|
77
77
|
*/
|
|
78
78
|
AdaptiveContent.prototype.loadDependencies = function (oCardManifest) {
|
|
79
|
-
this._loadWebcomponents();
|
|
80
|
-
var aPromises = [];
|
|
79
|
+
var aPromises = [this._loadWebcomponents()];
|
|
81
80
|
|
|
82
81
|
// load adaptivecards and modules that depend on it here
|
|
83
82
|
aPromises.push(new Promise(function (resolve, reject) {
|
|
@@ -147,13 +146,10 @@ sap.ui.define([
|
|
|
147
146
|
};
|
|
148
147
|
|
|
149
148
|
/**
|
|
150
|
-
*
|
|
151
|
-
*
|
|
152
|
-
* @public
|
|
153
|
-
* @param {Object} oConfiguration Configuration object used to create Adaptive card.
|
|
149
|
+
* @override
|
|
154
150
|
*/
|
|
155
|
-
AdaptiveContent.prototype.
|
|
156
|
-
|
|
151
|
+
AdaptiveContent.prototype.applyConfiguration = function () {
|
|
152
|
+
var oConfiguration = this.getConfiguration();
|
|
157
153
|
|
|
158
154
|
// if oConfiguration.request is present, load the adaptive card manifest from url
|
|
159
155
|
if (oConfiguration && oConfiguration.request && oConfiguration.request.url) {
|
|
@@ -165,10 +161,6 @@ sap.ui.define([
|
|
|
165
161
|
this._setupMSCardContent();
|
|
166
162
|
};
|
|
167
163
|
|
|
168
|
-
AdaptiveContent.prototype.getConfiguration = function () {
|
|
169
|
-
return this._oCardConfig;
|
|
170
|
-
};
|
|
171
|
-
|
|
172
164
|
AdaptiveContent.prototype.onThemeChanged = function () {
|
|
173
165
|
if (this.getDomRef() && AdaptiveCards) {
|
|
174
166
|
this._adjustHostConfig();
|
|
@@ -210,7 +202,7 @@ sap.ui.define([
|
|
|
210
202
|
oData.loadData(sUrl)
|
|
211
203
|
.then(function () {
|
|
212
204
|
// set the data from the url as a card config
|
|
213
|
-
that.
|
|
205
|
+
that.setConfiguration(Object.assign(that.getConfiguration(), oData.getData()));
|
|
214
206
|
}).then(function () {
|
|
215
207
|
that._handleMarkDown();
|
|
216
208
|
that._setupMSCardContent();
|
|
@@ -219,9 +211,12 @@ sap.ui.define([
|
|
|
219
211
|
oData.destroy();
|
|
220
212
|
oData = null;
|
|
221
213
|
}).catch(function () {
|
|
214
|
+
this.fireEvent("_dataReady");
|
|
215
|
+
this.fireEvent("_adaptiveCardElementsReady");
|
|
216
|
+
|
|
222
217
|
// notify the user that the provided URL is not correct
|
|
223
218
|
Log.error("No JSON file found on this URL. Please provide a correct path to the JSON-serialized card object model file.");
|
|
224
|
-
});
|
|
219
|
+
}.bind(this));
|
|
225
220
|
};
|
|
226
221
|
|
|
227
222
|
/**
|
|
@@ -358,7 +353,7 @@ sap.ui.define([
|
|
|
358
353
|
* @private
|
|
359
354
|
*/
|
|
360
355
|
AdaptiveContent.prototype._setupMSCardContent = function () {
|
|
361
|
-
var oConfiguration = this.
|
|
356
|
+
var oConfiguration = this.getConfiguration(),
|
|
362
357
|
oContentTemplateData,
|
|
363
358
|
oCardDataProvider = this._oCardDataProvider;
|
|
364
359
|
|
|
@@ -398,9 +393,8 @@ sap.ui.define([
|
|
|
398
393
|
oData = this.getModel().getProperty(sPath);
|
|
399
394
|
|
|
400
395
|
// Аttaches the data with the card template
|
|
401
|
-
this._oCardTemplate = this._setTemplating(this.
|
|
402
|
-
|
|
403
|
-
this.getAggregation("_loadingProvider").setLoading(false);
|
|
396
|
+
this._oCardTemplate = this._setTemplating(this.getConfiguration(), oData);
|
|
397
|
+
|
|
404
398
|
// Re-renders the card with the new data
|
|
405
399
|
this.invalidate();
|
|
406
400
|
};
|
|
@@ -422,8 +416,8 @@ sap.ui.define([
|
|
|
422
416
|
if (this.adaptiveCardInstance && oCard && oDom.length) {
|
|
423
417
|
this.adaptiveCardInstance.parse(oCard);
|
|
424
418
|
oDom.html(this.adaptiveCardInstance.render());
|
|
425
|
-
|
|
426
|
-
this.
|
|
419
|
+
|
|
420
|
+
this.fireEvent("_adaptiveCardElementsReady");
|
|
427
421
|
|
|
428
422
|
// avoid additional tab stop
|
|
429
423
|
if (this.adaptiveCardInstance.renderedElement) {
|
|
@@ -432,13 +426,6 @@ sap.ui.define([
|
|
|
432
426
|
}
|
|
433
427
|
};
|
|
434
428
|
|
|
435
|
-
AdaptiveContent.prototype._fireCardReadyEvent = function () {
|
|
436
|
-
if (this._bAdaptiveCardElementsReady && this.getComponentsReady()) {
|
|
437
|
-
this._bReady = true;
|
|
438
|
-
this.fireReady();
|
|
439
|
-
}
|
|
440
|
-
};
|
|
441
|
-
|
|
442
429
|
/**
|
|
443
430
|
* Connects the template object with the data.
|
|
444
431
|
*
|
|
@@ -468,24 +455,27 @@ sap.ui.define([
|
|
|
468
455
|
AdaptiveContent.prototype._loadWebcomponents = function () {
|
|
469
456
|
if (this.getComponentsReady()) {
|
|
470
457
|
Log.debug("WebComponents were already loaded");
|
|
471
|
-
this._fireCardReadyEvent();
|
|
472
458
|
|
|
473
|
-
return;
|
|
459
|
+
return Promise.resolve();
|
|
474
460
|
}
|
|
475
461
|
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
462
|
+
return new Promise(function (resolve, reject) {
|
|
463
|
+
// Thе timeout is needed to delay the check if UI5 WebComponents gets loaded from elsewhere.
|
|
464
|
+
// This detection relies on the assumption that there's the full bundle and the ui5-button is present.
|
|
465
|
+
setTimeout(function(){
|
|
466
|
+
if (window.customElements.get("ui5-button")) {
|
|
467
|
+
resolve();
|
|
468
|
+
return;
|
|
469
|
+
}
|
|
470
|
+
|
|
480
471
|
includeScript({
|
|
481
472
|
id: "webcomponents-bundle",
|
|
482
473
|
attributes: {type: "module"},
|
|
483
474
|
url: sap.ui.require.toUrl("sap/ui/integration/thirdparty/webcomponents/bundle.esm.js")
|
|
484
|
-
});
|
|
485
|
-
}
|
|
486
|
-
|
|
475
|
+
}).then(resolve);
|
|
476
|
+
});
|
|
477
|
+
}).then(function () {
|
|
487
478
|
this.setComponentsReady(true);
|
|
488
|
-
this._fireCardReadyEvent();
|
|
489
479
|
}.bind(this));
|
|
490
480
|
};
|
|
491
481
|
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
sap.ui.define([
|
|
7
7
|
"./AnalyticalContentRenderer",
|
|
8
8
|
"./BaseContent",
|
|
9
|
+
"sap/m/IllustratedMessageType",
|
|
9
10
|
"sap/ui/integration/library",
|
|
10
11
|
"sap/ui/integration/util/BindingResolver",
|
|
11
12
|
"sap/base/Log",
|
|
@@ -14,6 +15,7 @@ sap.ui.define([
|
|
|
14
15
|
], function (
|
|
15
16
|
AnalyticalContentRenderer,
|
|
16
17
|
BaseContent,
|
|
18
|
+
IllustratedMessageType,
|
|
17
19
|
library,
|
|
18
20
|
BindingResolver,
|
|
19
21
|
Log,
|
|
@@ -88,7 +90,7 @@ sap.ui.define([
|
|
|
88
90
|
* @extends sap.ui.integration.cards.BaseContent
|
|
89
91
|
*
|
|
90
92
|
* @author SAP SE
|
|
91
|
-
* @version 1.
|
|
93
|
+
* @version 1.113.0
|
|
92
94
|
*
|
|
93
95
|
* @constructor
|
|
94
96
|
* @private
|
|
@@ -146,15 +148,22 @@ sap.ui.define([
|
|
|
146
148
|
AnalyticalContent.prototype.onDataChanged = function () {
|
|
147
149
|
this._createChart();
|
|
148
150
|
var oChart = this.getAggregation("_content");
|
|
151
|
+
|
|
149
152
|
if (oChart) {
|
|
150
153
|
var vizDS = oChart._getVizDataset(),
|
|
151
|
-
|
|
154
|
+
bHasData = vizDS
|
|
152
155
|
&& vizDS._FlatTableD
|
|
153
156
|
&& vizDS._FlatTableD._data
|
|
154
157
|
&& Array.isArray(vizDS._FlatTableD._data)
|
|
155
|
-
&&
|
|
156
|
-
|
|
157
|
-
|
|
158
|
+
&& vizDS._FlatTableD._data.length;
|
|
159
|
+
|
|
160
|
+
if (bHasData) {
|
|
161
|
+
this.destroyAggregation("_noDataMessage");
|
|
162
|
+
} else {
|
|
163
|
+
this.showNoDataMessage({
|
|
164
|
+
type: IllustratedMessageType.NoEntries,
|
|
165
|
+
title: this.getCardInstance().getTranslatedText("CARD_NO_ITEMS_ERROR_LISTS")
|
|
166
|
+
});
|
|
158
167
|
}
|
|
159
168
|
}
|
|
160
169
|
};
|
|
@@ -10,8 +10,16 @@ sap.ui.define([
|
|
|
10
10
|
"sap/ui/integration/library",
|
|
11
11
|
"sap/ui/core/HTML",
|
|
12
12
|
"sap/ui/integration/util/BindingResolver",
|
|
13
|
+
"sap/m/IllustratedMessageType",
|
|
13
14
|
"sap/base/Log"
|
|
14
|
-
], function (
|
|
15
|
+
], function (
|
|
16
|
+
AnalyticsCloudContentRenderer,
|
|
17
|
+
BaseContent,
|
|
18
|
+
library,
|
|
19
|
+
HTML,
|
|
20
|
+
BindingResolver,
|
|
21
|
+
IllustratedMessageType,
|
|
22
|
+
Log) {
|
|
15
23
|
"use strict";
|
|
16
24
|
|
|
17
25
|
var ActionArea = library.CardActionArea;
|
|
@@ -30,7 +38,7 @@ sap.ui.define([
|
|
|
30
38
|
* @extends sap.ui.integration.cards.BaseContent
|
|
31
39
|
*
|
|
32
40
|
* @author SAP SE
|
|
33
|
-
* @version 1.
|
|
41
|
+
* @version 1.113.0
|
|
34
42
|
*
|
|
35
43
|
* @constructor
|
|
36
44
|
* @private
|
|
@@ -83,11 +91,10 @@ sap.ui.define([
|
|
|
83
91
|
};
|
|
84
92
|
|
|
85
93
|
/**
|
|
86
|
-
* @
|
|
94
|
+
* @override
|
|
87
95
|
*/
|
|
88
|
-
AnalyticsCloudContent.prototype.
|
|
89
|
-
|
|
90
|
-
oConfiguration = this.getParsedConfiguration();
|
|
96
|
+
AnalyticsCloudContent.prototype.applyConfiguration = function () {
|
|
97
|
+
var oConfiguration = this.getParsedConfiguration();
|
|
91
98
|
|
|
92
99
|
//workaround until actions refactor
|
|
93
100
|
this.fireEvent("_actionContentReady");
|
|
@@ -145,7 +152,11 @@ sap.ui.define([
|
|
|
145
152
|
|
|
146
153
|
// is Highcharts library available
|
|
147
154
|
if (!window.Highcharts) {
|
|
148
|
-
this.handleError(
|
|
155
|
+
this.handleError({
|
|
156
|
+
type: IllustratedMessageType.ErrorScreen,
|
|
157
|
+
title: oCard.getTranslatedText("CARD_DATA_LOAD_ERROR"),
|
|
158
|
+
description: oCard.getTranslatedText("CARD_ERROR_HIGHCHARTS_DESCRIPTION")
|
|
159
|
+
});
|
|
149
160
|
return;
|
|
150
161
|
}
|
|
151
162
|
|