@openui5/sap.ui.integration 1.114.0 → 1.115.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/.reuse/dep5 +0 -5
- package/THIRDPARTY.txt +0 -6
- 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 +1 -1
- package/src/sap/ui/integration/Host.js +1 -1
- package/src/sap/ui/integration/cards/AdaptiveContent.js +1 -1
- package/src/sap/ui/integration/cards/AnalyticalContent.js +13 -1
- package/src/sap/ui/integration/cards/AnalyticsCloudContent.js +1 -1
- package/src/sap/ui/integration/cards/BaseContent.js +40 -8
- package/src/sap/ui/integration/cards/BaseContentRenderer.js +2 -2
- package/src/sap/ui/integration/cards/BaseListContent.js +1 -1
- package/src/sap/ui/integration/cards/CalendarContent.js +207 -8
- package/src/sap/ui/integration/cards/ComponentContent.js +1 -1
- package/src/sap/ui/integration/cards/Footer.js +4 -6
- package/src/sap/ui/integration/cards/Header.js +2 -2
- package/src/sap/ui/integration/cards/ListContent.js +18 -1
- package/src/sap/ui/integration/cards/NumericHeader.js +2 -2
- package/src/sap/ui/integration/cards/ObjectContent.js +51 -11
- package/src/sap/ui/integration/cards/TableContent.js +19 -2
- package/src/sap/ui/integration/cards/TableContentRenderer.js +2 -2
- package/src/sap/ui/integration/cards/TimelineContent.js +17 -1
- package/src/sap/ui/integration/cards/TimelineContentRenderer.js +1 -1
- package/src/sap/ui/integration/cards/WebPageContent.js +1 -1
- package/src/sap/ui/integration/cards/actions/CardActions.js +1 -1
- 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 +2 -1
- package/src/sap/ui/integration/cards/filters/DateRangeFilter.js +6 -137
- 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 +10 -4
- 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 +2 -2
- package/src/sap/ui/integration/controls/LinkWithIcon.js +1 -1
- package/src/sap/ui/integration/controls/ListContentItem.js +7 -2
- package/src/sap/ui/integration/controls/ListContentItemRenderer.js +2 -2
- 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 +1 -1
- package/src/sap/ui/integration/controls/Paginator.js +1 -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 +4 -5
- 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 +2 -2
- package/src/sap/ui/integration/designtime/editor/CardPreview.js +41 -9
- package/src/sap/ui/integration/designtime/editor/css/CardPreview.css +18 -14
- package/src/sap/ui/integration/editor/Editor.js +3 -2
- 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 +1 -3
- 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 +6 -6
- package/src/sap/ui/integration/editor/fields/ObjectListField.js +1 -1
- package/src/sap/ui/integration/editor/fields/StringField.js +29 -8
- 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/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 -11
- package/src/sap/ui/integration/util/BaseFactory.js +1 -1
- package/src/sap/ui/integration/util/BindingHelper.js +40 -17
- package/src/sap/ui/integration/util/BindingResolver.js +3 -18
- package/src/sap/ui/integration/util/CardObserver.js +1 -1
- package/src/sap/ui/integration/util/ContentFactory.js +1 -1
- package/src/sap/ui/integration/util/CsrfTokenHandler.js +1 -1
- package/src/sap/ui/integration/util/DataProvider.js +1 -1
- package/src/sap/ui/integration/util/DataProviderFactory.js +1 -1
- package/src/sap/ui/integration/util/DateRangeHelper.js +211 -0
- package/src/sap/ui/integration/util/Destinations.js +1 -1
- package/src/sap/ui/integration/util/ErrorHandler.js +2 -2
- package/src/sap/ui/integration/util/ExtensionDataProvider.js +1 -1
- package/src/sap/ui/integration/util/Form.js +65 -21
- package/src/sap/ui/integration/util/HeaderFactory.js +1 -1
- package/src/sap/ui/integration/util/JSONBindingHelper.js +1 -1
- package/src/sap/ui/integration/util/LoadingProvider.js +3 -88
- package/src/sap/ui/integration/util/Manifest.js +1 -1
- package/src/sap/ui/integration/util/RequestDataProvider.js +1 -1
- 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 +1 -1
- package/src/sap/ui/integration/util/Utils.js +1 -1
- package/src/sap/ui/integration/util/Validators.js +7 -1
- package/src/sap/ui/integration/widgets/Card.js +34 -8
|
@@ -6,11 +6,24 @@
|
|
|
6
6
|
sap.ui.define([
|
|
7
7
|
"sap/ui/base/ManagedObject",
|
|
8
8
|
"sap/ui/core/library",
|
|
9
|
+
"sap/ui/core/Core",
|
|
9
10
|
"sap/base/Log",
|
|
10
11
|
"sap/base/util/deepExtend",
|
|
11
12
|
"./Validators",
|
|
12
|
-
"./
|
|
13
|
-
|
|
13
|
+
"./BindingHelper",
|
|
14
|
+
"./BindingResolver",
|
|
15
|
+
"./DateRangeHelper"
|
|
16
|
+
], function (
|
|
17
|
+
ManagedObject,
|
|
18
|
+
coreLibrary,
|
|
19
|
+
Core,
|
|
20
|
+
Log,
|
|
21
|
+
deepExtend,
|
|
22
|
+
Validators,
|
|
23
|
+
BindingHelper,
|
|
24
|
+
BindingResolver,
|
|
25
|
+
DateRangeHelper
|
|
26
|
+
) {
|
|
14
27
|
"use strict";
|
|
15
28
|
|
|
16
29
|
var ValueState = coreLibrary.ValueState;
|
|
@@ -19,7 +32,7 @@ sap.ui.define([
|
|
|
19
32
|
* Utility class for handling forms in the cards.
|
|
20
33
|
*
|
|
21
34
|
* @author SAP SE
|
|
22
|
-
* @version 1.
|
|
35
|
+
* @version 1.115.0
|
|
23
36
|
*
|
|
24
37
|
* @private
|
|
25
38
|
* @ui5-restricted
|
|
@@ -91,7 +104,7 @@ sap.ui.define([
|
|
|
91
104
|
*/
|
|
92
105
|
Form.prototype.resolveControl = function (oItem) {
|
|
93
106
|
var oResolved = {},
|
|
94
|
-
vValue,
|
|
107
|
+
vValue = this.getModel("form").getProperty("/" + oItem.id),
|
|
95
108
|
aValidations = this.getModel("messages").getProperty("/records"),
|
|
96
109
|
oValueState = aValidations.find(function (oValidation) {
|
|
97
110
|
return oValidation.bindingPath === "/" + oItem.id;
|
|
@@ -102,12 +115,17 @@ sap.ui.define([
|
|
|
102
115
|
oResolved.valueState = { message: oValueState.message, type: oValueState.type };
|
|
103
116
|
}
|
|
104
117
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
118
|
+
switch (oItem.type) {
|
|
119
|
+
case "ComboBox":
|
|
120
|
+
oResolved.selectedKey = vValue.key;
|
|
121
|
+
vValue = vValue.value;
|
|
122
|
+
break;
|
|
123
|
+
case "DateRange":
|
|
124
|
+
vValue = vValue.value;
|
|
125
|
+
break;
|
|
126
|
+
default:
|
|
127
|
+
// do nothing
|
|
128
|
+
break;
|
|
111
129
|
}
|
|
112
130
|
|
|
113
131
|
oResolved.value = vValue;
|
|
@@ -127,14 +145,17 @@ sap.ui.define([
|
|
|
127
145
|
}
|
|
128
146
|
|
|
129
147
|
var sId = oFormControlData.id,
|
|
130
|
-
oControl = this._mControls.get(sId)
|
|
148
|
+
oControl = this._mControls.get(sId),
|
|
149
|
+
vValue = oFormControlData.value;
|
|
131
150
|
|
|
132
151
|
if (oControl.isA("sap.m.ComboBox")) {
|
|
133
152
|
this._setComboBoxValue(oControl, oFormControlData);
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
153
|
+
} else if (vValue) {
|
|
154
|
+
if (oControl.isA("sap.m.DatePicker") || oControl.isA("sap.m.DynamicDateRange")) {
|
|
155
|
+
DateRangeHelper.setValue(oControl, vValue, this._oCard);
|
|
156
|
+
} else {
|
|
157
|
+
oControl.setValue(vValue);
|
|
158
|
+
}
|
|
138
159
|
}
|
|
139
160
|
|
|
140
161
|
this._validateAndUpdate(oControl);
|
|
@@ -189,7 +210,7 @@ sap.ui.define([
|
|
|
189
210
|
this._prepareValidationForControl(oControl, oItem, sPath);
|
|
190
211
|
oControl.attachEvent(sEventType, this._validateAndUpdate, this);
|
|
191
212
|
|
|
192
|
-
if (oItem.value && !
|
|
213
|
+
if (oItem.value && !BindingHelper.isBindingInfo(oItem.value)) {
|
|
193
214
|
this._updateModel(oControl);
|
|
194
215
|
}
|
|
195
216
|
|
|
@@ -276,15 +297,18 @@ sap.ui.define([
|
|
|
276
297
|
|
|
277
298
|
this._removeMessageFromControl(oControl);
|
|
278
299
|
|
|
279
|
-
if (!oItem
|
|
300
|
+
if (!oItem) {
|
|
280
301
|
return bHasErrorSet;
|
|
281
302
|
}
|
|
282
303
|
|
|
283
|
-
|
|
304
|
+
bHasErrorSet = !this._checkBuiltInValidations(oControl, oItem, bShowValueState);
|
|
284
305
|
|
|
285
|
-
bHasErrorSet
|
|
286
|
-
|
|
287
|
-
|
|
306
|
+
if (!bHasErrorSet && oItem.validations) {
|
|
307
|
+
aResolvedValidations = BindingResolver.resolveValue(oItem.validations, oControl, sBindingPath);
|
|
308
|
+
bHasErrorSet = !aResolvedValidations.every(function (mValidationConfig) {
|
|
309
|
+
return this._checkValidationItem(mValidationConfig, oControl, oItem, bShowValueState, oExtension);
|
|
310
|
+
}.bind(this));
|
|
311
|
+
}
|
|
288
312
|
|
|
289
313
|
this._updateMessageModel();
|
|
290
314
|
|
|
@@ -333,6 +357,22 @@ sap.ui.define([
|
|
|
333
357
|
return bValidationPassed;
|
|
334
358
|
};
|
|
335
359
|
|
|
360
|
+
Form.prototype._checkBuiltInValidations = function (oControl, oItem, bShowValueState) {
|
|
361
|
+
var bValidationPassed = true;
|
|
362
|
+
|
|
363
|
+
if (oControl.isA("sap.m.DatePicker") && !oControl.isValidValue()) {
|
|
364
|
+
this._addMessageToControl(oControl, bShowValueState, {
|
|
365
|
+
type: ValueState.Error,
|
|
366
|
+
message: Core.getLibraryResourceBundle("sap.ui.core").getText("VALUE_STATE_ERROR"),
|
|
367
|
+
bindingPath: "/" + oItem.id
|
|
368
|
+
});
|
|
369
|
+
|
|
370
|
+
bValidationPassed = false;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
return bValidationPassed;
|
|
374
|
+
};
|
|
375
|
+
|
|
336
376
|
Form.prototype._addMessageToControl = function (oControl, bShowValueState, oMessage) {
|
|
337
377
|
var oMessagesModel = this.getModel("messages"),
|
|
338
378
|
oModelData = oMessagesModel.getData();
|
|
@@ -430,6 +470,8 @@ sap.ui.define([
|
|
|
430
470
|
switch (oItem.type) {
|
|
431
471
|
case "ComboBox":
|
|
432
472
|
return "keyValuePair";
|
|
473
|
+
case "DateRange":
|
|
474
|
+
return "dateRange";
|
|
433
475
|
default:
|
|
434
476
|
return "string";
|
|
435
477
|
}
|
|
@@ -442,6 +484,8 @@ sap.ui.define([
|
|
|
442
484
|
key: oControl.getSelectedKey(),
|
|
443
485
|
value: oControl.getValue()
|
|
444
486
|
};
|
|
487
|
+
} else if (oControl.isA("sap.m.DynamicDateRange") || oControl.isA("sap.m.DatePicker")) {
|
|
488
|
+
return DateRangeHelper.getValueForModel(oControl);
|
|
445
489
|
} else {
|
|
446
490
|
return oControl.getValue();
|
|
447
491
|
}
|
|
@@ -4,31 +4,9 @@
|
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
sap.ui.define([
|
|
7
|
-
"
|
|
8
|
-
"sap/ui/core/Element",
|
|
9
|
-
"sap/f/cards/loading/GenericPlaceholder",
|
|
10
|
-
"sap/f/cards/loading/ListPlaceholder",
|
|
11
|
-
"sap/f/cards/loading/CalendarPlaceholder",
|
|
12
|
-
"sap/f/cards/loading/ObjectPlaceholder",
|
|
13
|
-
"sap/f/cards/loading/TablePlaceholder",
|
|
14
|
-
"sap/f/cards/loading/TimelinePlaceholder",
|
|
15
|
-
"sap/f/cards/loading/AnalyticalPlaceholder",
|
|
16
|
-
"../cards/TableContentRenderer",
|
|
17
|
-
"../cards/TimelineContentRenderer",
|
|
18
|
-
"../cards/AnalyticalContentRenderer"
|
|
7
|
+
"sap/ui/core/Element"
|
|
19
8
|
], function (
|
|
20
|
-
|
|
21
|
-
Element,
|
|
22
|
-
GenericPlaceholder,
|
|
23
|
-
ListPlaceholder,
|
|
24
|
-
CalendarPlaceholder,
|
|
25
|
-
ObjectPlaceholder,
|
|
26
|
-
TablePlaceholder,
|
|
27
|
-
TimelinePlaceholder,
|
|
28
|
-
AnalyticalPlaceholder,
|
|
29
|
-
TableContentRenderer,
|
|
30
|
-
TimelineContentRenderer,
|
|
31
|
-
AnalyticalContentRenderer
|
|
9
|
+
Element
|
|
32
10
|
) {
|
|
33
11
|
"use strict";
|
|
34
12
|
|
|
@@ -43,7 +21,7 @@ sap.ui.define([
|
|
|
43
21
|
* @extends sap.ui.core.Element
|
|
44
22
|
*
|
|
45
23
|
* @author SAP SE
|
|
46
|
-
* @version 1.
|
|
24
|
+
* @version 1.115.0
|
|
47
25
|
*
|
|
48
26
|
* @constructor
|
|
49
27
|
* @private
|
|
@@ -70,69 +48,6 @@ sap.ui.define([
|
|
|
70
48
|
return this.setProperty("loading", bLoading);
|
|
71
49
|
};
|
|
72
50
|
|
|
73
|
-
LoadingProvider.prototype.createContentPlaceholder = function (oConfiguration, sType, oCard) {
|
|
74
|
-
var iContentMinItems;
|
|
75
|
-
var oContentPlaceholder;
|
|
76
|
-
|
|
77
|
-
switch (sType) {
|
|
78
|
-
case "List":
|
|
79
|
-
iContentMinItems = oCard.getContentMinItems(oConfiguration);
|
|
80
|
-
|
|
81
|
-
oContentPlaceholder = new ListPlaceholder({
|
|
82
|
-
minItems: iContentMinItems !== null ? iContentMinItems : 2,
|
|
83
|
-
item: oConfiguration.item,
|
|
84
|
-
itemHeight: ListContentRenderer.getItemMinHeight(oConfiguration, oCard || this) + "rem"
|
|
85
|
-
});
|
|
86
|
-
break;
|
|
87
|
-
|
|
88
|
-
case "Calendar":
|
|
89
|
-
iContentMinItems = oCard.getContentMinItems(oConfiguration);
|
|
90
|
-
|
|
91
|
-
oContentPlaceholder = new CalendarPlaceholder({
|
|
92
|
-
minItems: iContentMinItems !== null ? iContentMinItems : 2,
|
|
93
|
-
maxLegendItems: oConfiguration.maxLegendItems ? parseInt(oConfiguration.maxLegendItems) : 2,
|
|
94
|
-
item: oConfiguration.item ? oConfiguration.item.template : {},
|
|
95
|
-
legendItem: oConfiguration.legendItem ? oConfiguration.legendItem.template : {}
|
|
96
|
-
});
|
|
97
|
-
break;
|
|
98
|
-
case "Object":
|
|
99
|
-
oContentPlaceholder = new ObjectPlaceholder();
|
|
100
|
-
break;
|
|
101
|
-
|
|
102
|
-
case "Table":
|
|
103
|
-
iContentMinItems = oCard.getContentMinItems(oConfiguration);
|
|
104
|
-
|
|
105
|
-
oContentPlaceholder = new TablePlaceholder({
|
|
106
|
-
minItems: iContentMinItems !== null ? iContentMinItems : 2,
|
|
107
|
-
itemHeight: TableContentRenderer.getItemMinHeight(oConfiguration, oCard || this) + "rem",
|
|
108
|
-
columns: oConfiguration.row ? oConfiguration.row.columns.length || 2 : 2
|
|
109
|
-
});
|
|
110
|
-
break;
|
|
111
|
-
|
|
112
|
-
case "Timeline":
|
|
113
|
-
iContentMinItems = oCard.getContentMinItems(oConfiguration);
|
|
114
|
-
|
|
115
|
-
oContentPlaceholder = new TimelinePlaceholder({
|
|
116
|
-
minItems: iContentMinItems !== null ? iContentMinItems : 2,
|
|
117
|
-
item: oConfiguration.item,
|
|
118
|
-
itemHeight: TimelineContentRenderer.getItemMinHeight(oConfiguration, oCard || this) + "rem"
|
|
119
|
-
});
|
|
120
|
-
break;
|
|
121
|
-
|
|
122
|
-
case "Analytical":
|
|
123
|
-
oContentPlaceholder = new AnalyticalPlaceholder({
|
|
124
|
-
chartType: oConfiguration.chartType,
|
|
125
|
-
minHeight: AnalyticalContentRenderer.getMinHeight(oConfiguration)
|
|
126
|
-
});
|
|
127
|
-
break;
|
|
128
|
-
|
|
129
|
-
default:
|
|
130
|
-
oContentPlaceholder = new GenericPlaceholder();
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
return oContentPlaceholder;
|
|
134
|
-
};
|
|
135
|
-
|
|
136
51
|
/**
|
|
137
52
|
* Set to <code>true</code> if the loading should wait for a pagination animation.
|
|
138
53
|
* @private
|
|
@@ -11,7 +11,7 @@ sap.ui.define([], function () {
|
|
|
11
11
|
* Utility class helping with input validations.
|
|
12
12
|
*
|
|
13
13
|
* @author SAP SE
|
|
14
|
-
* @version 1.
|
|
14
|
+
* @version 1.115.0
|
|
15
15
|
*
|
|
16
16
|
* @private
|
|
17
17
|
* @alias sap.ui.integration.util.Validators
|
|
@@ -118,6 +118,12 @@ sap.ui.define([], function () {
|
|
|
118
118
|
return (b && !v.value && !v.key) || (b && !!v.key);
|
|
119
119
|
},
|
|
120
120
|
restrictToPredefinedOptionsTxt: "EDITOR_ONLY_LISTED_VALUES_ALLOWED"
|
|
121
|
+
},
|
|
122
|
+
dateRange: {
|
|
123
|
+
required: function (v, b) {
|
|
124
|
+
return !b || !!v.value;
|
|
125
|
+
},
|
|
126
|
+
requiredTxt: "EDITOR_VAL_FIELDREQ"
|
|
121
127
|
}
|
|
122
128
|
};
|
|
123
129
|
|
|
@@ -95,7 +95,8 @@ sap.ui.define([
|
|
|
95
95
|
DESTINATIONS: "/sap.card/configuration/destinations",
|
|
96
96
|
CSRF_TOKENS: "/sap.card/configuration/csrfTokens",
|
|
97
97
|
FILTERS: "/sap.card/configuration/filters",
|
|
98
|
-
NO_DATA_MESSAGES: "/sap.card/configuration/messages/noData"
|
|
98
|
+
NO_DATA_MESSAGES: "/sap.card/configuration/messages/noData",
|
|
99
|
+
MODEL_SIZE_LIMIT: "/sap.card/configuration/modelSizeLimit"
|
|
99
100
|
};
|
|
100
101
|
|
|
101
102
|
/**
|
|
@@ -123,6 +124,8 @@ sap.ui.define([
|
|
|
123
124
|
|
|
124
125
|
var MessageType = coreLibrary.MessageType;
|
|
125
126
|
|
|
127
|
+
var DEFAULT_MODEL_SIZE_LIMIT = 1000;
|
|
128
|
+
|
|
126
129
|
/**
|
|
127
130
|
* Constructor for a new <code>Card</code>.
|
|
128
131
|
*
|
|
@@ -180,7 +183,7 @@ sap.ui.define([
|
|
|
180
183
|
* @extends sap.f.CardBase
|
|
181
184
|
*
|
|
182
185
|
* @author SAP SE
|
|
183
|
-
* @version 1.
|
|
186
|
+
* @version 1.115.0
|
|
184
187
|
* @public
|
|
185
188
|
* @constructor
|
|
186
189
|
* @see {@link topic:5b46b03f024542ba802d99d67bc1a3f4 Cards}
|
|
@@ -517,6 +520,7 @@ sap.ui.define([
|
|
|
517
520
|
|
|
518
521
|
this._oIntegrationRb = Core.getLibraryResourceBundle("sap.ui.integration");
|
|
519
522
|
|
|
523
|
+
this._iModelSizeLimit = DEFAULT_MODEL_SIZE_LIMIT;
|
|
520
524
|
this._initModels();
|
|
521
525
|
|
|
522
526
|
this._oContentFactory = new ContentFactory(this);
|
|
@@ -535,7 +539,7 @@ sap.ui.define([
|
|
|
535
539
|
* @experimental since 1.79
|
|
536
540
|
* @public
|
|
537
541
|
* @author SAP SE
|
|
538
|
-
* @version 1.
|
|
542
|
+
* @version 1.115.0
|
|
539
543
|
* @borrows sap.ui.integration.widgets.Card#getDomRef as getDomRef
|
|
540
544
|
* @borrows sap.ui.integration.widgets.Card#setVisible as setVisible
|
|
541
545
|
* @borrows sap.ui.integration.widgets.Card#getParameters as getParameters
|
|
@@ -605,11 +609,10 @@ sap.ui.define([
|
|
|
605
609
|
* Initializes the internally used models.
|
|
606
610
|
*/
|
|
607
611
|
Card.prototype._initModels = function () {
|
|
608
|
-
|
|
612
|
+
var oModel = new JSONModel();
|
|
613
|
+
this.setModel(oModel);
|
|
609
614
|
|
|
610
615
|
INTERNAL_MODEL_NAMES.forEach(function (sModelName) {
|
|
611
|
-
var oModel;
|
|
612
|
-
|
|
613
616
|
switch (sModelName) {
|
|
614
617
|
case "context":
|
|
615
618
|
oModel = new ContextModel();
|
|
@@ -962,6 +965,14 @@ sap.ui.define([
|
|
|
962
965
|
return !this.getModel("messages").getProperty("/hasErrors");
|
|
963
966
|
};
|
|
964
967
|
|
|
968
|
+
/*
|
|
969
|
+
* @private
|
|
970
|
+
* @ui5-restricted sap.ui.integration
|
|
971
|
+
*/
|
|
972
|
+
Card.prototype.getModelSizeLimit = function () {
|
|
973
|
+
return this._iModelSizeLimit;
|
|
974
|
+
};
|
|
975
|
+
|
|
965
976
|
Card.prototype._validateContentControls = function (bShowValueState, bSkipFiringStateChangedEvent) {
|
|
966
977
|
var oCardContent = this.getCardContent();
|
|
967
978
|
if (oCardContent && oCardContent.isA("sap.ui.integration.cards.BaseContent")) {
|
|
@@ -1718,6 +1729,8 @@ sap.ui.define([
|
|
|
1718
1729
|
|
|
1719
1730
|
this._checkMockPreviewMode();
|
|
1720
1731
|
|
|
1732
|
+
this._applyModelSizeLimit();
|
|
1733
|
+
|
|
1721
1734
|
this._applyServiceManifestSettings();
|
|
1722
1735
|
this._applyFilterBarManifestSettings();
|
|
1723
1736
|
this._applyDataManifestSettings();
|
|
@@ -1774,6 +1787,7 @@ sap.ui.define([
|
|
|
1774
1787
|
oModel = this.getModel(oDataSettings.name);
|
|
1775
1788
|
} else if (this._oDataProvider) {
|
|
1776
1789
|
oModel = new ObservableModel();
|
|
1790
|
+
oModel.setSizeLimit(this.getModelSizeLimit());
|
|
1777
1791
|
this.setModel(oModel);
|
|
1778
1792
|
}
|
|
1779
1793
|
|
|
@@ -1839,6 +1853,15 @@ sap.ui.define([
|
|
|
1839
1853
|
}
|
|
1840
1854
|
};
|
|
1841
1855
|
|
|
1856
|
+
/**
|
|
1857
|
+
*
|
|
1858
|
+
* @private
|
|
1859
|
+
*/
|
|
1860
|
+
Card.prototype._applyModelSizeLimit = function () {
|
|
1861
|
+
var iModelSizeLimit = this._oCardManifest.get(MANIFEST_PATHS.MODEL_SIZE_LIMIT);
|
|
1862
|
+
this._iModelSizeLimit = iModelSizeLimit !== undefined ? iModelSizeLimit : DEFAULT_MODEL_SIZE_LIMIT;
|
|
1863
|
+
};
|
|
1864
|
+
|
|
1842
1865
|
/**
|
|
1843
1866
|
* Implements sap.f.ICard interface.
|
|
1844
1867
|
*
|
|
@@ -2528,7 +2551,9 @@ sap.ui.define([
|
|
|
2528
2551
|
return;
|
|
2529
2552
|
}
|
|
2530
2553
|
|
|
2531
|
-
|
|
2554
|
+
var oModel = new ObservableModel();
|
|
2555
|
+
oModel.setSizeLimit(this.getModelSizeLimit());
|
|
2556
|
+
this.setModel(oModel, sModelName);
|
|
2532
2557
|
this._aCustomModels.push(sModelName);
|
|
2533
2558
|
}.bind(this));
|
|
2534
2559
|
};
|
|
@@ -2818,8 +2843,9 @@ sap.ui.define([
|
|
|
2818
2843
|
if (oData) {
|
|
2819
2844
|
each(oData, function (sModelName, oModelData) {
|
|
2820
2845
|
var oModel = new JSONModel(oModelData);
|
|
2846
|
+
oModel.setSizeLimit(this.getModelSizeLimit());
|
|
2821
2847
|
oChildCard.setModel(oModel, sModelName);
|
|
2822
|
-
});
|
|
2848
|
+
}.bind(this));
|
|
2823
2849
|
}
|
|
2824
2850
|
|
|
2825
2851
|
if (typeof vManifest === "string") {
|