@openui5/sap.ui.integration 1.112.0 → 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
|
@@ -9,6 +9,8 @@ sap.ui.define([
|
|
|
9
9
|
"sap/m/MessageStrip",
|
|
10
10
|
"sap/m/VBox",
|
|
11
11
|
"sap/m/library",
|
|
12
|
+
"sap/m/IllustratedMessageType",
|
|
13
|
+
"sap/m/IllustratedMessageSize",
|
|
12
14
|
"sap/ui/core/Core",
|
|
13
15
|
"sap/ui/core/Control",
|
|
14
16
|
"sap/ui/core/InvisibleMessage",
|
|
@@ -25,6 +27,8 @@ sap.ui.define([
|
|
|
25
27
|
MessageStrip,
|
|
26
28
|
VBox,
|
|
27
29
|
mLibrary,
|
|
30
|
+
IllustratedMessageType,
|
|
31
|
+
IllustratedMessageSize,
|
|
28
32
|
Core,
|
|
29
33
|
Control,
|
|
30
34
|
InvisibleMessage,
|
|
@@ -57,7 +61,7 @@ sap.ui.define([
|
|
|
57
61
|
* @extends sap.ui.core.Control
|
|
58
62
|
*
|
|
59
63
|
* @author SAP SE
|
|
60
|
-
* @version 1.
|
|
64
|
+
* @version 1.113.0
|
|
61
65
|
*
|
|
62
66
|
* @constructor
|
|
63
67
|
* @private
|
|
@@ -77,6 +81,20 @@ sap.ui.define([
|
|
|
77
81
|
type: "sap.ui.integration.CardDesign",
|
|
78
82
|
group: "Appearance",
|
|
79
83
|
defaultValue: CardDesign.Solid
|
|
84
|
+
},
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Content configuration from the manifest
|
|
88
|
+
*/
|
|
89
|
+
configuration: {
|
|
90
|
+
type: "object"
|
|
91
|
+
},
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* No data configuration from the manifest
|
|
95
|
+
*/
|
|
96
|
+
noDataConfiguration: {
|
|
97
|
+
type: "object"
|
|
80
98
|
}
|
|
81
99
|
},
|
|
82
100
|
aggregations: {
|
|
@@ -111,6 +129,12 @@ sap.ui.define([
|
|
|
111
129
|
type: "sap.m.VBox",
|
|
112
130
|
multiple: false,
|
|
113
131
|
visibility: "hidden"
|
|
132
|
+
},
|
|
133
|
+
|
|
134
|
+
_noDataMessage: {
|
|
135
|
+
type: "sap.ui.core.Control",
|
|
136
|
+
multiple: false,
|
|
137
|
+
visibility: "hidden"
|
|
114
138
|
}
|
|
115
139
|
},
|
|
116
140
|
associations: {
|
|
@@ -212,6 +236,13 @@ sap.ui.define([
|
|
|
212
236
|
return Promise.resolve();
|
|
213
237
|
};
|
|
214
238
|
|
|
239
|
+
/**
|
|
240
|
+
* Called after the dependencies are loaded and it's safe to apply the configuration.
|
|
241
|
+
* To be implemented by subclasses.
|
|
242
|
+
* @abstract
|
|
243
|
+
*/
|
|
244
|
+
BaseContent.prototype.applyConfiguration = function () { };
|
|
245
|
+
|
|
215
246
|
BaseContent.prototype.setLoadDependenciesPromise = function (oPromise) {
|
|
216
247
|
this._pLoadDependencies = oPromise;
|
|
217
248
|
this.awaitEvent("_loadDependencies");
|
|
@@ -248,7 +279,7 @@ sap.ui.define([
|
|
|
248
279
|
|
|
249
280
|
this._bReady = false;
|
|
250
281
|
this._oAwaitedEvents.add(sEvent);
|
|
251
|
-
this.showLoadingPlaceholders();
|
|
282
|
+
this.showLoadingPlaceholders(true);
|
|
252
283
|
this.attachEventOnce(sEvent, function () {
|
|
253
284
|
this._oAwaitedEvents.delete(sEvent);
|
|
254
285
|
|
|
@@ -260,25 +291,6 @@ sap.ui.define([
|
|
|
260
291
|
}.bind(this));
|
|
261
292
|
};
|
|
262
293
|
|
|
263
|
-
/**
|
|
264
|
-
* @public
|
|
265
|
-
* @param {object} oConfiguration Content configuration from the manifest
|
|
266
|
-
* @returns {this} Pointer to the control instance to allow method chaining
|
|
267
|
-
*/
|
|
268
|
-
BaseContent.prototype.setConfiguration = function (oConfiguration) {
|
|
269
|
-
this._oConfiguration = oConfiguration;
|
|
270
|
-
|
|
271
|
-
if (!oConfiguration) {
|
|
272
|
-
return this;
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
return this;
|
|
276
|
-
};
|
|
277
|
-
|
|
278
|
-
BaseContent.prototype.getConfiguration = function () {
|
|
279
|
-
return this._oConfiguration;
|
|
280
|
-
};
|
|
281
|
-
|
|
282
294
|
/**
|
|
283
295
|
* Parses the configuration. As binding infos are modified when used once,
|
|
284
296
|
* new object is returned every time.
|
|
@@ -286,7 +298,7 @@ sap.ui.define([
|
|
|
286
298
|
* @returns {object} Parsed configuration - with binding infos
|
|
287
299
|
*/
|
|
288
300
|
BaseContent.prototype.getParsedConfiguration = function () {
|
|
289
|
-
var oResult = merge({}, this.
|
|
301
|
+
var oResult = merge({}, this.getConfiguration()),
|
|
290
302
|
oDataSettings = oResult.data;
|
|
291
303
|
|
|
292
304
|
// do not create binding info for data
|
|
@@ -339,6 +351,31 @@ sap.ui.define([
|
|
|
339
351
|
}
|
|
340
352
|
};
|
|
341
353
|
|
|
354
|
+
/**
|
|
355
|
+
* @protected
|
|
356
|
+
* @param {object} oSettings 'No Data' settings
|
|
357
|
+
* @param {sap.m.IllustratedMessageType} oSettings.type Illustration type
|
|
358
|
+
* @param {sap.m.IllustratedMessageSize} [oSettings.illustrationSize=sap.m.IllustratedMessageSize.Auto] Illustration size
|
|
359
|
+
* @param {string} oSettings.title Title
|
|
360
|
+
* @param {string} [oSettings.description] Description
|
|
361
|
+
*/
|
|
362
|
+
BaseContent.prototype.showNoDataMessage = function (oSettings) {
|
|
363
|
+
this.destroyAggregation("_noDataMessage");
|
|
364
|
+
var oNoDataConfiguration = this.getNoDataConfiguration() || {};
|
|
365
|
+
|
|
366
|
+
var oIllustrationSettings = {
|
|
367
|
+
type: IllustratedMessageType[oNoDataConfiguration.type] || oSettings.type,
|
|
368
|
+
size: IllustratedMessageSize[oNoDataConfiguration.size] || oSettings.size,
|
|
369
|
+
title: oNoDataConfiguration.title || oSettings.title,
|
|
370
|
+
description: oNoDataConfiguration.description || oSettings.description
|
|
371
|
+
};
|
|
372
|
+
|
|
373
|
+
var oIllustratedMessage = this.getCardInstance()._oErrorHandler.getIllustratedMessage(oIllustrationSettings, true);
|
|
374
|
+
oIllustratedMessage.addStyleClass("sapFCardContentNoDataMsg");
|
|
375
|
+
|
|
376
|
+
this.setAggregation("_noDataMessage", oIllustratedMessage);
|
|
377
|
+
};
|
|
378
|
+
|
|
342
379
|
/**
|
|
343
380
|
* Requests data and bind it to the item template.
|
|
344
381
|
*
|
|
@@ -364,7 +401,6 @@ sap.ui.define([
|
|
|
364
401
|
}
|
|
365
402
|
|
|
366
403
|
this._oDataProvider = this._oDataProviderFactory.create(oDataSettings, this._oServiceManager);
|
|
367
|
-
this.getAggregation("_loadingProvider").setDataProvider(this._oDataProvider);
|
|
368
404
|
|
|
369
405
|
if (oDataSettings.name) {
|
|
370
406
|
oModel = oCard.getModel(oDataSettings.name);
|
|
@@ -404,7 +440,10 @@ sap.ui.define([
|
|
|
404
440
|
}.bind(this));
|
|
405
441
|
|
|
406
442
|
this._oDataProvider.attachError(function (oEvent) {
|
|
407
|
-
this.handleError(
|
|
443
|
+
this.handleError({
|
|
444
|
+
requestErrorParams: oEvent.getParameters(),
|
|
445
|
+
requestSettings: this._oDataProvider.getSettings()
|
|
446
|
+
});
|
|
408
447
|
this.onDataRequestComplete();
|
|
409
448
|
}.bind(this));
|
|
410
449
|
|
|
@@ -445,16 +484,17 @@ sap.ui.define([
|
|
|
445
484
|
|
|
446
485
|
/**
|
|
447
486
|
* @private
|
|
487
|
+
* @param {boolean} [bForce] Show the loading placeholders regardless of the data provider type
|
|
448
488
|
* @ui5-restricted
|
|
449
489
|
*/
|
|
450
|
-
BaseContent.prototype.showLoadingPlaceholders = function () {
|
|
451
|
-
|
|
452
|
-
oCard = this.getCardInstance();
|
|
453
|
-
|
|
454
|
-
if (!oLoadingProvider) {
|
|
490
|
+
BaseContent.prototype.showLoadingPlaceholders = function (bForce) {
|
|
491
|
+
if (!bForce && this._isDataProviderJson()) {
|
|
455
492
|
return;
|
|
456
493
|
}
|
|
457
494
|
|
|
495
|
+
var oLoadingProvider = this.getAggregation("_loadingProvider"),
|
|
496
|
+
oCard = this.getCardInstance();
|
|
497
|
+
|
|
458
498
|
oLoadingProvider.setLoading(true);
|
|
459
499
|
|
|
460
500
|
if (oCard) {
|
|
@@ -481,6 +521,15 @@ sap.ui.define([
|
|
|
481
521
|
}
|
|
482
522
|
};
|
|
483
523
|
|
|
524
|
+
/**
|
|
525
|
+
* @private
|
|
526
|
+
* @ui5-restricted
|
|
527
|
+
* @returns {boolean} Whether the content has no data
|
|
528
|
+
*/
|
|
529
|
+
BaseContent.prototype.hasNoData = function () {
|
|
530
|
+
return !!this.getAggregation("_noDataMessage");
|
|
531
|
+
};
|
|
532
|
+
|
|
484
533
|
/**
|
|
485
534
|
* Called when the data for the content was changed either by the content or by the card.
|
|
486
535
|
* Override when special behaviour has to be implemented when data is changed.
|
|
@@ -589,14 +638,12 @@ sap.ui.define([
|
|
|
589
638
|
return this._bReady;
|
|
590
639
|
};
|
|
591
640
|
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
BaseContent.prototype.handleError = function (
|
|
597
|
-
this.fireEvent("_error", {
|
|
598
|
-
logMessage: sLogMessage
|
|
599
|
-
});
|
|
641
|
+
/*
|
|
642
|
+
* @protected
|
|
643
|
+
@ param {object} mErrorInfo The error information object.
|
|
644
|
+
*/
|
|
645
|
+
BaseContent.prototype.handleError = function (mErrorInfo) {
|
|
646
|
+
this.fireEvent("_error", { errorInfo: mErrorInfo });
|
|
600
647
|
};
|
|
601
648
|
|
|
602
649
|
BaseContent.prototype.setServiceManager = function (oServiceManager) {
|
|
@@ -614,11 +661,18 @@ sap.ui.define([
|
|
|
614
661
|
return this;
|
|
615
662
|
};
|
|
616
663
|
|
|
617
|
-
BaseContent.prototype.isLoading
|
|
618
|
-
|
|
619
|
-
|
|
664
|
+
BaseContent.prototype.isLoading = function () {
|
|
665
|
+
if (!this.isReady()) {
|
|
666
|
+
return true;
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
if (this._oDataProvider) {
|
|
670
|
+
return this.getAggregation("_loadingProvider").getLoading();
|
|
671
|
+
}
|
|
620
672
|
|
|
621
|
-
|
|
673
|
+
var oCard = this.getCardInstance();
|
|
674
|
+
|
|
675
|
+
return oCard && oCard.isLoading();
|
|
622
676
|
};
|
|
623
677
|
|
|
624
678
|
BaseContent.prototype.attachPress = function () {
|
|
@@ -701,5 +755,23 @@ sap.ui.define([
|
|
|
701
755
|
return oMessageContainer;
|
|
702
756
|
};
|
|
703
757
|
|
|
758
|
+
BaseContent.prototype._isDataProviderJson = function () {
|
|
759
|
+
return this._oDataProvider && this._oDataProvider.getSettings() && this._oDataProvider.getSettings()["json"];
|
|
760
|
+
};
|
|
761
|
+
|
|
762
|
+
/*
|
|
763
|
+
* @private
|
|
764
|
+
* @ui5-restricted sap.ui.integration
|
|
765
|
+
*/
|
|
766
|
+
BaseContent.prototype.getHeaderTitleId = function () {
|
|
767
|
+
var oCard = this.getCardInstance();
|
|
768
|
+
|
|
769
|
+
if (!oCard) {
|
|
770
|
+
return undefined;
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
return oCard.getId() + "-header-title-inner";
|
|
774
|
+
};
|
|
775
|
+
|
|
704
776
|
return BaseContent;
|
|
705
777
|
});
|
|
@@ -40,7 +40,8 @@ sap.ui.define([
|
|
|
40
40
|
oCard = oCardContent.getCardInstance(),
|
|
41
41
|
bLoading = oCardContent.isLoading(),
|
|
42
42
|
bIsAbstractPreviewMode = oCard && oCard.getPreviewMode() === CardPreviewMode.Abstract,
|
|
43
|
-
oMessageContainer = oCardContent.getAggregation("_messageContainer")
|
|
43
|
+
oMessageContainer = oCardContent.getAggregation("_messageContainer"),
|
|
44
|
+
oNoDataMessage = oCardContent.getAggregation("_noDataMessage");
|
|
44
45
|
|
|
45
46
|
sClass += sType;
|
|
46
47
|
|
|
@@ -71,7 +72,11 @@ sap.ui.define([
|
|
|
71
72
|
oRm.renderControl(oMessageContainer);
|
|
72
73
|
}
|
|
73
74
|
|
|
74
|
-
|
|
75
|
+
if (oNoDataMessage) {
|
|
76
|
+
oRm.renderControl(oNoDataMessage);
|
|
77
|
+
} else {
|
|
78
|
+
this.renderContent(oRm, oCardContent);
|
|
79
|
+
}
|
|
75
80
|
|
|
76
81
|
oRm.close("div");
|
|
77
82
|
};
|
|
@@ -7,12 +7,14 @@
|
|
|
7
7
|
sap.ui.define([
|
|
8
8
|
"sap/ui/integration/cards/BaseContent",
|
|
9
9
|
"sap/ui/integration/util/BindingResolver",
|
|
10
|
+
"sap/m/IllustratedMessageType",
|
|
10
11
|
"sap/ui/integration/library",
|
|
11
12
|
"sap/base/Log",
|
|
12
13
|
"sap/ui/model/Sorter"
|
|
13
14
|
], function (
|
|
14
15
|
BaseContent,
|
|
15
16
|
BindingResolver,
|
|
17
|
+
IllustratedMessageType,
|
|
16
18
|
library,
|
|
17
19
|
Log,
|
|
18
20
|
Sorter
|
|
@@ -31,7 +33,7 @@ sap.ui.define([
|
|
|
31
33
|
* @extends sap.ui.integration.cards.BaseContent
|
|
32
34
|
*
|
|
33
35
|
* @author SAP SE
|
|
34
|
-
* @version 1.
|
|
36
|
+
* @version 1.113.0
|
|
35
37
|
*
|
|
36
38
|
* @constructor
|
|
37
39
|
* @private
|
|
@@ -74,6 +76,17 @@ sap.ui.define([
|
|
|
74
76
|
this._bIsFirstRendering = false;
|
|
75
77
|
};
|
|
76
78
|
|
|
79
|
+
BaseListContent.prototype.onDataChanged = function () {
|
|
80
|
+
if (this.hasData()) {
|
|
81
|
+
this.destroyAggregation("_noDataMessage");
|
|
82
|
+
} else {
|
|
83
|
+
this.showNoDataMessage({
|
|
84
|
+
type: IllustratedMessageType.NoEntries,
|
|
85
|
+
title: this.getCardInstance().getTranslatedText("CARD_NO_ITEMS_ERROR_LISTS")
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
|
|
77
90
|
BaseListContent.prototype._keepHeight = function () {
|
|
78
91
|
if (!this.getDomRef()) {
|
|
79
92
|
return;
|
|
@@ -115,12 +128,11 @@ sap.ui.define([
|
|
|
115
128
|
/**
|
|
116
129
|
* @override
|
|
117
130
|
*/
|
|
118
|
-
BaseListContent.prototype.
|
|
119
|
-
|
|
120
|
-
oConfiguration = this.getConfiguration();
|
|
131
|
+
BaseListContent.prototype.applyConfiguration = function () {
|
|
132
|
+
var oConfiguration = this.getConfiguration();
|
|
121
133
|
|
|
122
134
|
if (!oConfiguration) {
|
|
123
|
-
return
|
|
135
|
+
return;
|
|
124
136
|
}
|
|
125
137
|
|
|
126
138
|
var oList = this.getInnerList(),
|
|
@@ -140,8 +152,6 @@ sap.ui.define([
|
|
|
140
152
|
}
|
|
141
153
|
|
|
142
154
|
this._fMinHeight = 0;
|
|
143
|
-
|
|
144
|
-
return this;
|
|
145
155
|
};
|
|
146
156
|
|
|
147
157
|
/**
|
|
@@ -229,27 +239,18 @@ sap.ui.define([
|
|
|
229
239
|
}.bind(this));
|
|
230
240
|
};
|
|
231
241
|
|
|
232
|
-
|
|
233
|
-
* Used to show the illustrated message for no data retrieved from server.
|
|
234
|
-
*
|
|
235
|
-
* @protected
|
|
236
|
-
* @param {Object} mItemConfig The item template.
|
|
237
|
-
*/
|
|
238
|
-
BaseListContent.prototype._handleNoItemsError = function (mItemConfig) {
|
|
239
|
-
|
|
240
|
-
if (!this.getInnerList()) {
|
|
241
|
-
return;
|
|
242
|
-
}
|
|
243
|
-
|
|
242
|
+
BaseListContent.prototype.hasData = function () {
|
|
244
243
|
var oInnerList = this.getInnerList(),
|
|
245
244
|
oBindingInfo = oInnerList.getBinding(oInnerList.getMetadata().getDefaultAggregationName()),
|
|
246
245
|
oModel = oBindingInfo.getModel(),
|
|
247
246
|
sPath = oBindingInfo.getPath(),
|
|
248
247
|
aItems = oModel.getProperty(sPath);
|
|
249
248
|
|
|
250
|
-
if (aItems && aItems.length
|
|
251
|
-
|
|
249
|
+
if (aItems && aItems.length) {
|
|
250
|
+
return true;
|
|
252
251
|
}
|
|
252
|
+
|
|
253
|
+
return false;
|
|
253
254
|
};
|
|
254
255
|
|
|
255
256
|
/**
|
|
@@ -73,7 +73,7 @@ sap.ui.define([
|
|
|
73
73
|
* @extends sap.ui.integration.cards.BaseContent
|
|
74
74
|
*
|
|
75
75
|
* @author SAP SE
|
|
76
|
-
* @version 1.
|
|
76
|
+
* @version 1.113.0
|
|
77
77
|
*
|
|
78
78
|
* @constructor
|
|
79
79
|
* @private
|
|
@@ -226,21 +226,16 @@ sap.ui.define([
|
|
|
226
226
|
};
|
|
227
227
|
|
|
228
228
|
/**
|
|
229
|
-
*
|
|
230
|
-
*
|
|
231
|
-
* @public
|
|
232
|
-
* @param {Object} oConfiguration Configuration object used to create the internal calendar.
|
|
233
|
-
* @returns {this} Pointer to the control instance to allow method chaining.
|
|
229
|
+
* @override
|
|
234
230
|
*/
|
|
235
|
-
CalendarContent.prototype.
|
|
236
|
-
|
|
237
|
-
oConfiguration = this.getParsedConfiguration();
|
|
231
|
+
CalendarContent.prototype.applyConfiguration = function () {
|
|
232
|
+
var oConfiguration = this.getParsedConfiguration();
|
|
238
233
|
|
|
239
234
|
//workaround until actions refactor
|
|
240
235
|
this.fireEvent("_actionContentReady"); // todo
|
|
241
236
|
|
|
242
237
|
if (!oConfiguration) {
|
|
243
|
-
return
|
|
238
|
+
return;
|
|
244
239
|
}
|
|
245
240
|
|
|
246
241
|
if (oConfiguration.item) {
|
|
@@ -278,8 +273,6 @@ sap.ui.define([
|
|
|
278
273
|
control: this._getMoreButton()
|
|
279
274
|
});
|
|
280
275
|
}
|
|
281
|
-
|
|
282
|
-
return this;
|
|
283
276
|
};
|
|
284
277
|
|
|
285
278
|
/**
|
|
@@ -8,12 +8,14 @@ sap.ui.define([
|
|
|
8
8
|
"./BaseContent",
|
|
9
9
|
"./ComponentContentRenderer",
|
|
10
10
|
"sap/ui/integration/library",
|
|
11
|
+
"sap/m/IllustratedMessageType",
|
|
11
12
|
"sap/ui/core/ComponentContainer",
|
|
12
13
|
"sap/ui/core/Component"
|
|
13
14
|
], function (
|
|
14
15
|
BaseContent,
|
|
15
16
|
ComponentContentRenderer,
|
|
16
17
|
library,
|
|
18
|
+
IllustratedMessageType,
|
|
17
19
|
ComponentContainer,
|
|
18
20
|
Component
|
|
19
21
|
) {
|
|
@@ -33,7 +35,7 @@ sap.ui.define([
|
|
|
33
35
|
* @extends sap.ui.integration.cards.BaseContent
|
|
34
36
|
*
|
|
35
37
|
* @author SAP SE
|
|
36
|
-
* @version 1.
|
|
38
|
+
* @version 1.113.0
|
|
37
39
|
*
|
|
38
40
|
* @experimental
|
|
39
41
|
* @constructor
|
|
@@ -58,9 +60,8 @@ sap.ui.define([
|
|
|
58
60
|
}
|
|
59
61
|
};
|
|
60
62
|
|
|
61
|
-
ComponentContent.prototype.
|
|
62
|
-
|
|
63
|
-
oConfiguration = this.getParsedConfiguration();
|
|
63
|
+
ComponentContent.prototype.applyConfiguration = function () {
|
|
64
|
+
var oConfiguration = this.getParsedConfiguration();
|
|
64
65
|
|
|
65
66
|
if (!oConfiguration) {
|
|
66
67
|
return;
|
|
@@ -86,8 +87,14 @@ sap.ui.define([
|
|
|
86
87
|
this.fireEvent("_updated");
|
|
87
88
|
}.bind(this),
|
|
88
89
|
componentFailed: function () {
|
|
90
|
+
var oCard = oCard = this.getCardInstance();
|
|
91
|
+
|
|
89
92
|
this.fireEvent("_actionContentReady");
|
|
90
|
-
this.handleError(
|
|
93
|
+
this.handleError({
|
|
94
|
+
type: IllustratedMessageType.ErrorScreen,
|
|
95
|
+
title: oCard.getTranslatedText("CARD_DATA_LOAD_ERROR"),
|
|
96
|
+
description: "Card content failed to create component"
|
|
97
|
+
});
|
|
91
98
|
}.bind(this)
|
|
92
99
|
});
|
|
93
100
|
|
|
@@ -42,7 +42,7 @@ sap.ui.define([
|
|
|
42
42
|
* @extends sap.f.cards.Header
|
|
43
43
|
*
|
|
44
44
|
* @author SAP SE
|
|
45
|
-
* @version 1.
|
|
45
|
+
* @version 1.113.0
|
|
46
46
|
*
|
|
47
47
|
* @constructor
|
|
48
48
|
* @private
|
|
@@ -51,7 +51,7 @@ sap.ui.define([
|
|
|
51
51
|
*/
|
|
52
52
|
var Header = FHeader.extend("sap.ui.integration.cards.Header", {
|
|
53
53
|
|
|
54
|
-
constructor: function (mConfiguration, oActionsToolbar, oIconFormatter) {
|
|
54
|
+
constructor: function (sId, mConfiguration, oActionsToolbar, oIconFormatter) {
|
|
55
55
|
|
|
56
56
|
mConfiguration = mConfiguration || {};
|
|
57
57
|
|
|
@@ -88,7 +88,7 @@ sap.ui.define([
|
|
|
88
88
|
|
|
89
89
|
mSettings.toolbar = oActionsToolbar;
|
|
90
90
|
|
|
91
|
-
FHeader.call(this, mSettings);
|
|
91
|
+
FHeader.call(this, sId, mSettings);
|
|
92
92
|
|
|
93
93
|
this._oConfiguration = mConfiguration;
|
|
94
94
|
},
|
|
@@ -166,15 +166,21 @@ sap.ui.define([
|
|
|
166
166
|
};
|
|
167
167
|
|
|
168
168
|
Header.prototype.isLoading = function () {
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
169
|
+
if (!this.isReady()) {
|
|
170
|
+
return true;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
if (this._oDataProvider) {
|
|
174
|
+
return this.getAggregation("_loadingProvider").getLoading();
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
var oCard = this.getCardInstance();
|
|
172
178
|
|
|
173
|
-
return
|
|
179
|
+
return oCard && oCard.isLoading();
|
|
174
180
|
};
|
|
175
181
|
|
|
176
|
-
Header.prototype._handleError = function (
|
|
177
|
-
this.fireEvent("_error", {
|
|
182
|
+
Header.prototype._handleError = function (mErrorInfo) {
|
|
183
|
+
this.fireEvent("_error", { errorInfo: mErrorInfo });
|
|
178
184
|
};
|
|
179
185
|
|
|
180
186
|
/**
|
|
@@ -243,8 +249,6 @@ sap.ui.define([
|
|
|
243
249
|
|
|
244
250
|
this._oDataProvider = this._oDataProviderFactory.create(oDataSettings, this._oServiceManager);
|
|
245
251
|
|
|
246
|
-
this.getAggregation("_loadingProvider").setDataProvider(this._oDataProvider);
|
|
247
|
-
|
|
248
252
|
if (oDataSettings && oDataSettings.name) {
|
|
249
253
|
oModel = oCard.getModel(oDataSettings.name);
|
|
250
254
|
} else if (this._oDataProvider) {
|
|
@@ -263,7 +267,10 @@ sap.ui.define([
|
|
|
263
267
|
}.bind(this));
|
|
264
268
|
|
|
265
269
|
this._oDataProvider.attachError(function (oEvent) {
|
|
266
|
-
this._handleError(
|
|
270
|
+
this._handleError({
|
|
271
|
+
requestErrorParams: oEvent.getParameters(),
|
|
272
|
+
requestSettings: this._oDataProvider.getSettings()
|
|
273
|
+
});
|
|
267
274
|
this.onDataRequestComplete();
|
|
268
275
|
}.bind(this));
|
|
269
276
|
|
|
@@ -284,7 +291,9 @@ sap.ui.define([
|
|
|
284
291
|
* @ui5-restricted
|
|
285
292
|
*/
|
|
286
293
|
Header.prototype.showLoadingPlaceholders = function () {
|
|
287
|
-
this.
|
|
294
|
+
if (!this._isDataProviderJson()) {
|
|
295
|
+
this.getAggregation("_loadingProvider").setLoading(true);
|
|
296
|
+
}
|
|
288
297
|
};
|
|
289
298
|
|
|
290
299
|
/**
|
|
@@ -315,5 +324,9 @@ sap.ui.define([
|
|
|
315
324
|
return Core.byId(this.getCard());
|
|
316
325
|
};
|
|
317
326
|
|
|
327
|
+
Header.prototype._isDataProviderJson = function () {
|
|
328
|
+
return this._oDataProvider && this._oDataProvider.getSettings() && this._oDataProvider.getSettings()["json"];
|
|
329
|
+
};
|
|
330
|
+
|
|
318
331
|
return Header;
|
|
319
332
|
});
|