@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,26 +5,28 @@
|
|
|
5
5
|
*/
|
|
6
6
|
sap.ui.define([
|
|
7
7
|
"sap/ui/base/ManagedObject",
|
|
8
|
+
"sap/ui/core/Lib",
|
|
8
9
|
"sap/ui/core/library",
|
|
9
|
-
"sap/ui/core/Core",
|
|
10
10
|
"sap/base/Log",
|
|
11
11
|
"sap/base/util/deepExtend",
|
|
12
12
|
"./Validators",
|
|
13
13
|
"./BindingHelper",
|
|
14
14
|
"./BindingResolver",
|
|
15
15
|
"./DateRangeHelper",
|
|
16
|
-
"./Duration"
|
|
16
|
+
"./Duration",
|
|
17
|
+
"./ComboBoxHelper"
|
|
17
18
|
], function (
|
|
18
19
|
ManagedObject,
|
|
20
|
+
Library,
|
|
19
21
|
coreLibrary,
|
|
20
|
-
Core,
|
|
21
22
|
Log,
|
|
22
23
|
deepExtend,
|
|
23
24
|
Validators,
|
|
24
25
|
BindingHelper,
|
|
25
26
|
BindingResolver,
|
|
26
27
|
DateRangeHelper,
|
|
27
|
-
Duration
|
|
28
|
+
Duration,
|
|
29
|
+
ComboBoxHelper
|
|
28
30
|
) {
|
|
29
31
|
"use strict";
|
|
30
32
|
|
|
@@ -34,7 +36,7 @@ sap.ui.define([
|
|
|
34
36
|
* Utility class for handling forms in the cards.
|
|
35
37
|
*
|
|
36
38
|
* @author SAP SE
|
|
37
|
-
* @version 1.
|
|
39
|
+
* @version 1.121.0
|
|
38
40
|
*
|
|
39
41
|
* @private
|
|
40
42
|
* @ui5-restricted
|
|
@@ -151,7 +153,7 @@ sap.ui.define([
|
|
|
151
153
|
vValue = oFormControlData.value;
|
|
152
154
|
|
|
153
155
|
if (oControl.isA("sap.m.ComboBox")) {
|
|
154
|
-
|
|
156
|
+
ComboBoxHelper.setValueAndKey(oControl, oFormControlData.key, oFormControlData.value);
|
|
155
157
|
} else if (vValue) {
|
|
156
158
|
if (oControl.isA("sap.m.DatePicker") || oControl.isA("sap.m.DynamicDateRange")) {
|
|
157
159
|
DateRangeHelper.setValue(oControl, vValue, this._oCard);
|
|
@@ -169,33 +171,6 @@ sap.ui.define([
|
|
|
169
171
|
this._mControls.forEach(this._updateModel.bind(this));
|
|
170
172
|
};
|
|
171
173
|
|
|
172
|
-
Form.prototype._setComboBoxValue = function (oComboBox, oControlData) {
|
|
173
|
-
var oSelectedItem;
|
|
174
|
-
|
|
175
|
-
if ("key" in oControlData) {
|
|
176
|
-
oComboBox.setSelectedKey(oControlData.key);
|
|
177
|
-
|
|
178
|
-
oSelectedItem = oComboBox.getItems().find(function (oItem) {
|
|
179
|
-
return oItem.getKey() === oControlData.key;
|
|
180
|
-
});
|
|
181
|
-
|
|
182
|
-
oComboBox.setValue(oSelectedItem ? oSelectedItem.getText() : "");
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
if ("value" in oControlData && !("key" in oControlData)) {
|
|
186
|
-
oSelectedItem = oComboBox.getItems().find(function (oItem) {
|
|
187
|
-
return oItem.getText() === oControlData.value;
|
|
188
|
-
});
|
|
189
|
-
|
|
190
|
-
if (oSelectedItem) {
|
|
191
|
-
oComboBox.setSelectedItem(oSelectedItem);
|
|
192
|
-
} else {
|
|
193
|
-
oComboBox.setSelectedKey(""); // now entering unknown value, reset selectedKey to keep it in sync
|
|
194
|
-
oComboBox.setValue(oControlData.value);
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
};
|
|
198
|
-
|
|
199
174
|
Form.prototype._isValidControlId = function (sId) {
|
|
200
175
|
if (!sId) {
|
|
201
176
|
Log.error("Each input control must have an ID.", "sap.ui.integration.widgets.Card");
|
|
@@ -367,7 +342,7 @@ sap.ui.define([
|
|
|
367
342
|
if (oControl.isA("sap.m.DatePicker") && !oControl.isValidValue()) {
|
|
368
343
|
this._addMessageToControl(oControl, bShowValueState, {
|
|
369
344
|
type: ValueState.Error,
|
|
370
|
-
message:
|
|
345
|
+
message: Library.getResourceBundleFor("sap.ui.core").getText("VALUE_STATE_ERROR"),
|
|
371
346
|
bindingPath: "/" + oItem.id
|
|
372
347
|
});
|
|
373
348
|
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
sap.ui.define([
|
|
7
|
-
"sap/ui/core/Core",
|
|
8
7
|
"./BaseFactory",
|
|
9
8
|
"sap/base/Log",
|
|
10
9
|
"sap/base/util/isEmptyObject",
|
|
10
|
+
"sap/ui/core/Lib",
|
|
11
11
|
"sap/ui/integration/cards/actions/CardActions",
|
|
12
12
|
"sap/ui/integration/library",
|
|
13
13
|
"sap/m/library",
|
|
@@ -16,10 +16,10 @@ sap.ui.define([
|
|
|
16
16
|
"sap/ui/integration/util/Utils",
|
|
17
17
|
"sap/m/Button"
|
|
18
18
|
], function (
|
|
19
|
-
Core,
|
|
20
19
|
BaseFactory,
|
|
21
20
|
Log,
|
|
22
21
|
isEmptyObject,
|
|
22
|
+
Library,
|
|
23
23
|
CardActions,
|
|
24
24
|
library,
|
|
25
25
|
mLibrary,
|
|
@@ -36,7 +36,7 @@ sap.ui.define([
|
|
|
36
36
|
|
|
37
37
|
var CardDisplayVariant = library.CardDisplayVariant;
|
|
38
38
|
|
|
39
|
-
var oResourceBundle =
|
|
39
|
+
var oResourceBundle = Library.getResourceBundleFor("sap.ui.integration");
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
42
|
* Constructor for a new <code>HeaderFactory</code>.
|
|
@@ -46,7 +46,7 @@ sap.ui.define([
|
|
|
46
46
|
* @extends sap.ui.integration.util.BaseFactory
|
|
47
47
|
*
|
|
48
48
|
* @author SAP SE
|
|
49
|
-
* @version 1.
|
|
49
|
+
* @version 1.121.0
|
|
50
50
|
*
|
|
51
51
|
* @constructor
|
|
52
52
|
* @private
|
|
@@ -116,6 +116,8 @@ sap.ui.define([
|
|
|
116
116
|
if (bIsInDialog) {
|
|
117
117
|
// if card is in dialog - header shouldn't be focusable
|
|
118
118
|
oHeader.setProperty("focusable", false);
|
|
119
|
+
//if card is in a dialog - aria-level of the header should be 1
|
|
120
|
+
oHeader.setProperty("headingLevel", "1");
|
|
119
121
|
}
|
|
120
122
|
|
|
121
123
|
return oHeader;
|
|
@@ -13,6 +13,7 @@ sap.ui.define([
|
|
|
13
13
|
"sap/base/util/each",
|
|
14
14
|
"sap/base/util/isPlainObject",
|
|
15
15
|
"sap/base/util/isEmptyObject",
|
|
16
|
+
"sap/base/util/merge",
|
|
16
17
|
"sap/base/Log",
|
|
17
18
|
"./ParameterMap",
|
|
18
19
|
"sap/ui/integration/util/CardMerger"
|
|
@@ -25,6 +26,7 @@ sap.ui.define([
|
|
|
25
26
|
each,
|
|
26
27
|
isPlainObject,
|
|
27
28
|
isEmptyObject,
|
|
29
|
+
merge,
|
|
28
30
|
Log,
|
|
29
31
|
ParameterMap,
|
|
30
32
|
CardMerger
|
|
@@ -66,7 +68,7 @@ sap.ui.define([
|
|
|
66
68
|
* @extends sap.ui.base.Object
|
|
67
69
|
*
|
|
68
70
|
* @author SAP SE
|
|
69
|
-
* @version 1.
|
|
71
|
+
* @version 1.121.0
|
|
70
72
|
*
|
|
71
73
|
* @constructor
|
|
72
74
|
* @private
|
|
@@ -123,12 +125,25 @@ sap.ui.define([
|
|
|
123
125
|
};
|
|
124
126
|
|
|
125
127
|
/**
|
|
126
|
-
* @returns {
|
|
128
|
+
* @returns {object} A copy of the manifest JSON.
|
|
127
129
|
*/
|
|
128
130
|
Manifest.prototype.getJson = function () {
|
|
129
131
|
return this._unfreeze(this.oJson);
|
|
130
132
|
};
|
|
131
133
|
|
|
134
|
+
/**
|
|
135
|
+
* @returns {object} JSON, from which any unprocessable parts have been erased.
|
|
136
|
+
*/
|
|
137
|
+
Manifest.prototype.getProcessableJson = function () {
|
|
138
|
+
const oValue = deepExtend({}, this._oManifest.getRawJson());
|
|
139
|
+
|
|
140
|
+
if (oValue["sap.card"]?.type === "AdaptiveCard") {
|
|
141
|
+
delete oValue["sap.card"].content;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
return this._unfreeze(oValue);
|
|
145
|
+
};
|
|
146
|
+
|
|
132
147
|
/**
|
|
133
148
|
* @ui5-restricted
|
|
134
149
|
* @private
|
|
@@ -274,7 +289,7 @@ sap.ui.define([
|
|
|
274
289
|
// the manifest which should be processed
|
|
275
290
|
var bHasTranslatable = false;
|
|
276
291
|
|
|
277
|
-
CoreManifest.processObject(this.
|
|
292
|
+
CoreManifest.processObject(this.getProcessableJson(), function (oObject, sKey, vValue) {
|
|
278
293
|
if (!bHasTranslatable && vValue.match(REGEXP_TRANSLATABLE)) {
|
|
279
294
|
bHasTranslatable = true;
|
|
280
295
|
}
|
|
@@ -303,12 +318,12 @@ sap.ui.define([
|
|
|
303
318
|
Manifest.prototype.processManifest = function () {
|
|
304
319
|
var iCurrentLevel = 0,
|
|
305
320
|
iMaxLevel = 15,
|
|
306
|
-
|
|
307
|
-
oUnprocessedJson = deepExtend({}, this._oManifest.getRawJson()),
|
|
321
|
+
oValue = this.getProcessableJson(),
|
|
308
322
|
oDataSources = this.get(APP_DATA_SOURCES);
|
|
309
323
|
|
|
310
|
-
process(
|
|
311
|
-
|
|
324
|
+
process(oValue, this.oResourceBundle, iCurrentLevel, iMaxLevel, this._oCombinedParams, oDataSources, this._oCombinedFilters);
|
|
325
|
+
|
|
326
|
+
this.setJson(merge(this.getJson(), oValue));
|
|
312
327
|
};
|
|
313
328
|
|
|
314
329
|
/**
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
sap.ui.define([
|
|
7
|
-
"sap/ui/core/
|
|
7
|
+
"sap/ui/core/Lib",
|
|
8
8
|
"sap/ui/integration/util/BindingHelper",
|
|
9
9
|
"sap/ui/integration/util/BindingResolver",
|
|
10
10
|
"sap/ui/integration/util/Utils",
|
|
@@ -12,7 +12,7 @@ sap.ui.define([
|
|
|
12
12
|
"sap/m/IllustratedMessageSize",
|
|
13
13
|
"sap/base/Log"
|
|
14
14
|
], function (
|
|
15
|
-
|
|
15
|
+
Library,
|
|
16
16
|
BindingHelper,
|
|
17
17
|
BindingResolver,
|
|
18
18
|
Utils,
|
|
@@ -153,7 +153,7 @@ sap.ui.define([
|
|
|
153
153
|
*/
|
|
154
154
|
ManifestResolver._handleCardSevereError = function (oCard, oError) {
|
|
155
155
|
var oManifest = oCard.getManifestEntry("/"),
|
|
156
|
-
oResourceBundle =
|
|
156
|
+
oResourceBundle = Library.getResourceBundleFor("sap.ui.integration");
|
|
157
157
|
|
|
158
158
|
Log.error(oError, "sap.ui.integration.util.ManifestResolver");
|
|
159
159
|
|
|
@@ -5,10 +5,12 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
|
-
|
|
8
|
+
"sap/base/i18n/Localization",
|
|
9
|
+
"sap/ui/core/Locale",
|
|
9
10
|
'sap/ui/core/date/UI5Date'
|
|
10
11
|
], function(
|
|
11
|
-
|
|
12
|
+
Localization,
|
|
13
|
+
Locale,
|
|
12
14
|
UI5Date
|
|
13
15
|
) {
|
|
14
16
|
"use strict";
|
|
@@ -54,7 +56,7 @@ sap.ui.define([
|
|
|
54
56
|
*/
|
|
55
57
|
function getLocale() {
|
|
56
58
|
|
|
57
|
-
return
|
|
59
|
+
return new Locale(Localization.getLanguageTag()).toString();
|
|
58
60
|
}
|
|
59
61
|
|
|
60
62
|
/**
|
|
@@ -4,19 +4,17 @@
|
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
5
|
*/
|
|
6
6
|
sap.ui.define([
|
|
7
|
+
"sap/ui/core/Element",
|
|
7
8
|
"sap/ui/integration/util/DataProvider",
|
|
8
9
|
"sap/base/Log",
|
|
9
10
|
"sap/ui/model/odata/v4/ODataUtils",
|
|
10
|
-
"sap/ui/core/Core",
|
|
11
|
-
"sap/ui/core/Configuration",
|
|
12
11
|
"sap/base/util/fetch",
|
|
13
12
|
"sap/base/util/deepClone"
|
|
14
13
|
], function (
|
|
14
|
+
Element,
|
|
15
15
|
DataProvider,
|
|
16
16
|
Log,
|
|
17
17
|
ODataUtils,
|
|
18
|
-
Core,
|
|
19
|
-
Configuration,
|
|
20
18
|
fetch,
|
|
21
19
|
deepClone
|
|
22
20
|
) {
|
|
@@ -74,7 +72,7 @@ sap.ui.define([
|
|
|
74
72
|
* @extends sap.ui.integration.util.DataProvider
|
|
75
73
|
*
|
|
76
74
|
* @author SAP SE
|
|
77
|
-
* @version 1.
|
|
75
|
+
* @version 1.121.0
|
|
78
76
|
*
|
|
79
77
|
* @constructor
|
|
80
78
|
* @private
|
|
@@ -107,6 +105,12 @@ sap.ui.define([
|
|
|
107
105
|
}
|
|
108
106
|
});
|
|
109
107
|
|
|
108
|
+
RequestDataProvider.prototype.init = function () {
|
|
109
|
+
DataProvider.prototype.init.apply(this, arguments);
|
|
110
|
+
|
|
111
|
+
this._retryDueExpiredToken = false;
|
|
112
|
+
};
|
|
113
|
+
|
|
110
114
|
RequestDataProvider.prototype.destroy = function () {
|
|
111
115
|
if (this._iRetryAfterTimeout) {
|
|
112
116
|
clearTimeout(this._iRetryAfterTimeout);
|
|
@@ -121,9 +125,6 @@ sap.ui.define([
|
|
|
121
125
|
|
|
122
126
|
/**
|
|
123
127
|
* @override
|
|
124
|
-
* @private
|
|
125
|
-
* @ui5-restricted sap.ui.integration, shell-toolkit
|
|
126
|
-
* @returns {Promise} A promise resolved when the data is available and rejected in case of an error.
|
|
127
128
|
*/
|
|
128
129
|
RequestDataProvider.prototype.getData = function () {
|
|
129
130
|
var oRequestConfig = this.getSettings().request,
|
|
@@ -134,9 +135,7 @@ sap.ui.define([
|
|
|
134
135
|
}
|
|
135
136
|
|
|
136
137
|
if (this._oCsrfTokenHandler) {
|
|
137
|
-
pRequestChain = pRequestChain.then(
|
|
138
|
-
return this._oCsrfTokenHandler.resolveToken(oRequest);
|
|
139
|
-
}.bind(this));
|
|
138
|
+
pRequestChain = pRequestChain.then(this._oCsrfTokenHandler.replacePlaceholders.bind(this._oCsrfTokenHandler));
|
|
140
139
|
}
|
|
141
140
|
|
|
142
141
|
pRequestChain = pRequestChain.then(this._fetch.bind(this));
|
|
@@ -149,16 +148,22 @@ sap.ui.define([
|
|
|
149
148
|
};
|
|
150
149
|
|
|
151
150
|
RequestDataProvider.prototype._handleExpiredToken = function (oError) {
|
|
152
|
-
if (this._oCsrfTokenHandler.isExpiredToken(this.getLastResponse())) {
|
|
153
|
-
|
|
154
|
-
|
|
151
|
+
if (!this._oCsrfTokenHandler.isExpiredToken(this.getLastResponse())) {
|
|
152
|
+
throw oError;
|
|
153
|
+
}
|
|
155
154
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
155
|
+
// csrf token has expired, reset the token and retry this whole request
|
|
156
|
+
this._oCsrfTokenHandler.setExpiredTokenByRequest(this.getConfiguration().request);
|
|
157
|
+
|
|
158
|
+
if (this._retryDueExpiredToken) {
|
|
159
|
+
this._retryDueExpiredToken = false;
|
|
160
|
+
throw oError;
|
|
159
161
|
}
|
|
160
162
|
|
|
161
|
-
|
|
163
|
+
this._retryDueExpiredToken = true;
|
|
164
|
+
this._bActive = false; // prevents another triggerDataUpdate()
|
|
165
|
+
|
|
166
|
+
return this._waitDependencies().then(this.getData.bind(this));
|
|
162
167
|
};
|
|
163
168
|
|
|
164
169
|
RequestDataProvider.prototype._fetch = function (oRequestConfig) {
|
|
@@ -354,9 +359,9 @@ sap.ui.define([
|
|
|
354
359
|
* @returns {Function} The function to use for HTTP fetch.
|
|
355
360
|
*/
|
|
356
361
|
RequestDataProvider.prototype._getFetchMethod = function (oRequestSettings) {
|
|
357
|
-
var oCard =
|
|
362
|
+
var oCard = Element.getElementById(this.getCard()),
|
|
358
363
|
oExtension = oCard && oCard.getAggregation("_extension"),
|
|
359
|
-
oHost =
|
|
364
|
+
oHost = Element.getElementById(this.getHost());
|
|
360
365
|
|
|
361
366
|
if (oExtension) {
|
|
362
367
|
return function (sResource, mOptions) {
|
|
@@ -485,8 +490,8 @@ sap.ui.define([
|
|
|
485
490
|
* @returns {object} The modified request
|
|
486
491
|
*/
|
|
487
492
|
RequestDataProvider.prototype._modifyRequestBeforeSent = function (oRequest, oSettings) {
|
|
488
|
-
var oCard =
|
|
489
|
-
oHost =
|
|
493
|
+
var oCard = Element.getElementById(this.getCard()),
|
|
494
|
+
oHost = Element.getElementById(this.getHost());
|
|
490
495
|
|
|
491
496
|
if (!oHost) {
|
|
492
497
|
return oRequest;
|