@openui5/sap.ui.integration 1.120.7 → 1.121.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 +23 -21
- package/THIRDPARTY.txt +6 -43
- 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 +14 -12
- package/src/sap/ui/integration/cards/AdaptiveContent.js +16 -16
- package/src/sap/ui/integration/cards/AnalyticalContent.js +37 -11
- package/src/sap/ui/integration/cards/AnalyticsCloudContent.js +1 -1
- package/src/sap/ui/integration/cards/BaseContent.js +13 -4
- package/src/sap/ui/integration/cards/BaseContentRenderer.js +1 -1
- package/src/sap/ui/integration/cards/BaseListContent.js +1 -1
- package/src/sap/ui/integration/cards/CalendarContent.js +9 -9
- package/src/sap/ui/integration/cards/CalendarContentRenderer.js +10 -7
- package/src/sap/ui/integration/cards/ComponentContent.js +1 -1
- package/src/sap/ui/integration/cards/Footer.js +11 -5
- package/src/sap/ui/integration/cards/Header.js +4 -4
- package/src/sap/ui/integration/cards/ListContent.js +8 -2
- package/src/sap/ui/integration/cards/ListContentRenderer.js +5 -3
- package/src/sap/ui/integration/cards/NumericHeader.js +4 -4
- package/src/sap/ui/integration/cards/ObjectContent.js +42 -5
- package/src/sap/ui/integration/cards/TableContent.js +1 -1
- package/src/sap/ui/integration/cards/TimelineContent.js +4 -4
- package/src/sap/ui/integration/cards/WebPageContent.js +1 -1
- package/src/sap/ui/integration/cards/actions/BaseAction.js +4 -4
- package/src/sap/ui/integration/cards/actions/CardActions.js +1 -1
- package/src/sap/ui/integration/cards/actions/ShowCardAction.js +3 -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/adaptivecards/overwrites/inputsGeneralOverwrites.js +3 -3
- package/src/sap/ui/integration/cards/data/CsrfToken.js +61 -0
- package/src/sap/ui/integration/cards/filters/BaseFilter.js +33 -32
- package/src/sap/ui/integration/cards/filters/ComboBoxFilter.js +254 -0
- 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 +9 -3
- package/src/sap/ui/integration/cards/filters/SearchFilter.js +16 -3
- 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 +189 -84
- package/src/sap/ui/integration/controls/ActionsToolbar.js +12 -9
- package/src/sap/ui/integration/controls/BlockingMessage.js +93 -44
- package/src/sap/ui/integration/controls/ImageWithOverlay.js +199 -0
- package/src/sap/ui/integration/controls/ImageWithOverlayRenderer.js +36 -0
- package/src/sap/ui/integration/controls/LinkWithIcon.js +2 -2
- package/src/sap/ui/integration/controls/ListContentItem.js +10 -7
- package/src/sap/ui/integration/controls/ListContentItemRenderer.js +5 -4
- package/src/sap/ui/integration/controls/Microchart.js +4 -4
- package/src/sap/ui/integration/controls/MicrochartLegend.js +4 -4
- package/src/sap/ui/integration/controls/MicrochartLegendRenderer.js +3 -3
- package/src/sap/ui/integration/controls/ObjectStatus.js +3 -1
- package/src/sap/ui/integration/controls/Paginator.js +19 -11
- package/src/sap/ui/integration/controls/PaginatorRenderer.js +4 -4
- package/src/sap/ui/integration/designtime/baseEditor/BaseEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/PropertyEditor.js +6 -4
- package/src/sap/ui/integration/designtime/baseEditor/PropertyEditors.js +8 -6
- 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/config/index.js +5 -16
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_mk.properties +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 +5 -3
- 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 +14 -6
- package/src/sap/ui/integration/designtime/editor/CardPreview.js +27 -11
- package/src/sap/ui/integration/designtime/editor/css/CardPreview.css +30 -17
- package/src/sap/ui/integration/editor/Editor.js +23 -25
- 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 +21 -18
- package/src/sap/ui/integration/editor/css/Editor.css +9 -7
- package/src/sap/ui/integration/editor/fields/BaseField.js +27 -7
- package/src/sap/ui/integration/editor/fields/BooleanField.js +1 -1
- package/src/sap/ui/integration/editor/fields/DateField.js +5 -5
- package/src/sap/ui/integration/editor/fields/DateTimeField.js +5 -5
- package/src/sap/ui/integration/editor/fields/DestinationField.js +1 -1
- package/src/sap/ui/integration/editor/fields/GroupField.js +11 -13
- package/src/sap/ui/integration/editor/fields/IntegerField.js +5 -5
- package/src/sap/ui/integration/editor/fields/NumberField.js +5 -5
- package/src/sap/ui/integration/editor/fields/ObjectField.js +171 -13
- package/src/sap/ui/integration/editor/fields/ObjectListField.js +2 -1
- package/src/sap/ui/integration/editor/fields/StringField.js +4 -4
- package/src/sap/ui/integration/editor/fields/StringListField.js +1 -1
- package/src/sap/ui/integration/editor/fields/fragment/Controller.js +5 -5
- package/src/sap/ui/integration/editor/fields/viz/ColorSelect.js +2 -3
- package/src/sap/ui/integration/editor/fields/viz/IconSelect.js +12 -8
- package/src/sap/ui/integration/editor/fields/viz/ImageSelect.js +1 -1
- package/src/sap/ui/integration/editor/fields/viz/ShapeSelect.js +1 -1
- package/src/sap/ui/integration/editor/fields/viz/VizBase.js +1 -1
- package/src/sap/ui/integration/formatters/IconFormatter.js +5 -5
- package/src/sap/ui/integration/library-bootstrap.js +21 -20
- package/src/sap/ui/integration/library.js +23 -8
- package/src/sap/ui/integration/messagebundle.properties +3 -3
- package/src/sap/ui/integration/messagebundle_ar.properties +2 -0
- package/src/sap/ui/integration/messagebundle_bg.properties +2 -0
- package/src/sap/ui/integration/messagebundle_ca.properties +2 -0
- package/src/sap/ui/integration/messagebundle_cnr.properties +2 -0
- package/src/sap/ui/integration/messagebundle_cs.properties +2 -0
- package/src/sap/ui/integration/messagebundle_cy.properties +2 -0
- package/src/sap/ui/integration/messagebundle_da.properties +2 -0
- package/src/sap/ui/integration/messagebundle_de.properties +2 -0
- package/src/sap/ui/integration/messagebundle_el.properties +2 -0
- package/src/sap/ui/integration/messagebundle_en.properties +157 -0
- package/src/sap/ui/integration/messagebundle_en_GB.properties +2 -0
- package/src/sap/ui/integration/messagebundle_en_US_saprigi.properties +154 -152
- package/src/sap/ui/integration/messagebundle_es.properties +2 -0
- package/src/sap/ui/integration/messagebundle_es_MX.properties +2 -0
- package/src/sap/ui/integration/messagebundle_et.properties +2 -0
- package/src/sap/ui/integration/messagebundle_fi.properties +2 -0
- package/src/sap/ui/integration/messagebundle_fr.properties +2 -0
- package/src/sap/ui/integration/messagebundle_fr_CA.properties +2 -0
- package/src/sap/ui/integration/messagebundle_hi.properties +2 -0
- package/src/sap/ui/integration/messagebundle_hr.properties +2 -0
- package/src/sap/ui/integration/messagebundle_hu.properties +2 -0
- package/src/sap/ui/integration/messagebundle_id.properties +2 -0
- package/src/sap/ui/integration/messagebundle_it.properties +2 -0
- package/src/sap/ui/integration/messagebundle_iw.properties +2 -0
- package/src/sap/ui/integration/messagebundle_ja.properties +2 -0
- package/src/sap/ui/integration/messagebundle_kk.properties +2 -0
- package/src/sap/ui/integration/messagebundle_ko.properties +2 -0
- package/src/sap/ui/integration/messagebundle_lt.properties +2 -0
- package/src/sap/ui/integration/messagebundle_lv.properties +2 -0
- package/src/sap/ui/integration/messagebundle_mk.properties +4 -2
- package/src/sap/ui/integration/messagebundle_ms.properties +2 -0
- package/src/sap/ui/integration/messagebundle_nl.properties +2 -0
- package/src/sap/ui/integration/messagebundle_no.properties +2 -0
- package/src/sap/ui/integration/messagebundle_pl.properties +2 -0
- package/src/sap/ui/integration/messagebundle_pt.properties +2 -0
- package/src/sap/ui/integration/messagebundle_pt_PT.properties +2 -0
- package/src/sap/ui/integration/messagebundle_ro.properties +2 -0
- package/src/sap/ui/integration/messagebundle_ru.properties +2 -0
- package/src/sap/ui/integration/messagebundle_sh.properties +2 -0
- package/src/sap/ui/integration/messagebundle_sk.properties +2 -0
- package/src/sap/ui/integration/messagebundle_sl.properties +2 -0
- package/src/sap/ui/integration/messagebundle_sr.properties +2 -0
- package/src/sap/ui/integration/messagebundle_sv.properties +2 -0
- package/src/sap/ui/integration/messagebundle_th.properties +2 -0
- package/src/sap/ui/integration/messagebundle_tr.properties +2 -0
- package/src/sap/ui/integration/messagebundle_uk.properties +2 -0
- package/src/sap/ui/integration/messagebundle_vi.properties +2 -0
- package/src/sap/ui/integration/messagebundle_zh_CN.properties +2 -0
- package/src/sap/ui/integration/messagebundle_zh_TW.properties +2 -0
- 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 +198 -22
- package/src/sap/ui/integration/themes/base/ActionsStrip.less +6 -0
- package/src/sap/ui/integration/themes/base/AnalyticsCloudContent.less +2 -2
- package/src/sap/ui/integration/themes/base/Card.less +6 -1
- package/src/sap/ui/integration/themes/base/ImageWithOverlay.less +47 -0
- package/src/sap/ui/integration/themes/base/ListContentItem.less +12 -0
- package/src/sap/ui/integration/themes/base/ObjectContent.less +20 -2
- package/src/sap/ui/integration/themes/base/{ObjectStatusIcons.less → ObjectStatus.less} +12 -8
- package/src/sap/ui/integration/themes/base/library.source.less +2 -1
- package/src/sap/ui/integration/util/BaseFactory.js +1 -1
- package/src/sap/ui/integration/util/BindingHelper.js +1 -1
- package/src/sap/ui/integration/util/BindingResolver.js +1 -1
- package/src/sap/ui/integration/util/CacheAndRequestDataProvider.js +4 -4
- package/src/sap/ui/integration/util/CardMerger.js +4 -4
- package/src/sap/ui/integration/util/CardObserver.js +1 -1
- package/src/sap/ui/integration/util/ComboBoxHelper.js +59 -0
- package/src/sap/ui/integration/util/ContentFactory.js +1 -1
- package/src/sap/ui/integration/util/CsrfTokenHandler.js +130 -148
- package/src/sap/ui/integration/util/DataProvider.js +22 -9
- package/src/sap/ui/integration/util/DataProviderFactory.js +32 -12
- package/src/sap/ui/integration/util/Destinations.js +1 -1
- package/src/sap/ui/integration/util/ErrorHandler.js +3 -2
- package/src/sap/ui/integration/util/ExtensionDataProvider.js +1 -1
- package/src/sap/ui/integration/util/Form.js +9 -34
- package/src/sap/ui/integration/util/HeaderFactory.js +6 -4
- package/src/sap/ui/integration/util/JSONBindingHelper.js +1 -1
- package/src/sap/ui/integration/util/LoadingProvider.js +1 -1
- package/src/sap/ui/integration/util/Manifest.js +22 -7
- package/src/sap/ui/integration/util/ManifestResolver.js +3 -3
- package/src/sap/ui/integration/util/ParameterMap.js +5 -3
- package/src/sap/ui/integration/util/RequestDataProvider.js +27 -22
- 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 +1 -1
- package/src/sap/ui/integration/widgets/Card.js +47 -33
- package/src/sap/ui/integration/widgets/CardRenderer.js +6 -1
- package/src/sap-ui-integration.js +19 -17
- package/ui5.yaml +4 -0
- package/LICENSES/BSD-2-Clause.txt +0 -22
|
@@ -5,22 +5,24 @@
|
|
|
5
5
|
*/
|
|
6
6
|
sap.ui.define([
|
|
7
7
|
"sap/ui/core/Control",
|
|
8
|
-
"sap/ui/core/
|
|
8
|
+
"sap/ui/core/Element",
|
|
9
9
|
"sap/ui/core/InvisibleText",
|
|
10
10
|
"sap/base/Log",
|
|
11
11
|
"sap/ui/core/Icon",
|
|
12
12
|
"sap/m/HBox",
|
|
13
13
|
"sap/m/Text",
|
|
14
|
+
"sap/ui/core/Lib",
|
|
14
15
|
"sap/ui/integration/model/ObservableModel",
|
|
15
16
|
"sap/ui/integration/util/LoadingProvider"
|
|
16
|
-
], function
|
|
17
|
+
], function(
|
|
17
18
|
Control,
|
|
18
|
-
|
|
19
|
+
Element,
|
|
19
20
|
InvisibleText,
|
|
20
21
|
Log,
|
|
21
22
|
Icon,
|
|
22
23
|
HBox,
|
|
23
24
|
Text,
|
|
25
|
+
Library,
|
|
24
26
|
ObservableModel,
|
|
25
27
|
LoadingProvider
|
|
26
28
|
) {
|
|
@@ -37,7 +39,7 @@ sap.ui.define([
|
|
|
37
39
|
* @extends sap.ui.core.Control
|
|
38
40
|
*
|
|
39
41
|
* @author SAP SE
|
|
40
|
-
* @version 1.
|
|
42
|
+
* @version 1.121.0
|
|
41
43
|
*
|
|
42
44
|
* @constructor
|
|
43
45
|
* @private
|
|
@@ -73,7 +75,9 @@ sap.ui.define([
|
|
|
73
75
|
/**
|
|
74
76
|
* The hidden label for this control
|
|
75
77
|
*/
|
|
76
|
-
_label: { type: "sap.ui.core.InvisibleText", multiple: false, visibility: "hidden" }
|
|
78
|
+
_label: { type: "sap.ui.core.InvisibleText", multiple: false, visibility: "hidden" },
|
|
79
|
+
|
|
80
|
+
_error: { type: "sap.m.HBox", multiple: false, visibility: "hidden" }
|
|
77
81
|
},
|
|
78
82
|
associations: {
|
|
79
83
|
|
|
@@ -81,24 +85,32 @@ sap.ui.define([
|
|
|
81
85
|
* Association with the parent Card that contains this filter.
|
|
82
86
|
*/
|
|
83
87
|
card: { type: "sap.ui.integration.widgets.Card", multiple: false }
|
|
88
|
+
},
|
|
89
|
+
events: {
|
|
90
|
+
change: {
|
|
91
|
+
parameters: {
|
|
92
|
+
key: { type: "string"},
|
|
93
|
+
value: { type: "string"}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
84
96
|
}
|
|
85
97
|
|
|
86
98
|
},
|
|
87
99
|
renderer: {
|
|
88
100
|
apiVersion: 2,
|
|
89
101
|
render: function (oRM, oFilter) {
|
|
90
|
-
|
|
102
|
+
const oError = oFilter.getAggregation("_error");
|
|
91
103
|
|
|
92
104
|
oRM.openStart("div", oFilter).class("sapFCardFilter");
|
|
93
105
|
|
|
94
|
-
if (
|
|
106
|
+
if (oFilter.isLoading()) {
|
|
95
107
|
oRM.class("sapFCardFilterLoading");
|
|
96
108
|
}
|
|
97
109
|
|
|
98
110
|
oRM.openEnd();
|
|
99
111
|
|
|
100
|
-
if (
|
|
101
|
-
oRM.renderControl(
|
|
112
|
+
if (oError) {
|
|
113
|
+
oRM.renderControl(oError);
|
|
102
114
|
} else {
|
|
103
115
|
oRM.renderControl(oFilter.getField());
|
|
104
116
|
}
|
|
@@ -185,31 +197,26 @@ sap.ui.define([
|
|
|
185
197
|
* @returns {sap.ui.integration.widgets.Card} The card instance.
|
|
186
198
|
*/
|
|
187
199
|
BaseFilter.prototype.getCardInstance = function () {
|
|
188
|
-
return
|
|
189
|
-
};
|
|
190
|
-
|
|
191
|
-
BaseFilter.prototype._hasError = function () {
|
|
192
|
-
return !!this._bError;
|
|
200
|
+
return Element.getElementById(this.getCard());
|
|
193
201
|
};
|
|
194
202
|
|
|
195
|
-
BaseFilter.prototype.
|
|
196
|
-
var sMessage =
|
|
203
|
+
BaseFilter.prototype._showError = function () {
|
|
204
|
+
var sMessage = Library.getResourceBundleFor("sap.ui.integration").getText("CARD_FILTER_DATA_LOAD_ERROR");
|
|
197
205
|
|
|
198
|
-
|
|
206
|
+
this.destroyAggregation("_error");
|
|
207
|
+
this.setAggregation("_error", new HBox({
|
|
199
208
|
justifyContent: "Center",
|
|
200
209
|
alignItems: "Center",
|
|
201
210
|
items: [
|
|
202
211
|
new Icon({ src: "sap-icon://message-error", size: "1rem" }).addStyleClass("sapUiTinyMargin"),
|
|
203
212
|
new Text({ text: sMessage })
|
|
204
213
|
]
|
|
205
|
-
});
|
|
214
|
+
}));
|
|
206
215
|
};
|
|
207
216
|
|
|
208
217
|
BaseFilter.prototype._handleError = function (sLogMessage) {
|
|
209
218
|
Log.error(sLogMessage);
|
|
210
|
-
|
|
211
|
-
this._bError = true;
|
|
212
|
-
this.invalidate();
|
|
219
|
+
this._showError();
|
|
213
220
|
};
|
|
214
221
|
|
|
215
222
|
BaseFilter.prototype._onDataRequestComplete = function () {
|
|
@@ -276,19 +283,13 @@ sap.ui.define([
|
|
|
276
283
|
};
|
|
277
284
|
|
|
278
285
|
BaseFilter.prototype._syncValue = function () {
|
|
279
|
-
|
|
280
|
-
oCard = this.getCardInstance(),
|
|
281
|
-
mParams = {},
|
|
282
|
-
sManifestKey;
|
|
286
|
+
const oValueForModel = this.getValueForModel();
|
|
283
287
|
|
|
284
288
|
this.setValue(oValueForModel);
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
oCard._fireConfigurationChange(mParams);
|
|
290
|
-
oCard.resetPaginator();
|
|
291
|
-
}
|
|
289
|
+
this.fireChange({
|
|
290
|
+
key: this.getKey(),
|
|
291
|
+
value: oValueForModel.value
|
|
292
|
+
});
|
|
292
293
|
};
|
|
293
294
|
|
|
294
295
|
BaseFilter.prototype._isDataProviderJson = function () {
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
sap.ui.define([
|
|
7
|
+
"./BaseFilter",
|
|
8
|
+
"sap/m/ComboBox",
|
|
9
|
+
"sap/ui/core/ListItem",
|
|
10
|
+
"sap/ui/model/json/JSONModel",
|
|
11
|
+
"sap/ui/integration/util/BindingResolver",
|
|
12
|
+
"sap/ui/integration/util/ComboBoxHelper",
|
|
13
|
+
"sap/base/util/merge"
|
|
14
|
+
], function (
|
|
15
|
+
BaseFilter,
|
|
16
|
+
ComboBox,
|
|
17
|
+
ListItem,
|
|
18
|
+
JSONModel,
|
|
19
|
+
BindingResolver,
|
|
20
|
+
ComboBoxHelper,
|
|
21
|
+
merge
|
|
22
|
+
) {
|
|
23
|
+
"use strict";
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Constructor for a new <code>ComboBoxFilter</code>.
|
|
27
|
+
*
|
|
28
|
+
* @param {string} [sId] ID for the new control, generated automatically if no ID is given
|
|
29
|
+
* @param {object} [mSettings] Initial settings for the new control
|
|
30
|
+
*
|
|
31
|
+
* @class
|
|
32
|
+
*
|
|
33
|
+
* @extends sap.ui.integration.cards.filters.BaseFilter
|
|
34
|
+
*
|
|
35
|
+
* @author SAP SE
|
|
36
|
+
* @version 1.121.0
|
|
37
|
+
*
|
|
38
|
+
* @constructor
|
|
39
|
+
* @private
|
|
40
|
+
* @since 1.121
|
|
41
|
+
* @alias sap.ui.integration.cards.filters.ComboBoxFilter
|
|
42
|
+
*/
|
|
43
|
+
const ComboBoxFilter = BaseFilter.extend("sap.ui.integration.cards.filters.ComboBoxFilter", {
|
|
44
|
+
metadata: {
|
|
45
|
+
library: "sap.ui.integration",
|
|
46
|
+
aggregations: {
|
|
47
|
+
/**
|
|
48
|
+
* The internally used sap.m.ComboBox control instance.
|
|
49
|
+
*/
|
|
50
|
+
_comboBox: {
|
|
51
|
+
type: "sap.m.ComboBox",
|
|
52
|
+
multiple: false,
|
|
53
|
+
visibility: "hidden"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
renderer: {
|
|
58
|
+
apiVersion: 2
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
ComboBoxFilter.prototype.exit = function () {
|
|
63
|
+
BaseFilter.prototype.exit.apply(this, arguments);
|
|
64
|
+
|
|
65
|
+
if (this._oItemTemplate) {
|
|
66
|
+
this._oItemTemplate.destroy();
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* @override
|
|
72
|
+
*/
|
|
73
|
+
ComboBoxFilter.prototype.getField = function () {
|
|
74
|
+
return this._getComboBox();
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* @override
|
|
79
|
+
*/
|
|
80
|
+
ComboBoxFilter.prototype.onDataChanged = function () {
|
|
81
|
+
const oComboBox = this._getComboBox();
|
|
82
|
+
|
|
83
|
+
ComboBoxHelper.setValueAndKey(
|
|
84
|
+
oComboBox,
|
|
85
|
+
oComboBox.getSelectedKey(),
|
|
86
|
+
oComboBox.getValue()
|
|
87
|
+
);
|
|
88
|
+
|
|
89
|
+
this._syncValue();
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* @override
|
|
94
|
+
*/
|
|
95
|
+
ComboBoxFilter.prototype.getValueForModel = function () {
|
|
96
|
+
const oSelectedItem = this._getComboBox().getSelectedItem();
|
|
97
|
+
|
|
98
|
+
if (oSelectedItem) {
|
|
99
|
+
return {
|
|
100
|
+
value: this._getComboBox().getValue(),
|
|
101
|
+
selectedItem: {
|
|
102
|
+
title: oSelectedItem.getText(),
|
|
103
|
+
key: oSelectedItem.getKey(),
|
|
104
|
+
additionalText: oSelectedItem.getAdditionalText()
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
return {
|
|
110
|
+
value: this._getComboBox().getValue()
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* @override
|
|
116
|
+
* @param {Object} oValue The new value for the filter.
|
|
117
|
+
* @param {string} oValue.value The value of the Combo Box.
|
|
118
|
+
* @param {string} oValue.selectedKey If selectedKey is given - this will be used for selectedKey of the ComboBox and "value" will be ignored.
|
|
119
|
+
*/
|
|
120
|
+
ComboBoxFilter.prototype.setValueFromOutside = function (oValue) {
|
|
121
|
+
const oResolvedValue = BindingResolver.resolveValue(oValue, this.getCardInstance());
|
|
122
|
+
|
|
123
|
+
ComboBoxHelper.setValueAndKey(this._getComboBox(), oResolvedValue?.selectedKey, oResolvedValue?.value);
|
|
124
|
+
|
|
125
|
+
this._syncValue();
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* @returns {object} Filter configuration with static items
|
|
130
|
+
*/
|
|
131
|
+
ComboBoxFilter.prototype.getStaticConfiguration = function () {
|
|
132
|
+
const oConfiguration = this.getConfig();
|
|
133
|
+
let sPath = "/";
|
|
134
|
+
let aResolvedItems = [];
|
|
135
|
+
let oResolvedItemTemplate;
|
|
136
|
+
|
|
137
|
+
if (oConfiguration.item && oConfiguration.item.path) {
|
|
138
|
+
sPath = oConfiguration.item.path;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
const aItems = this.getModel().getProperty(sPath);
|
|
142
|
+
|
|
143
|
+
if (oConfiguration.item && oConfiguration.item.template) {
|
|
144
|
+
oResolvedItemTemplate = oConfiguration.item.template;
|
|
145
|
+
aResolvedItems = aItems.map(function (oItem, i) {
|
|
146
|
+
const sBindingPath = sPath === "/" ? sPath + i : sPath + "/" + i;
|
|
147
|
+
return BindingResolver.resolveValue(oResolvedItemTemplate, this, sBindingPath);
|
|
148
|
+
}.bind(this));
|
|
149
|
+
} else {
|
|
150
|
+
aResolvedItems = aItems;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
aResolvedItems = aResolvedItems.map((oItem) => {
|
|
154
|
+
return {
|
|
155
|
+
key: oItem.key && oItem.key.toString(),
|
|
156
|
+
title: oItem.title && oItem.title.toString(),
|
|
157
|
+
additionalText: oItem.additionalText && oItem.additionalText.toString()
|
|
158
|
+
};
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
const oStaticConfiguration = merge({}, oConfiguration);
|
|
162
|
+
delete oStaticConfiguration.item;
|
|
163
|
+
oStaticConfiguration.items = aResolvedItems;
|
|
164
|
+
|
|
165
|
+
const oValueForModel = this.getValueForModel();
|
|
166
|
+
oStaticConfiguration.value = oValueForModel.value;
|
|
167
|
+
oStaticConfiguration.selectedKey = oValueForModel.selectedItem?.key;
|
|
168
|
+
|
|
169
|
+
return oStaticConfiguration;
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
ComboBoxFilter.prototype._getComboBox = function () {
|
|
173
|
+
let oControl = this.getAggregation("_comboBox");
|
|
174
|
+
if (!oControl) {
|
|
175
|
+
oControl = this._createComboBox();
|
|
176
|
+
this.setAggregation("_comboBox", oControl);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
return oControl;
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Constructs a ComboBox control configured with the Filter's properties.
|
|
184
|
+
*
|
|
185
|
+
* @private
|
|
186
|
+
* @returns {sap.m.ComboBox} configured instance
|
|
187
|
+
*/
|
|
188
|
+
ComboBoxFilter.prototype._createComboBox = function () {
|
|
189
|
+
const oConfig = this.getConfig();
|
|
190
|
+
|
|
191
|
+
const oComboBox = new ComboBox({
|
|
192
|
+
placeholder: oConfig.placeholder,
|
|
193
|
+
showSecondaryValues: true,
|
|
194
|
+
filterSecondaryValues: true
|
|
195
|
+
});
|
|
196
|
+
|
|
197
|
+
let sItemTemplateKey,
|
|
198
|
+
sItemTemplateText,
|
|
199
|
+
sItemTemplateAdditionalText,
|
|
200
|
+
sItemsPath = "/";
|
|
201
|
+
|
|
202
|
+
oComboBox.attachChange((oEvent) => {
|
|
203
|
+
this._syncValue();
|
|
204
|
+
});
|
|
205
|
+
|
|
206
|
+
if (oConfig && oConfig.item) {
|
|
207
|
+
sItemsPath = oConfig.item.path || sItemsPath;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
if (oConfig && oConfig.item && oConfig.item.template) {
|
|
211
|
+
sItemTemplateKey = oConfig.item.template.key;
|
|
212
|
+
sItemTemplateText = oConfig.item.template.title;
|
|
213
|
+
sItemTemplateAdditionalText = oConfig.item.template.additionalText;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
const oCard = this.getCardInstance();
|
|
217
|
+
if (oConfig && oConfig.items) {
|
|
218
|
+
sItemTemplateKey = "{key}";
|
|
219
|
+
sItemTemplateText = "{title}";
|
|
220
|
+
sItemTemplateAdditionalText = "{additionalText}";
|
|
221
|
+
|
|
222
|
+
const oModel = new JSONModel(oConfig.items);
|
|
223
|
+
oModel.setSizeLimit(oCard.getModelSizeLimit());
|
|
224
|
+
|
|
225
|
+
this.setModel(oModel);
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
this._oItemTemplate = new ListItem({
|
|
229
|
+
key: sItemTemplateKey,
|
|
230
|
+
text: sItemTemplateText,
|
|
231
|
+
additionalText: sItemTemplateAdditionalText
|
|
232
|
+
});
|
|
233
|
+
|
|
234
|
+
oComboBox.bindItems({
|
|
235
|
+
path: sItemsPath,
|
|
236
|
+
template: this._oItemTemplate
|
|
237
|
+
});
|
|
238
|
+
|
|
239
|
+
ComboBoxHelper.setValueAndKey(
|
|
240
|
+
oComboBox,
|
|
241
|
+
BindingResolver.resolveValue(oConfig.selectedKey, oCard),
|
|
242
|
+
BindingResolver.resolveValue(oConfig.value, oCard)
|
|
243
|
+
);
|
|
244
|
+
|
|
245
|
+
const oLabel = this.createLabel(oConfig);
|
|
246
|
+
if (oLabel) {
|
|
247
|
+
oComboBox.addAriaLabelledBy(oLabel);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
return oComboBox;
|
|
251
|
+
};
|
|
252
|
+
|
|
253
|
+
return ComboBoxFilter;
|
|
254
|
+
});
|
|
@@ -7,6 +7,7 @@ sap.ui.define([
|
|
|
7
7
|
"./FilterBar",
|
|
8
8
|
"./SearchFilter",
|
|
9
9
|
"./SelectFilter",
|
|
10
|
+
"./ComboBoxFilter",
|
|
10
11
|
"./DateRangeFilter",
|
|
11
12
|
"sap/ui/base/Object",
|
|
12
13
|
"sap/m/library",
|
|
@@ -16,6 +17,7 @@ sap.ui.define([
|
|
|
16
17
|
FilterBar,
|
|
17
18
|
SearchFilter,
|
|
18
19
|
SelectFilter,
|
|
20
|
+
ComboBoxFilter,
|
|
19
21
|
DateRangeFilter,
|
|
20
22
|
BaseObject,
|
|
21
23
|
mLibrary,
|
|
@@ -36,7 +38,7 @@ sap.ui.define([
|
|
|
36
38
|
* @extends sap.ui.base.Object
|
|
37
39
|
*
|
|
38
40
|
* @author SAP SE
|
|
39
|
-
* @version 1.
|
|
41
|
+
* @version 1.121.0
|
|
40
42
|
*
|
|
41
43
|
* @constructor
|
|
42
44
|
* @private
|
|
@@ -60,9 +62,10 @@ sap.ui.define([
|
|
|
60
62
|
*
|
|
61
63
|
* @param {map} mFiltersConfig A map of the parameters config - the same that is defined in sap.card/configuration/filters.
|
|
62
64
|
* @param {sap.ui.model.json.JSONModel} oModel The model for filters.
|
|
65
|
+
* @param {function} fnOnChange Handler for filter value change.
|
|
63
66
|
* @returns {sap.ui.integration.cards.filters.FilterBar|null} The Filter bar.
|
|
64
67
|
*/
|
|
65
|
-
FilterBarFactory.prototype.create = function (mFiltersConfig, oModel) {
|
|
68
|
+
FilterBarFactory.prototype.create = function (mFiltersConfig, oModel, fnOnChange) {
|
|
66
69
|
var aFilters = [],
|
|
67
70
|
aReadyPromises = [],
|
|
68
71
|
mConfig,
|
|
@@ -83,7 +86,8 @@ sap.ui.define([
|
|
|
83
86
|
model: "filters",
|
|
84
87
|
path: "/" + sKey
|
|
85
88
|
},
|
|
86
|
-
visible: mConfig.visible
|
|
89
|
+
visible: mConfig.visible,
|
|
90
|
+
change: fnOnChange
|
|
87
91
|
});
|
|
88
92
|
|
|
89
93
|
oModel.setProperty("/" + sKey, oFilter.getValueForModel());
|
|
@@ -156,6 +160,8 @@ sap.ui.define([
|
|
|
156
160
|
return DateRangeFilter;
|
|
157
161
|
case "search":
|
|
158
162
|
return SearchFilter;
|
|
163
|
+
case "combobox":
|
|
164
|
+
return ComboBoxFilter;
|
|
159
165
|
default:
|
|
160
166
|
return undefined;
|
|
161
167
|
}
|
|
@@ -5,10 +5,12 @@
|
|
|
5
5
|
*/
|
|
6
6
|
sap.ui.define([
|
|
7
7
|
"./BaseFilter",
|
|
8
|
-
"sap/m/SearchField"
|
|
8
|
+
"sap/m/SearchField",
|
|
9
|
+
"sap/base/util/merge"
|
|
9
10
|
], function (
|
|
10
11
|
BaseFilter,
|
|
11
|
-
SearchField
|
|
12
|
+
SearchField,
|
|
13
|
+
merge
|
|
12
14
|
) {
|
|
13
15
|
"use strict";
|
|
14
16
|
|
|
@@ -23,7 +25,7 @@ sap.ui.define([
|
|
|
23
25
|
* @extends sap.ui.integration.cards.filters.BaseFilter
|
|
24
26
|
*
|
|
25
27
|
* @author SAP SE
|
|
26
|
-
* @version 1.
|
|
28
|
+
* @version 1.121.0
|
|
27
29
|
*
|
|
28
30
|
* @constructor
|
|
29
31
|
* @private
|
|
@@ -69,6 +71,17 @@ sap.ui.define([
|
|
|
69
71
|
};
|
|
70
72
|
};
|
|
71
73
|
|
|
74
|
+
/**
|
|
75
|
+
* @returns {object} Filter configuration with static items
|
|
76
|
+
*/
|
|
77
|
+
SearchFilter.prototype.getStaticConfiguration = function () {
|
|
78
|
+
const oStaticConfiguration = merge({}, this.getConfig());
|
|
79
|
+
|
|
80
|
+
oStaticConfiguration.value = this.getValueForModel().value;
|
|
81
|
+
|
|
82
|
+
return oStaticConfiguration;
|
|
83
|
+
};
|
|
84
|
+
|
|
72
85
|
SearchFilter.prototype._getSearchField = function () {
|
|
73
86
|
var oControl = this.getAggregation("_searchField");
|
|
74
87
|
if (!oControl) {
|