@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
package/.reuse/dep5
CHANGED
|
@@ -192,11 +192,6 @@ Copyright: 2012 Matteo Spinelli
|
|
|
192
192
|
License: MIT
|
|
193
193
|
Comment: these files belong to: cubiq.org - swipeview
|
|
194
194
|
|
|
195
|
-
Files: src/sap.ui.core/src/sap/ui/thirdparty/mobify-carousel.js
|
|
196
|
-
Copyright: Mobify R&D Inc.
|
|
197
|
-
License: MIT
|
|
198
|
-
Comment: these files belong to: Mobify.js
|
|
199
|
-
|
|
200
195
|
Files: src/sap.ui.core/src/sap/ui/thirdparty/zyngascroll.js
|
|
201
196
|
Copyright: 2011 Zynga Inc.
|
|
202
197
|
License: MIT
|
package/THIRDPARTY.txt
CHANGED
|
@@ -143,12 +143,6 @@ License: MIT
|
|
|
143
143
|
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/MIT.txt
|
|
144
144
|
Contained in: src/sap.ui.core/src/sap/ui/thirdparty/swipe-view.js
|
|
145
145
|
|
|
146
|
-
Component: Mobify.js, version: 1.1
|
|
147
|
-
Copyright: Mobify R&D Inc.
|
|
148
|
-
License: MIT
|
|
149
|
-
License Text: https://github.com/SAP/openui5/blob/master/LICENSES/MIT.txt
|
|
150
|
-
Contained in: src/sap.ui.core/src/sap/ui/thirdparty/mobify-carousel.js
|
|
151
|
-
|
|
152
146
|
Component: Zynga Scroller, version: 1.2.1-0-g5d43806
|
|
153
147
|
Copyright: 2011 Zynga Inc.
|
|
154
148
|
License: MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openui5/sap.ui.integration",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.115.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.115.0",
|
|
18
|
+
"@openui5/sap.f": "1.115.0",
|
|
19
|
+
"@openui5/sap.m": "1.115.0",
|
|
20
|
+
"@openui5/sap.ui.unified": "1.115.0",
|
|
21
|
+
"@openui5/sap.ui.layout": "1.115.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.115.0</version>
|
|
10
10
|
|
|
11
11
|
<documentation>SAPUI5 library with integration-related controls.</documentation>
|
|
12
12
|
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
sap.ui.define([
|
|
7
7
|
"./AnalyticalContentRenderer",
|
|
8
8
|
"./BaseContent",
|
|
9
|
+
"sap/f/cards/loading/AnalyticalPlaceholder",
|
|
9
10
|
"sap/m/IllustratedMessageType",
|
|
10
11
|
"sap/ui/integration/library",
|
|
11
12
|
"sap/ui/integration/util/BindingResolver",
|
|
@@ -15,6 +16,7 @@ sap.ui.define([
|
|
|
15
16
|
], function (
|
|
16
17
|
AnalyticalContentRenderer,
|
|
17
18
|
BaseContent,
|
|
19
|
+
AnalyticalPlaceholder,
|
|
18
20
|
IllustratedMessageType,
|
|
19
21
|
library,
|
|
20
22
|
BindingResolver,
|
|
@@ -90,7 +92,7 @@ sap.ui.define([
|
|
|
90
92
|
* @extends sap.ui.integration.cards.BaseContent
|
|
91
93
|
*
|
|
92
94
|
* @author SAP SE
|
|
93
|
-
* @version 1.
|
|
95
|
+
* @version 1.115.0
|
|
94
96
|
*
|
|
95
97
|
* @constructor
|
|
96
98
|
* @private
|
|
@@ -112,6 +114,16 @@ sap.ui.define([
|
|
|
112
114
|
}
|
|
113
115
|
};
|
|
114
116
|
|
|
117
|
+
/**
|
|
118
|
+
* @override
|
|
119
|
+
*/
|
|
120
|
+
AnalyticalContent.prototype.createLoadingPlaceholder = function (oConfiguration) {
|
|
121
|
+
return new AnalyticalPlaceholder({
|
|
122
|
+
chartType: oConfiguration.chartType,
|
|
123
|
+
minHeight: AnalyticalContentRenderer.getMinHeight(oConfiguration)
|
|
124
|
+
});
|
|
125
|
+
};
|
|
126
|
+
|
|
115
127
|
/**
|
|
116
128
|
* @override
|
|
117
129
|
*/
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
8
|
"./BaseContentRenderer",
|
|
9
|
+
"sap/f/cards/loading/GenericPlaceholder",
|
|
9
10
|
"sap/m/MessageStrip",
|
|
10
11
|
"sap/m/VBox",
|
|
11
12
|
"sap/m/library",
|
|
@@ -25,6 +26,7 @@ sap.ui.define([
|
|
|
25
26
|
"sap/ui/integration/library"
|
|
26
27
|
], function (
|
|
27
28
|
BaseContentRenderer,
|
|
29
|
+
GenericPlaceholder,
|
|
28
30
|
MessageStrip,
|
|
29
31
|
VBox,
|
|
30
32
|
mLibrary,
|
|
@@ -53,6 +55,8 @@ sap.ui.define([
|
|
|
53
55
|
// shortcut for sap.ui.integration.CardBlockingMessageType
|
|
54
56
|
var CardBlockingMessageType = library.CardBlockingMessageType;
|
|
55
57
|
|
|
58
|
+
var CardPreviewMode = library.CardPreviewMode;
|
|
59
|
+
|
|
56
60
|
/**
|
|
57
61
|
* Constructor for a new <code>BaseContent</code>.
|
|
58
62
|
*
|
|
@@ -65,7 +69,7 @@ sap.ui.define([
|
|
|
65
69
|
* @extends sap.ui.core.Control
|
|
66
70
|
*
|
|
67
71
|
* @author SAP SE
|
|
68
|
-
* @version 1.
|
|
72
|
+
* @version 1.115.0
|
|
69
73
|
*
|
|
70
74
|
* @constructor
|
|
71
75
|
* @private
|
|
@@ -121,7 +125,7 @@ sap.ui.define([
|
|
|
121
125
|
},
|
|
122
126
|
|
|
123
127
|
/**
|
|
124
|
-
* Defines the internally used
|
|
128
|
+
* Defines the internally used LoadingPlaceholder.
|
|
125
129
|
*/
|
|
126
130
|
_loadingPlaceholder: {
|
|
127
131
|
type: "sap.ui.core.Element",
|
|
@@ -181,13 +185,22 @@ sap.ui.define([
|
|
|
181
185
|
};
|
|
182
186
|
|
|
183
187
|
BaseContent.prototype.onBeforeRendering = function () {
|
|
184
|
-
var
|
|
188
|
+
var oConfiguration = this.getConfiguration(),
|
|
189
|
+
oCard = this.getCardInstance(),
|
|
190
|
+
oLoadingPlaceholder = this.getAggregation("_loadingPlaceholder");
|
|
185
191
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
192
|
+
if (!oLoadingPlaceholder && oConfiguration) {
|
|
193
|
+
this.setAggregation("_loadingPlaceholder", this.createLoadingPlaceholder(oConfiguration));
|
|
194
|
+
oLoadingPlaceholder = this.getAggregation("_loadingPlaceholder");
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
if (oLoadingPlaceholder && oCard) {
|
|
198
|
+
oLoadingPlaceholder.setRenderTooltip(oCard.getPreviewMode() !== CardPreviewMode.Abstract);
|
|
199
|
+
|
|
200
|
+
if (typeof this._getTable === "function") {
|
|
201
|
+
oLoadingPlaceholder.setHasContent((this._getTable().getColumns().length > 0));
|
|
202
|
+
}
|
|
203
|
+
}
|
|
191
204
|
};
|
|
192
205
|
|
|
193
206
|
/**
|
|
@@ -231,6 +244,15 @@ sap.ui.define([
|
|
|
231
244
|
this._sContentBindingPath = null;
|
|
232
245
|
};
|
|
233
246
|
|
|
247
|
+
/**
|
|
248
|
+
* @private
|
|
249
|
+
* @param {object} oConfiguration the content configuration
|
|
250
|
+
* @returns {sap.f.cards.loading.BasePlaceholder} placeholder instance
|
|
251
|
+
*/
|
|
252
|
+
BaseContent.prototype.createLoadingPlaceholder = function (oConfiguration) {
|
|
253
|
+
return new GenericPlaceholder();
|
|
254
|
+
};
|
|
255
|
+
|
|
234
256
|
/**
|
|
235
257
|
* Can be used in subclasses to load lazy dependencies.
|
|
236
258
|
* @param {sap.ui.integration.util.Manifest} oCardManifest The card manifest.
|
|
@@ -445,6 +467,7 @@ sap.ui.define([
|
|
|
445
467
|
oModel = oCard.getModel(oDataSettings.name);
|
|
446
468
|
} else if (this._oDataProvider) {
|
|
447
469
|
oModel = new ObservableModel();
|
|
470
|
+
oModel.setSizeLimit(oCard.getModelSizeLimit());
|
|
448
471
|
this.setModel(oModel);
|
|
449
472
|
}
|
|
450
473
|
|
|
@@ -803,5 +826,14 @@ sap.ui.define([
|
|
|
803
826
|
return oCard.getId() + "-header-title-inner";
|
|
804
827
|
};
|
|
805
828
|
|
|
829
|
+
/**
|
|
830
|
+
* @private
|
|
831
|
+
* @ui5-restricted sap.ui.integration
|
|
832
|
+
* @returns {boolean} Whether the card has attached actions that are defined at content level
|
|
833
|
+
*/
|
|
834
|
+
BaseContent.prototype.isInteractive = function () {
|
|
835
|
+
return this.hasListeners("press");
|
|
836
|
+
};
|
|
837
|
+
|
|
806
838
|
return BaseContent;
|
|
807
839
|
});
|
|
@@ -49,8 +49,8 @@ sap.ui.define([
|
|
|
49
49
|
.class(sClass)
|
|
50
50
|
.class("sapFCardBaseContent");
|
|
51
51
|
|
|
52
|
-
if (oCardContent.
|
|
53
|
-
oRm.class("
|
|
52
|
+
if (oCardContent.isInteractive()) {
|
|
53
|
+
oRm.class("sapFCardSectionClickable");
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
if (oCard && oCard.getHeight() === "auto") { // if there is no height specified the default value is "auto"
|
|
@@ -10,6 +10,7 @@ sap.ui.define([
|
|
|
10
10
|
"sap/ui/integration/cards/BaseContent",
|
|
11
11
|
"sap/ui/integration/util/BindingHelper",
|
|
12
12
|
"sap/ui/integration/util/BindingResolver",
|
|
13
|
+
"sap/f/cards/loading/CalendarPlaceholder",
|
|
13
14
|
"sap/f/CalendarAppointmentInCard",
|
|
14
15
|
"sap/f/CalendarInCard",
|
|
15
16
|
"sap/f/PlanningCalendarInCardLegend",
|
|
@@ -27,14 +28,17 @@ sap.ui.define([
|
|
|
27
28
|
"sap/ui/core/date/UniversalDate",
|
|
28
29
|
"sap/ui/unified/CalendarLegendItem",
|
|
29
30
|
"sap/ui/core/Configuration",
|
|
30
|
-
"sap/ui/core/date/UI5Date"
|
|
31
|
-
|
|
31
|
+
"sap/ui/core/date/UI5Date",
|
|
32
|
+
"sap/ui/unified/DateRange",
|
|
33
|
+
"sap/ui/core/Core"
|
|
34
|
+
],
|
|
32
35
|
function (CalendarContentRenderer,
|
|
33
36
|
ResizeHandler,
|
|
34
37
|
library,
|
|
35
38
|
BaseContent,
|
|
36
39
|
BindingHelper,
|
|
37
40
|
BindingResolver,
|
|
41
|
+
CalendarPlaceholder,
|
|
38
42
|
CalendarAppointmentInCard,
|
|
39
43
|
CalendarInCard,
|
|
40
44
|
PlanningCalendarInCardLegend,
|
|
@@ -52,7 +56,9 @@ sap.ui.define([
|
|
|
52
56
|
UniversalDate,
|
|
53
57
|
CalendarLegendItem,
|
|
54
58
|
Configuration,
|
|
55
|
-
UI5Date
|
|
59
|
+
UI5Date,
|
|
60
|
+
DateRange,
|
|
61
|
+
Core
|
|
56
62
|
) {
|
|
57
63
|
"use strict";
|
|
58
64
|
|
|
@@ -73,7 +79,7 @@ sap.ui.define([
|
|
|
73
79
|
* @extends sap.ui.integration.cards.BaseContent
|
|
74
80
|
*
|
|
75
81
|
* @author SAP SE
|
|
76
|
-
* @version 1.
|
|
82
|
+
* @version 1.115.0
|
|
77
83
|
*
|
|
78
84
|
* @constructor
|
|
79
85
|
* @private
|
|
@@ -104,6 +110,49 @@ sap.ui.define([
|
|
|
104
110
|
}
|
|
105
111
|
});
|
|
106
112
|
|
|
113
|
+
/**
|
|
114
|
+
* Changes the calendar view to the specified month.
|
|
115
|
+
*
|
|
116
|
+
* @ui5-restricted
|
|
117
|
+
* @private
|
|
118
|
+
* @param {int} iMonth The selected month, which month the calendar should display.
|
|
119
|
+
*/
|
|
120
|
+
CalendarContent.prototype.changeMonth = function (iMonth) {
|
|
121
|
+
this._oCalendar._getMonthPicker().setMonth(iMonth);
|
|
122
|
+
this._oCalendar._selectMonth();
|
|
123
|
+
this.invalidate();
|
|
124
|
+
this.getCardInstance().fireStateChanged();
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Changes the calendar date to the passed date.
|
|
129
|
+
*
|
|
130
|
+
* @ui5-restricted
|
|
131
|
+
* @private
|
|
132
|
+
* @param {Date} oDate The selected date, the month and year of which the calendar should display.
|
|
133
|
+
*/
|
|
134
|
+
CalendarContent.prototype.changeDate = function (oDate) {
|
|
135
|
+
var oCardActions = this.getActions(),
|
|
136
|
+
oDateRange = new DateRange(),
|
|
137
|
+
oCal = this._oCalendar;
|
|
138
|
+
|
|
139
|
+
oDateRange.setStartDate(oDate);
|
|
140
|
+
oCal.destroySelectedDates();
|
|
141
|
+
oCal.addAggregation('selectedDates', oDateRange);
|
|
142
|
+
this._oFocusedDate = oCal.getSelectedDates()[0] ? oCal.getSelectedDates()[0] : null;
|
|
143
|
+
oCal.addSelectedDate(oDateRange);
|
|
144
|
+
|
|
145
|
+
oCal._getYearPicker().setYear(oDate.getFullYear());
|
|
146
|
+
oCal._getYearPicker().fireSelect();
|
|
147
|
+
oCal._selectYear();
|
|
148
|
+
|
|
149
|
+
this.changeMonth(oDate.getMonth());
|
|
150
|
+
|
|
151
|
+
oCardActions.fireAction(this, "DateChange", {
|
|
152
|
+
"selectedDate": oDate
|
|
153
|
+
});
|
|
154
|
+
};
|
|
155
|
+
|
|
107
156
|
/**
|
|
108
157
|
* Creates the internal structure of the card.
|
|
109
158
|
* @private
|
|
@@ -225,6 +274,21 @@ sap.ui.define([
|
|
|
225
274
|
oEvent.control.toggleStyleClass("sapMPCInCardTwoColumns", oEvent.target.getBoundingClientRect().width > 576);
|
|
226
275
|
};
|
|
227
276
|
|
|
277
|
+
/**
|
|
278
|
+
* @override
|
|
279
|
+
*/
|
|
280
|
+
CalendarContent.prototype.createLoadingPlaceholder = function (oConfiguration) {
|
|
281
|
+
var oCard = this.getCardInstance(),
|
|
282
|
+
iContentMinItems = oCard.getContentMinItems(oConfiguration);
|
|
283
|
+
|
|
284
|
+
return new CalendarPlaceholder({
|
|
285
|
+
minItems: iContentMinItems !== null ? iContentMinItems : 2,
|
|
286
|
+
maxLegendItems: oConfiguration.maxLegendItems ? parseInt(oConfiguration.maxLegendItems) : 2,
|
|
287
|
+
item: oConfiguration.item ? oConfiguration.item.template : {},
|
|
288
|
+
legendItem: oConfiguration.legendItem ? oConfiguration.legendItem.template : {}
|
|
289
|
+
});
|
|
290
|
+
};
|
|
291
|
+
|
|
228
292
|
/**
|
|
229
293
|
* @override
|
|
230
294
|
*/
|
|
@@ -275,6 +339,141 @@ sap.ui.define([
|
|
|
275
339
|
}
|
|
276
340
|
};
|
|
277
341
|
|
|
342
|
+
/**
|
|
343
|
+
* @override
|
|
344
|
+
*/
|
|
345
|
+
CalendarContent.prototype.getStaticConfiguration = function () {
|
|
346
|
+
var oConfiguration = this.getParsedConfiguration(),
|
|
347
|
+
aAppointments = this.getAppointments(),
|
|
348
|
+
aSpecialDates = this._oCalendar.getSpecialDates(),
|
|
349
|
+
sLegendId = this._oCalendar.getLegend(),
|
|
350
|
+
oLegend = Core.byId(sLegendId),
|
|
351
|
+
aLegendItems = oLegend.getItems(),
|
|
352
|
+
aLegendAppointmentItems = oLegend.getAppointmentItems(),
|
|
353
|
+
oFocusedDate = this._oCalendar.getSelectedDates()[0] ?
|
|
354
|
+
this._oCalendar.getSelectedDates()[0].getStartDate() :
|
|
355
|
+
null,
|
|
356
|
+
oSelectededDate = this._oCalendar.getSelectedDates()[0] ? this._oCalendar.getSelectedDates()[0] : null,
|
|
357
|
+
oSelectedDateEnd = oSelectededDate.getStartDate ? oSelectededDate.getStartDate().getTime() + 86400000 : null,
|
|
358
|
+
oSelectedJsStartDate = oSelectededDate.getStartDate(),
|
|
359
|
+
iMaxItems = oConfiguration.maxItems,
|
|
360
|
+
iMaxLegendItems = oConfiguration.maxLegendItems,
|
|
361
|
+
sNoItemsText = oConfiguration.noItemsText,
|
|
362
|
+
aResolvedItems = [],
|
|
363
|
+
aResolvedSpecialDates = [],
|
|
364
|
+
aResolvedLegendItems = [],
|
|
365
|
+
bMoreItems = false,
|
|
366
|
+
sFocusedDateISO;
|
|
367
|
+
|
|
368
|
+
sFocusedDateISO = oFocusedDate ? oFocusedDate.toISOString() : null;
|
|
369
|
+
sFocusedDateISO = sFocusedDateISO ? sFocusedDateISO : oConfiguration.date;
|
|
370
|
+
|
|
371
|
+
aAppointments.forEach(function (oItem, i) {
|
|
372
|
+
var oStartDate = oItem.getStartDate(),
|
|
373
|
+
oEndDate = oItem.getEndDate(),
|
|
374
|
+
aTemplateKeys,
|
|
375
|
+
singleAssembledItem,
|
|
376
|
+
bAppInDaY = oStartDate >= oSelectedJsStartDate && oStartDate <= oSelectedDateEnd,
|
|
377
|
+
bAppEndsInDay = oEndDate >= oSelectedJsStartDate && oEndDate <= oSelectedDateEnd,
|
|
378
|
+
bDayInApp = oStartDate <= oSelectedJsStartDate && oEndDate > oSelectedDateEnd,
|
|
379
|
+
bIncludeAppointment = bAppInDaY || bAppEndsInDay || bDayInApp;
|
|
380
|
+
|
|
381
|
+
if (bIncludeAppointment) {
|
|
382
|
+
aTemplateKeys = Object.keys(oConfiguration.item.template);
|
|
383
|
+
singleAssembledItem = {};
|
|
384
|
+
|
|
385
|
+
aTemplateKeys.forEach(function(sKey) {
|
|
386
|
+
var oBindingInfo = BindingHelper.prependRelativePaths(oConfiguration.item.template[sKey], this.getBindingPath("appointments") + "/" + i);
|
|
387
|
+
|
|
388
|
+
singleAssembledItem[sKey] = BindingResolver.resolveValue(oBindingInfo, this);
|
|
389
|
+
}.bind(this));
|
|
390
|
+
singleAssembledItem.startDate = new Date(singleAssembledItem.startDate).toISOString();
|
|
391
|
+
if (singleAssembledItem.endDate) {
|
|
392
|
+
singleAssembledItem.endDate = new Date(singleAssembledItem.endDate).toISOString();
|
|
393
|
+
}
|
|
394
|
+
aResolvedItems.push(singleAssembledItem);
|
|
395
|
+
if (aResolvedItems.length > oConfiguration.maxItems) {
|
|
396
|
+
bMoreItems = true;
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
}.bind(this));
|
|
400
|
+
|
|
401
|
+
aSpecialDates.forEach(function (oItem, i) {
|
|
402
|
+
var oCal = this._oCalendar,
|
|
403
|
+
oStartDate = oItem.getStartDate(),
|
|
404
|
+
oEndDate = oItem.getEndDate(),
|
|
405
|
+
oViewedMonth = oCal._getMonthPicker().getMonth() ?
|
|
406
|
+
oCal._getMonthPicker().getMonth() :
|
|
407
|
+
oCal._getFocusedDate().getMonth(),
|
|
408
|
+
oViewedYear = Number(oCal._getYearString()),
|
|
409
|
+
bStartsWithinMonth = oStartDate.getMonth() === oViewedMonth,
|
|
410
|
+
bEndsWithinMonth = oEndDate ? oEndDate.getMonth() === oViewedMonth : false,
|
|
411
|
+
bStartsWithinYear = oStartDate.getFullYear() === oViewedYear,
|
|
412
|
+
bEndsWithinYear = oItem.getEndDate() ?
|
|
413
|
+
oItem.getEndDate().getFullYear() === oViewedYear :
|
|
414
|
+
bStartsWithinYear,
|
|
415
|
+
bIncludeSpecialDate = (bStartsWithinMonth || bEndsWithinMonth) && (bStartsWithinYear || bEndsWithinYear),
|
|
416
|
+
aTemplateKeys,
|
|
417
|
+
oResolvedDate;
|
|
418
|
+
|
|
419
|
+
if (bIncludeSpecialDate) {
|
|
420
|
+
aTemplateKeys = Object.keys(oConfiguration.specialDate.template);
|
|
421
|
+
var oBindingInfo = {};
|
|
422
|
+
|
|
423
|
+
aTemplateKeys.forEach(function(sKey) {
|
|
424
|
+
oBindingInfo[sKey] = BindingHelper.prependRelativePaths(oConfiguration.specialDate.template[sKey], this._oCalendar.getBindingPath("specialDates") + "/" + i);
|
|
425
|
+
}.bind(this));
|
|
426
|
+
|
|
427
|
+
oResolvedDate = BindingResolver.resolveValue(oBindingInfo, this);
|
|
428
|
+
oResolvedDate.startDate = new Date(oResolvedDate.startDate).toISOString();
|
|
429
|
+
if (oResolvedDate.endDate) {
|
|
430
|
+
oResolvedDate.endDate = new Date(oResolvedDate.endDate).toISOString();
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
aResolvedSpecialDates.push(oResolvedDate);
|
|
434
|
+
}
|
|
435
|
+
}.bind(this));
|
|
436
|
+
|
|
437
|
+
aLegendItems.forEach(function (oItem, i) {
|
|
438
|
+
var aTemplateKeys = Object.keys(oConfiguration.legendItem.template),
|
|
439
|
+
singleAssembledItem = {};
|
|
440
|
+
|
|
441
|
+
aTemplateKeys.forEach(function(sKey) {
|
|
442
|
+
var oBindingInfo = BindingHelper.prependRelativePaths(oConfiguration.legendItem.template[sKey], oLegend.getBindingPath("items") + "/" + i);
|
|
443
|
+
|
|
444
|
+
singleAssembledItem[sKey] = BindingResolver.resolveValue(oBindingInfo, this);
|
|
445
|
+
}.bind(this));
|
|
446
|
+
aResolvedLegendItems.push(singleAssembledItem);
|
|
447
|
+
}.bind(this));
|
|
448
|
+
|
|
449
|
+
aLegendAppointmentItems.forEach(function (oItem, i) {
|
|
450
|
+
var aTemplateKeys = Object.keys(oConfiguration.legendItem.template),
|
|
451
|
+
singleAssembledItem = {};
|
|
452
|
+
|
|
453
|
+
aTemplateKeys.forEach(function(sKey) {
|
|
454
|
+
var oBindingInfo = BindingHelper.prependRelativePaths(oConfiguration.legendItem.template[sKey], oLegend.getBindingPath("items") + "/" + i);
|
|
455
|
+
|
|
456
|
+
singleAssembledItem[sKey] = BindingResolver.resolveValue(oBindingInfo, this);
|
|
457
|
+
}.bind(this));
|
|
458
|
+
aResolvedLegendItems.push(singleAssembledItem);
|
|
459
|
+
}.bind(this));
|
|
460
|
+
|
|
461
|
+
var oStaticConfiguration = {};
|
|
462
|
+
|
|
463
|
+
oStaticConfiguration.items = aResolvedItems;
|
|
464
|
+
oStaticConfiguration.specialDates = aResolvedSpecialDates;
|
|
465
|
+
oStaticConfiguration.legendItems = aResolvedLegendItems;
|
|
466
|
+
oStaticConfiguration.date = sFocusedDateISO;
|
|
467
|
+
oStaticConfiguration.maxItems = iMaxItems;
|
|
468
|
+
oStaticConfiguration.maxLegendItems = iMaxLegendItems;
|
|
469
|
+
oStaticConfiguration.noItemsText = sNoItemsText;
|
|
470
|
+
if (bMoreItems) {
|
|
471
|
+
oStaticConfiguration.moreItems = BindingResolver.resolveValue(oConfiguration.moreItems, this);
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
return oStaticConfiguration;
|
|
475
|
+
};
|
|
476
|
+
|
|
278
477
|
/**
|
|
279
478
|
* Sets values in the parameters' model to be used as a counter in the header part ot the card.
|
|
280
479
|
*
|
|
@@ -556,7 +755,7 @@ sap.ui.define([
|
|
|
556
755
|
* @param {Object} sTime The date template of the configuration object.
|
|
557
756
|
*/
|
|
558
757
|
CalendarContent.prototype._addDate = function (sTime) {
|
|
559
|
-
if (
|
|
758
|
+
if (BindingHelper.isBindingInfo(sTime)) {
|
|
560
759
|
if (!sTime) {
|
|
561
760
|
return;
|
|
562
761
|
}
|
|
@@ -581,7 +780,7 @@ sap.ui.define([
|
|
|
581
780
|
* @param {Object} mMaxItems The mMaxItems template of the configuration object.
|
|
582
781
|
*/
|
|
583
782
|
CalendarContent.prototype._addMaxItems = function (mMaxItems) {
|
|
584
|
-
if (
|
|
783
|
+
if (BindingHelper.isBindingInfo(mMaxItems)) {
|
|
585
784
|
mMaxItems && this.bindProperty("visibleAppointmentsCount", mMaxItems);
|
|
586
785
|
} else {
|
|
587
786
|
this.setVisibleAppointmentsCount(mMaxItems);
|
|
@@ -595,7 +794,7 @@ sap.ui.define([
|
|
|
595
794
|
* @param {Object} mMaxLegendItems The maxLegendItems template of the configuration object.
|
|
596
795
|
*/
|
|
597
796
|
CalendarContent.prototype._addMaxLegendItems = function (mMaxLegendItems) {
|
|
598
|
-
if (
|
|
797
|
+
if (BindingHelper.isBindingInfo(mMaxLegendItems)) {
|
|
599
798
|
mMaxLegendItems && this._oLegend.bindProperty("visibleLegendItemsCount", mMaxLegendItems);
|
|
600
799
|
} else {
|
|
601
800
|
this._oLegend.setVisibleLegendItemsCount(mMaxLegendItems);
|
|
@@ -609,7 +808,7 @@ sap.ui.define([
|
|
|
609
808
|
* @param {Object} mNoItemsText The noItemsText template of the configuration object.
|
|
610
809
|
*/
|
|
611
810
|
CalendarContent.prototype._addNoItemsText = function (mNoItemsText) {
|
|
612
|
-
if (
|
|
811
|
+
if (BindingHelper.isBindingInfo(mNoItemsText)) {
|
|
613
812
|
mNoItemsText && this.bindProperty("noAppointmentsText", mNoItemsText);
|
|
614
813
|
} else {
|
|
615
814
|
this.setNoAppointmentsText(mNoItemsText);
|
|
@@ -9,16 +9,14 @@ sap.ui.define([
|
|
|
9
9
|
"sap/base/util/merge",
|
|
10
10
|
"sap/ui/integration/controls/ActionsStrip",
|
|
11
11
|
"sap/ui/integration/controls/Paginator",
|
|
12
|
-
"sap/ui/integration/util/BindingHelper"
|
|
13
|
-
"sap/ui/integration/util/BindingResolver"
|
|
12
|
+
"sap/ui/integration/util/BindingHelper"
|
|
14
13
|
], function (
|
|
15
14
|
Control,
|
|
16
15
|
Core,
|
|
17
16
|
merge,
|
|
18
17
|
ActionsStrip,
|
|
19
18
|
Paginator,
|
|
20
|
-
BindingHelper
|
|
21
|
-
BindingResolver
|
|
19
|
+
BindingHelper
|
|
22
20
|
) {
|
|
23
21
|
"use strict";
|
|
24
22
|
|
|
@@ -33,7 +31,7 @@ sap.ui.define([
|
|
|
33
31
|
* @extends sap.ui.core.Control
|
|
34
32
|
*
|
|
35
33
|
* @author SAP SE
|
|
36
|
-
* @version 1.
|
|
34
|
+
* @version 1.115.0
|
|
37
35
|
*
|
|
38
36
|
* @constructor
|
|
39
37
|
* @ui5-restricted
|
|
@@ -114,7 +112,7 @@ sap.ui.define([
|
|
|
114
112
|
// to do: if more precise check is needed search recursively
|
|
115
113
|
return (oConfiguration.actionsStrip || []).some(function (oButtonConfig) {
|
|
116
114
|
for (var sKey in oButtonConfig) {
|
|
117
|
-
if (
|
|
115
|
+
if (BindingHelper.isBindingInfo(oButtonConfig[sKey])) {
|
|
118
116
|
return true;
|
|
119
117
|
}
|
|
120
118
|
}
|
|
@@ -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.115.0
|
|
46
46
|
*
|
|
47
47
|
* @constructor
|
|
48
48
|
* @private
|
|
@@ -153,7 +153,7 @@ sap.ui.define([
|
|
|
153
153
|
/**
|
|
154
154
|
* @override
|
|
155
155
|
*/
|
|
156
|
-
Header.prototype.
|
|
156
|
+
Header.prototype.isInteractive = function () {
|
|
157
157
|
return this.getInteractive();
|
|
158
158
|
};
|
|
159
159
|
|