@openui5/sap.ui.integration 1.112.2 → 1.113.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRDPARTY.txt +1 -1
- package/package.json +6 -6
- package/src/sap/ui/integration/.library +1 -1
- package/src/sap/ui/integration/ActionDefinition.js +1 -1
- package/src/sap/ui/integration/Designtime.js +1 -1
- package/src/sap/ui/integration/Extension.js +27 -3
- package/src/sap/ui/integration/Host.js +31 -8
- package/src/sap/ui/integration/cards/AdaptiveContent.js +30 -40
- package/src/sap/ui/integration/cards/AnalyticalContent.js +14 -5
- package/src/sap/ui/integration/cards/AnalyticsCloudContent.js +18 -7
- package/src/sap/ui/integration/cards/BaseContent.js +113 -41
- package/src/sap/ui/integration/cards/BaseContentRenderer.js +7 -2
- package/src/sap/ui/integration/cards/BaseListContent.js +22 -21
- package/src/sap/ui/integration/cards/CalendarContent.js +5 -12
- package/src/sap/ui/integration/cards/ComponentContent.js +12 -5
- package/src/sap/ui/integration/cards/Footer.js +1 -1
- package/src/sap/ui/integration/cards/Header.js +26 -13
- package/src/sap/ui/integration/cards/ListContent.js +27 -33
- package/src/sap/ui/integration/cards/NumericHeader.js +26 -13
- package/src/sap/ui/integration/cards/ObjectContent.js +29 -14
- package/src/sap/ui/integration/cards/TableContent.js +23 -15
- package/src/sap/ui/integration/cards/TimelineContent.js +11 -10
- package/src/sap/ui/integration/cards/WebPageContent.js +30 -23
- package/src/sap/ui/integration/cards/actions/CardActions.js +1 -1
- package/src/sap/ui/integration/cards/actions/SubmitAction.js +1 -3
- package/src/sap/ui/integration/cards/adaptivecards/elements/UI5InputChoiceSet.js +1 -1
- package/src/sap/ui/integration/cards/adaptivecards/elements/UI5InputDate.js +1 -1
- package/src/sap/ui/integration/cards/adaptivecards/elements/UI5InputNumber.js +1 -1
- package/src/sap/ui/integration/cards/adaptivecards/elements/UI5InputText.js +1 -1
- package/src/sap/ui/integration/cards/adaptivecards/elements/UI5InputToggle.js +1 -1
- package/src/sap/ui/integration/cards/filters/BaseFilter.js +9 -5
- package/src/sap/ui/integration/cards/filters/DateRangeFilter.js +1 -1
- package/src/sap/ui/integration/cards/filters/FilterBar.js +1 -1
- package/src/sap/ui/integration/cards/filters/FilterBarFactory.js +1 -1
- package/src/sap/ui/integration/cards/filters/SearchFilter.js +1 -1
- package/src/sap/ui/integration/cards/filters/SelectFilter.js +1 -1
- package/src/sap/ui/integration/cards/list/MicrochartsResizeHelper.js +1 -1
- package/src/sap/ui/integration/controls/ActionsStrip.js +1 -1
- package/src/sap/ui/integration/controls/ActionsToolbar.js +1 -1
- package/src/sap/ui/integration/controls/LinkWithIcon.js +1 -1
- package/src/sap/ui/integration/controls/ListContentItem.js +35 -2
- package/src/sap/ui/integration/controls/ListContentItemRenderer.js +5 -11
- package/src/sap/ui/integration/controls/Microchart.js +1 -1
- package/src/sap/ui/integration/controls/MicrochartLegend.js +1 -1
- package/src/sap/ui/integration/controls/ObjectStatus.js +6 -2
- package/src/sap/ui/integration/controls/Paginator.js +12 -5
- package/src/sap/ui/integration/controls/PaginatorRenderer.js +0 -1
- package/src/sap/ui/integration/designtime/baseEditor/BaseEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/PropertyEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/PropertyEditors.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/BasePropertyEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/PropertyEditorFactory.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/arrayEditor/ArrayEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/booleanEditor/BooleanEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/codeEditor/CodeEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/dateEditor/DateEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/dateTimeEditor/DateTimeEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/enumStringEditor/EnumStringEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/groupEditor/GroupEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/iconEditor/IconEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/iconEditor/IsInIconPool.validator.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/integerEditor/IntegerEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/jsonEditor/JsonEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/listEditor/ListEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/mapEditor/MapEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/multiSelectEditor/MultiSelectEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/numberEditor/NumberEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/objectArrayEditor/ObjectArrayEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/selectEditor/SelectEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/separatorEditor/SeparatorEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/stringEditor/StringEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/textAreaEditor/TextAreaEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/util/binding/ObjectBinding.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/util/unset.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/validator/IsBoolean.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/validator/IsDate.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/validator/IsInteger.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/validator/IsNumber.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/validator/IsSelectedKey.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/validator/IsStringList.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/validator/IsUniqueKey.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/validator/IsUniqueList.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/validator/IsValidBinding.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/validator/MaxLength.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/validator/NotABinding.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/validator/ValidatorRegistry.js +1 -1
- package/src/sap/ui/integration/designtime/cardEditor/propertyEditor/complexMapEditor/ComplexMapEditor.js +1 -1
- package/src/sap/ui/integration/designtime/cardEditor/propertyEditor/destinationsEditor/DestinationsEditor.js +1 -1
- package/src/sap/ui/integration/designtime/cardEditor/propertyEditor/filtersEditor/FiltersEditor.js +1 -1
- package/src/sap/ui/integration/designtime/cardEditor/propertyEditor/iconEditor/IconEditor.js +1 -1
- package/src/sap/ui/integration/designtime/cardEditor/propertyEditor/parametersEditor/ParametersEditor.js +1 -1
- package/src/sap/ui/integration/designtime/editor/Card.js +1 -1
- package/src/sap/ui/integration/designtime/editor/CardEditor.js +1 -1
- package/src/sap/ui/integration/designtime/editor/CardPreview.js +38 -119
- package/src/sap/ui/integration/editor/Editor.js +85 -66
- package/src/sap/ui/integration/editor/EditorResourceBundles.js +58 -66
- package/src/sap/ui/integration/editor/Extension.js +1 -1
- package/src/sap/ui/integration/editor/Manifest.js +1 -1
- package/src/sap/ui/integration/editor/Settings.js +1 -1
- package/src/sap/ui/integration/editor/fields/BaseField.js +1 -1
- package/src/sap/ui/integration/editor/fields/BooleanField.js +1 -1
- package/src/sap/ui/integration/editor/fields/DateField.js +1 -1
- package/src/sap/ui/integration/editor/fields/DateTimeField.js +1 -1
- package/src/sap/ui/integration/editor/fields/DestinationField.js +15 -12
- package/src/sap/ui/integration/editor/fields/GroupField.js +1 -1
- package/src/sap/ui/integration/editor/fields/IntegerField.js +1 -1
- package/src/sap/ui/integration/editor/fields/NumberField.js +1 -1
- package/src/sap/ui/integration/editor/fields/ObjectField.js +3 -5
- package/src/sap/ui/integration/editor/fields/ObjectListField.js +1 -1
- package/src/sap/ui/integration/editor/fields/StringField.js +2 -4
- package/src/sap/ui/integration/editor/fields/StringListField.js +1 -1
- package/src/sap/ui/integration/editor/fields/fragment/Controller.js +1 -1
- package/src/sap/ui/integration/editor/fields/viz/ColorSelect.js +1 -1
- package/src/sap/ui/integration/editor/fields/viz/IconSelect.js +1 -1
- package/src/sap/ui/integration/editor/fields/viz/ShapeSelect.js +1 -1
- package/src/sap/ui/integration/editor/fields/viz/VizBase.js +1 -1
- package/src/sap/ui/integration/library.js +2 -2
- package/src/sap/ui/integration/messagebundle.properties +69 -6
- package/src/sap/ui/integration/messagebundle_ar.properties +46 -4
- package/src/sap/ui/integration/messagebundle_bg.properties +46 -4
- package/src/sap/ui/integration/messagebundle_ca.properties +46 -4
- package/src/sap/ui/integration/messagebundle_cs.properties +46 -4
- package/src/sap/ui/integration/messagebundle_cy.properties +46 -4
- package/src/sap/ui/integration/messagebundle_da.properties +46 -4
- package/src/sap/ui/integration/messagebundle_de.properties +46 -4
- package/src/sap/ui/integration/messagebundle_el.properties +46 -4
- package/src/sap/ui/integration/messagebundle_en.properties +46 -4
- package/src/sap/ui/integration/messagebundle_en_GB.properties +46 -4
- package/src/sap/ui/integration/messagebundle_en_US_sappsd.properties +46 -4
- package/src/sap/ui/integration/messagebundle_en_US_saprigi.properties +45 -3
- package/src/sap/ui/integration/messagebundle_en_US_saptrc.properties +47 -5
- package/src/sap/ui/integration/messagebundle_es.properties +46 -4
- package/src/sap/ui/integration/messagebundle_es_MX.properties +46 -4
- package/src/sap/ui/integration/messagebundle_et.properties +46 -4
- package/src/sap/ui/integration/messagebundle_fi.properties +46 -4
- package/src/sap/ui/integration/messagebundle_fr.properties +43 -1
- package/src/sap/ui/integration/messagebundle_fr_CA.properties +43 -1
- package/src/sap/ui/integration/messagebundle_hi.properties +46 -4
- package/src/sap/ui/integration/messagebundle_hr.properties +46 -4
- package/src/sap/ui/integration/messagebundle_hu.properties +46 -4
- package/src/sap/ui/integration/messagebundle_id.properties +46 -4
- package/src/sap/ui/integration/messagebundle_it.properties +46 -4
- package/src/sap/ui/integration/messagebundle_iw.properties +46 -4
- package/src/sap/ui/integration/messagebundle_ja.properties +46 -4
- package/src/sap/ui/integration/messagebundle_kk.properties +46 -4
- package/src/sap/ui/integration/messagebundle_ko.properties +43 -1
- package/src/sap/ui/integration/messagebundle_lt.properties +46 -4
- package/src/sap/ui/integration/messagebundle_lv.properties +46 -4
- package/src/sap/ui/integration/messagebundle_ms.properties +46 -4
- package/src/sap/ui/integration/messagebundle_nl.properties +46 -4
- package/src/sap/ui/integration/messagebundle_no.properties +46 -4
- package/src/sap/ui/integration/messagebundle_pl.properties +46 -4
- package/src/sap/ui/integration/messagebundle_pt.properties +46 -4
- package/src/sap/ui/integration/messagebundle_pt_PT.properties +46 -4
- package/src/sap/ui/integration/messagebundle_ro.properties +46 -4
- package/src/sap/ui/integration/messagebundle_ru.properties +46 -4
- package/src/sap/ui/integration/messagebundle_sh.properties +46 -4
- package/src/sap/ui/integration/messagebundle_sk.properties +46 -4
- package/src/sap/ui/integration/messagebundle_sl.properties +46 -4
- package/src/sap/ui/integration/messagebundle_sv.properties +46 -4
- package/src/sap/ui/integration/messagebundle_th.properties +43 -1
- package/src/sap/ui/integration/messagebundle_tr.properties +46 -4
- package/src/sap/ui/integration/messagebundle_uk.properties +48 -6
- package/src/sap/ui/integration/messagebundle_vi.properties +46 -4
- package/src/sap/ui/integration/messagebundle_zh_CN.properties +46 -4
- package/src/sap/ui/integration/messagebundle_zh_TW.properties +46 -4
- package/src/sap/ui/integration/model/ContextModel.js +1 -1
- package/src/sap/ui/integration/model/ObservableModel.js +1 -1
- package/src/sap/ui/integration/model/PagingModelListBinding.js +1 -1
- package/src/sap/ui/integration/schemas/sap-card.json +51 -3
- package/src/sap/ui/integration/themes/base/Card.less +1 -1
- package/src/sap/ui/integration/themes/base/ListContentItem.less +4 -27
- package/src/sap/ui/integration/themes/base/ObjectStatusIcons.less +4 -6
- package/src/sap/ui/integration/util/BaseFactory.js +1 -1
- package/src/sap/ui/integration/util/BindingHelper.js +1 -1
- package/src/sap/ui/integration/util/BindingResolver.js +1 -1
- package/src/sap/ui/integration/util/CacheAndRequestDataProvider.js +3 -3
- package/src/sap/ui/integration/util/CardObserver.js +2 -2
- package/src/sap/ui/integration/util/ContentFactory.js +15 -7
- package/src/sap/ui/integration/util/CsrfTokenHandler.js +7 -7
- package/src/sap/ui/integration/util/DataProvider.js +8 -3
- package/src/sap/ui/integration/util/DataProviderFactory.js +1 -1
- package/src/sap/ui/integration/util/Destinations.js +1 -1
- package/src/sap/ui/integration/util/ErrorHandler.js +297 -0
- package/src/sap/ui/integration/util/ExtensionDataProvider.js +1 -1
- package/src/sap/ui/integration/util/Form.js +11 -6
- package/src/sap/ui/integration/util/HeaderFactory.js +4 -3
- package/src/sap/ui/integration/util/JSONBindingHelper.js +1 -1
- package/src/sap/ui/integration/util/LoadingProvider.js +2 -18
- package/src/sap/ui/integration/util/Manifest.js +1 -1
- package/src/sap/ui/integration/util/RequestDataProvider.js +163 -77
- package/src/sap/ui/integration/util/ServiceDataProvider.js +1 -1
- package/src/sap/ui/integration/util/ServiceManager.js +1 -1
- package/src/sap/ui/integration/util/SkeletonCard.js +19 -2
- package/src/sap/ui/integration/util/Utils.js +1 -1
- package/src/sap/ui/integration/util/Validators.js +1 -1
- package/src/sap/ui/integration/widgets/Card.js +95 -127
|
@@ -137,7 +137,7 @@ sap.ui.define([
|
|
|
137
137
|
* @extends sap.ui.core.Control
|
|
138
138
|
*
|
|
139
139
|
* @author SAP SE
|
|
140
|
-
* @version 1.
|
|
140
|
+
* @version 1.113.0
|
|
141
141
|
* @constructor
|
|
142
142
|
* @since 1.94
|
|
143
143
|
* @private
|
|
@@ -892,7 +892,7 @@ sap.ui.define([
|
|
|
892
892
|
* @experimental since 1.94
|
|
893
893
|
* @public
|
|
894
894
|
* @author SAP SE
|
|
895
|
-
* @version 1.
|
|
895
|
+
* @version 1.113.0
|
|
896
896
|
* @borrows sap.ui.integration.editor.Editor#getParameters as getParameters
|
|
897
897
|
* @borrows sap.ui.integration.editor.Editor#resolveDestination as resolveDestination
|
|
898
898
|
* @borrows sap.ui.integration.editor.Editor#request as request
|
|
@@ -1086,12 +1086,11 @@ sap.ui.define([
|
|
|
1086
1086
|
aSupportedLocales = vI18n.supportedLocales;
|
|
1087
1087
|
}
|
|
1088
1088
|
}
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
}
|
|
1089
|
+
this._oEditorResourceBundles = new EditorResourceBundles({
|
|
1090
|
+
url: sResourceBundleURL,
|
|
1091
|
+
languages: Editor._oLanguages,
|
|
1092
|
+
supportedLocales: aSupportedLocales
|
|
1093
|
+
});
|
|
1095
1094
|
};
|
|
1096
1095
|
|
|
1097
1096
|
/**
|
|
@@ -1184,6 +1183,8 @@ sap.ui.define([
|
|
|
1184
1183
|
};
|
|
1185
1184
|
|
|
1186
1185
|
Editor.prototype.initDestinations = function (vHost) {
|
|
1186
|
+
this._destinationsModel = new JSONModel({});
|
|
1187
|
+
this.setModel(this._destinationsModel, "destinations");
|
|
1187
1188
|
var oHostInstance = this.getHostInstance();
|
|
1188
1189
|
|
|
1189
1190
|
if (vHost && !oHostInstance) {
|
|
@@ -2043,6 +2044,9 @@ sap.ui.define([
|
|
|
2043
2044
|
},
|
|
2044
2045
|
context: {
|
|
2045
2046
|
path: "context>/"
|
|
2047
|
+
},
|
|
2048
|
+
destinations: {
|
|
2049
|
+
path: "destinations>/"
|
|
2046
2050
|
}
|
|
2047
2051
|
},
|
|
2048
2052
|
visible: oConfig.visible
|
|
@@ -2107,6 +2111,7 @@ sap.ui.define([
|
|
|
2107
2111
|
if (oConfig.layout) {
|
|
2108
2112
|
oField._layout = oConfig.layout;
|
|
2109
2113
|
}
|
|
2114
|
+
oField._oEditorResourceBundles = this._oEditorResourceBundles;
|
|
2110
2115
|
oField.setAssociation("_messageStrip", MessageStripId);
|
|
2111
2116
|
return oField;
|
|
2112
2117
|
};
|
|
@@ -2283,36 +2288,53 @@ sap.ui.define([
|
|
|
2283
2288
|
}
|
|
2284
2289
|
this._settingsModel.setProperty(oConfig._settingspath + "/_loading", false);
|
|
2285
2290
|
oField._hideValueState(true, true);
|
|
2286
|
-
}.bind(this))
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
sError =
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
var
|
|
2293
|
-
if (
|
|
2294
|
-
oErrorInResponse
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2291
|
+
}.bind(this))
|
|
2292
|
+
.catch(function (oError) {
|
|
2293
|
+
var oErrorPromise = new Promise(function (resolve) {
|
|
2294
|
+
var sError = this._oResourceBundle.getText("EDITOR_BAD_REQUEST");
|
|
2295
|
+
if (Array.isArray(oError) && oError.length > 0) {
|
|
2296
|
+
sError = oError[0];
|
|
2297
|
+
var oResponse = oError[1];
|
|
2298
|
+
if (oResponse) {
|
|
2299
|
+
var oErrorInResponse;
|
|
2300
|
+
oResponse.text().then(function (sResponseText) {
|
|
2301
|
+
if (Utils.isJson(sResponseText)) {
|
|
2302
|
+
oErrorInResponse = JSON.parse(sResponseText).error;
|
|
2303
|
+
} else {
|
|
2304
|
+
sError = sResponseText;
|
|
2305
|
+
}
|
|
2306
|
+
|
|
2307
|
+
if (oErrorInResponse) {
|
|
2308
|
+
sError = (oErrorInResponse.code || oErrorInResponse.errorCode || oResponse.status) + ": " + oErrorInResponse.message;
|
|
2309
|
+
}
|
|
2310
|
+
|
|
2311
|
+
resolve(sError);
|
|
2312
|
+
});
|
|
2313
|
+
return;
|
|
2314
|
+
} else {
|
|
2315
|
+
resolve(sError);
|
|
2316
|
+
return;
|
|
2304
2317
|
}
|
|
2318
|
+
} else if (typeof (oError) === "string") {
|
|
2319
|
+
sError = oError;
|
|
2320
|
+
resolve(sError);
|
|
2321
|
+
return;
|
|
2322
|
+
} else {
|
|
2323
|
+
resolve(sError);
|
|
2324
|
+
return;
|
|
2305
2325
|
}
|
|
2306
|
-
}
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2326
|
+
}.bind(this));
|
|
2327
|
+
|
|
2328
|
+
return oErrorPromise.then(function (sError) {
|
|
2329
|
+
var oValueModel = oField.getModel();
|
|
2330
|
+
oValueModel.firePropertyChange();
|
|
2331
|
+
if (oConfig.type === "object" || oConfig.type === "object[]") {
|
|
2332
|
+
oField.mergeValueWithRequestResult();
|
|
2333
|
+
}
|
|
2334
|
+
this._settingsModel.setProperty(oConfig._settingspath + "/_loading", false);
|
|
2335
|
+
oField._showValueState("error", sError, true);
|
|
2336
|
+
}.bind(this));
|
|
2337
|
+
|
|
2316
2338
|
}.bind(this));
|
|
2317
2339
|
};
|
|
2318
2340
|
|
|
@@ -2371,26 +2393,27 @@ sap.ui.define([
|
|
|
2371
2393
|
var sError = this._oResourceBundle.getText("EDITOR_BAD_REQUEST");
|
|
2372
2394
|
if (Array.isArray(oError) && oError.length > 0) {
|
|
2373
2395
|
sError = oError[0];
|
|
2374
|
-
var
|
|
2375
|
-
if (
|
|
2396
|
+
var oResponse = oError[1];
|
|
2397
|
+
if (oResponse) {
|
|
2376
2398
|
var oErrorInResponse;
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
if (Utils.isJson(jqXHR.responseText)) {
|
|
2381
|
-
oErrorInResponse = JSON.parse(jqXHR.responseText).error;
|
|
2399
|
+
oResponse.text().then(function (sResponseText) {
|
|
2400
|
+
if (Utils.isJson(sResponseText)) {
|
|
2401
|
+
oErrorInResponse = JSON.parse(sResponseText).error;
|
|
2382
2402
|
} else {
|
|
2383
|
-
sError =
|
|
2403
|
+
sError = sResponseText;
|
|
2384
2404
|
}
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2405
|
+
|
|
2406
|
+
if (oErrorInResponse) {
|
|
2407
|
+
sError = (oErrorInResponse.code || oErrorInResponse.errorCode || oResponse.status) + ": " + oErrorInResponse.message;
|
|
2408
|
+
}
|
|
2409
|
+
|
|
2410
|
+
Log.error("Request extension data failed, " + sError);
|
|
2411
|
+
});
|
|
2389
2412
|
}
|
|
2390
2413
|
} else if (typeof (oError) === "string") {
|
|
2391
2414
|
sError = oError;
|
|
2415
|
+
Log.error("Request extension data failed, " + sError);
|
|
2392
2416
|
}
|
|
2393
|
-
Log.error("Request extension data failed, " + sError);
|
|
2394
2417
|
}.bind(this));
|
|
2395
2418
|
};
|
|
2396
2419
|
|
|
@@ -3065,6 +3088,7 @@ sap.ui.define([
|
|
|
3065
3088
|
this._beforeManifestModel = null;
|
|
3066
3089
|
this._oInitialManifestModel = null;
|
|
3067
3090
|
this._settingsModel = null;
|
|
3091
|
+
this._destinationsModel = null;
|
|
3068
3092
|
document.body.style.removeProperty("--sapUiIntegrationEditorFormWidth");
|
|
3069
3093
|
document.body.style.removeProperty("--sapUiIntegrationEditorFormHeight");
|
|
3070
3094
|
Control.prototype.destroy.apply(this, arguments);
|
|
@@ -3269,19 +3293,17 @@ sap.ui.define([
|
|
|
3269
3293
|
if (typeof oItems[n + ".destination"].label === "undefined") {
|
|
3270
3294
|
oItems[n + ".destination"].label = n;
|
|
3271
3295
|
}
|
|
3272
|
-
if (oHost) {
|
|
3273
|
-
oItems[n + ".destination"]._loading = true;
|
|
3274
|
-
}
|
|
3275
3296
|
});
|
|
3276
3297
|
var getDestinationsDone = false;
|
|
3277
3298
|
if (oHost) {
|
|
3299
|
+
this._destinationsModel.setProperty("/_loading", true);
|
|
3300
|
+
this._destinationsModel.checkUpdate(true);
|
|
3278
3301
|
this.getHostInstance().getDestinations().then(function (a) {
|
|
3279
3302
|
getDestinationsDone = true;
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
}.bind(this));
|
|
3303
|
+
this._destinationsModel.setProperty("/_values", a);
|
|
3304
|
+
this._destinationsModel.setProperty("/_loading", false);
|
|
3305
|
+
this._destinationsModel.setSizeLimit(a.length);
|
|
3306
|
+
this._destinationsModel.checkUpdate(true);
|
|
3285
3307
|
}.bind(this)).catch(function () {
|
|
3286
3308
|
//Fix DIGITALWORKPLACE-4359, retry once for the timeout issue
|
|
3287
3309
|
return this.getHostInstance().getDestinations();
|
|
@@ -3289,16 +3311,13 @@ sap.ui.define([
|
|
|
3289
3311
|
if (getDestinationsDone) {
|
|
3290
3312
|
return;
|
|
3291
3313
|
}
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
|
|
3295
|
-
|
|
3296
|
-
}.bind(this));
|
|
3314
|
+
this._destinationsModel.setProperty("/_values", b);
|
|
3315
|
+
this._destinationsModel.setProperty("/_loading", false);
|
|
3316
|
+
this._destinationsModel.setSizeLimit(b.length);
|
|
3317
|
+
this._destinationsModel.checkUpdate(true);
|
|
3297
3318
|
}.bind(this)).catch(function (e) {
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
this._settingsModel.checkUpdate(true);
|
|
3301
|
-
}.bind(this));
|
|
3319
|
+
this._destinationsModel.setProperty("/_loading", false);
|
|
3320
|
+
this._destinationsModel.checkUpdate(true);
|
|
3302
3321
|
Log.error("Can not get destinations list from '" + oHost.getId() + "'.");
|
|
3303
3322
|
}.bind(this));
|
|
3304
3323
|
}
|
|
@@ -5,90 +5,82 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
|
+
"sap/ui/base/ManagedObject",
|
|
8
9
|
"sap/base/util/LoaderExtensions",
|
|
9
10
|
"sap/base/i18n/ResourceBundle"
|
|
10
|
-
], function (LoaderExtensions, ResourceBundle) {
|
|
11
|
+
], function (ManagedObject, LoaderExtensions, ResourceBundle) {
|
|
11
12
|
"use strict";
|
|
12
13
|
|
|
13
14
|
/**
|
|
15
|
+
* Constructor for a new <code>EditorResourceBundles</code>.
|
|
16
|
+
*
|
|
14
17
|
* @class Resource Bundles of Editor
|
|
15
18
|
* @alias sap.ui.integration.editor.EditorResourceBundles
|
|
16
19
|
* @author SAP SE
|
|
17
20
|
* @since 1.94.0
|
|
18
|
-
* @version 1.
|
|
21
|
+
* @version 1.113.0
|
|
19
22
|
* @private
|
|
20
|
-
* @experimental since 1.94.0
|
|
21
|
-
* @ui5-restricted
|
|
22
23
|
*/
|
|
23
|
-
var EditorResourceBundles = (
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
function init() {
|
|
37
|
-
_aEditorResourceBundles = [];
|
|
38
|
-
//according to the language list, load each resource bundle
|
|
39
|
-
for (var p in _aLanguageList) {
|
|
40
|
-
var oResourceBundleTemp;
|
|
41
|
-
if (_sResourceBundleURL) {
|
|
42
|
-
var aFallbacks = [p];
|
|
43
|
-
if (p.indexOf("-") > -1) {
|
|
44
|
-
aFallbacks.push(p.substring(0, p.indexOf("-")));
|
|
45
|
-
}
|
|
46
|
-
//add en into fallbacks
|
|
47
|
-
if (!aFallbacks.includes("en")) {
|
|
48
|
-
aFallbacks.push("en");
|
|
49
|
-
}
|
|
50
|
-
oResourceBundleTemp = ResourceBundle.create({
|
|
51
|
-
url: _sResourceBundleURL,
|
|
52
|
-
async: false,
|
|
53
|
-
locale: p,
|
|
54
|
-
supportedLocales: aFallbacks
|
|
55
|
-
});
|
|
24
|
+
var EditorResourceBundles = ManagedObject.extend("sap.ui.integration.editor.EditorResourceBundles", {
|
|
25
|
+
metadata: {
|
|
26
|
+
library: "sap.ui.integration",
|
|
27
|
+
properties: {
|
|
28
|
+
url: {
|
|
29
|
+
type: "string",
|
|
30
|
+
defaultValue: ""
|
|
31
|
+
},
|
|
32
|
+
languages: {
|
|
33
|
+
type: "object"
|
|
34
|
+
},
|
|
35
|
+
supportedLocales: {
|
|
36
|
+
type: "array"
|
|
56
37
|
}
|
|
57
|
-
var oResourceBundleObject = {
|
|
58
|
-
"language": _aLanguageList[p],
|
|
59
|
-
"resourceBundle": oResourceBundleTemp,
|
|
60
|
-
"isSupportedLocale": true
|
|
61
|
-
};
|
|
62
|
-
if (Array.isArray(_aSupportedLocales) && !_aSupportedLocales.includes(p) && !_aSupportedLocales.includes(p.replace('-', '_'))) {
|
|
63
|
-
oResourceBundleObject.isSupportedLocale = false;
|
|
64
|
-
}
|
|
65
|
-
_aEditorResourceBundles[p] = oResourceBundleObject;
|
|
66
38
|
}
|
|
67
|
-
return _aEditorResourceBundles;
|
|
68
39
|
}
|
|
40
|
+
});
|
|
69
41
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
if (!
|
|
85
|
-
|
|
42
|
+
EditorResourceBundles.prototype.loadResourceBundles = function () {
|
|
43
|
+
var sUrl = this.getUrl();
|
|
44
|
+
var aSupportedLocales = this.getSupportedLocales();
|
|
45
|
+
var aLanguages = this.getLanguages();
|
|
46
|
+
this._aEditorResourceBundles = [];
|
|
47
|
+
//according to the language list, load each resource bundle
|
|
48
|
+
for (var p in aLanguages) {
|
|
49
|
+
var oResourceBundleTemp;
|
|
50
|
+
if (sUrl) {
|
|
51
|
+
var aFallbacks = [p];
|
|
52
|
+
if (p.indexOf("-") > -1) {
|
|
53
|
+
aFallbacks.push(p.substring(0, p.indexOf("-")));
|
|
54
|
+
}
|
|
55
|
+
//add en into fallbacks
|
|
56
|
+
if (!aFallbacks.includes("en")) {
|
|
57
|
+
aFallbacks.push("en");
|
|
86
58
|
}
|
|
87
|
-
|
|
59
|
+
oResourceBundleTemp = ResourceBundle.create({
|
|
60
|
+
url: sUrl,
|
|
61
|
+
async: false,
|
|
62
|
+
locale: p,
|
|
63
|
+
supportedLocales: aFallbacks
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
var oResourceBundleObject = {
|
|
67
|
+
"language": aLanguages[p],
|
|
68
|
+
"resourceBundle": oResourceBundleTemp,
|
|
69
|
+
"isSupportedLocale": true
|
|
70
|
+
};
|
|
71
|
+
if (Array.isArray(aSupportedLocales) && !aSupportedLocales.includes(p) && !aSupportedLocales.includes(p.replace('-', '_'))) {
|
|
72
|
+
oResourceBundleObject.isSupportedLocale = false;
|
|
88
73
|
}
|
|
89
|
-
|
|
74
|
+
this._aEditorResourceBundles[p] = oResourceBundleObject;
|
|
75
|
+
}
|
|
76
|
+
};
|
|
90
77
|
|
|
91
|
-
|
|
78
|
+
EditorResourceBundles.prototype.getResourceBundles = function () {
|
|
79
|
+
if (!this._aEditorResourceBundles) {
|
|
80
|
+
this.loadResourceBundles();
|
|
81
|
+
}
|
|
82
|
+
return this._aEditorResourceBundles;
|
|
83
|
+
};
|
|
92
84
|
|
|
93
85
|
return EditorResourceBundles;
|
|
94
86
|
});
|
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
*/
|
|
6
6
|
sap.ui.define([
|
|
7
7
|
"sap/ui/integration/editor/fields/BaseField",
|
|
8
|
-
"sap/
|
|
9
|
-
"sap/
|
|
10
|
-
|
|
8
|
+
"sap/ui/core/ListItem",
|
|
9
|
+
"sap/m/ComboBox",
|
|
10
|
+
"sap/ui/model/Sorter"
|
|
11
11
|
], function (
|
|
12
|
-
BaseField,
|
|
12
|
+
BaseField, ListItem, ComboBox, Sorter
|
|
13
13
|
) {
|
|
14
14
|
"use strict";
|
|
15
15
|
|
|
@@ -19,7 +19,7 @@ sap.ui.define([
|
|
|
19
19
|
* @alias sap.ui.integration.editor.fields.DestinationField
|
|
20
20
|
* @author SAP SE
|
|
21
21
|
* @since 1.83.0
|
|
22
|
-
* @version 1.
|
|
22
|
+
* @version 1.113.0
|
|
23
23
|
* @private
|
|
24
24
|
* @experimental since 1.83.0
|
|
25
25
|
* @ui5-restricted
|
|
@@ -35,17 +35,20 @@ sap.ui.define([
|
|
|
35
35
|
var oVisualization = oConfig.visualization;
|
|
36
36
|
if (!oVisualization) {
|
|
37
37
|
oVisualization = {
|
|
38
|
-
type:
|
|
38
|
+
type: ComboBox,
|
|
39
39
|
settings: {
|
|
40
|
-
busy: { path: '
|
|
40
|
+
busy: { path: 'destinations>_loading' },
|
|
41
41
|
selectedKey: { path: 'currentSettings>value' },
|
|
42
|
-
forceSelection: false,
|
|
43
42
|
width: "100%",
|
|
44
43
|
items: {
|
|
45
|
-
path: "
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
44
|
+
path: "destinations>_values",
|
|
45
|
+
template: new ListItem({
|
|
46
|
+
text: "{destinations>name}",
|
|
47
|
+
key: "{destinations>name}"
|
|
48
|
+
}),
|
|
49
|
+
sorter: [new Sorter({
|
|
50
|
+
path: 'name'
|
|
51
|
+
})]
|
|
49
52
|
}
|
|
50
53
|
}
|
|
51
54
|
};
|
|
@@ -36,7 +36,6 @@ sap.ui.define([
|
|
|
36
36
|
"sap/m/CustomListItem",
|
|
37
37
|
"sap/ui/model/Sorter",
|
|
38
38
|
"sap/ui/core/CustomData",
|
|
39
|
-
"sap/ui/integration/editor/EditorResourceBundles",
|
|
40
39
|
"sap/ui/integration/util/Utils"
|
|
41
40
|
], function (
|
|
42
41
|
BaseField,
|
|
@@ -70,7 +69,6 @@ sap.ui.define([
|
|
|
70
69
|
CustomListItem,
|
|
71
70
|
Sorter,
|
|
72
71
|
CustomData,
|
|
73
|
-
EditorResourceBundles,
|
|
74
72
|
Utils
|
|
75
73
|
) {
|
|
76
74
|
"use strict";
|
|
@@ -82,7 +80,7 @@ sap.ui.define([
|
|
|
82
80
|
* @alias sap.ui.integration.editor.fields.ObjectField
|
|
83
81
|
* @author SAP SE
|
|
84
82
|
* @since 1.100.0
|
|
85
|
-
* @version 1.
|
|
83
|
+
* @version 1.113.0
|
|
86
84
|
* @private
|
|
87
85
|
* @experimental since 1.100.0
|
|
88
86
|
* @ui5-restricted
|
|
@@ -1226,7 +1224,7 @@ sap.ui.define([
|
|
|
1226
1224
|
// get origin values in i18n files
|
|
1227
1225
|
ObjectField.prototype.getOriginTranslatedValues = function(sKey) {
|
|
1228
1226
|
var aOriginTranslatedValues = [];
|
|
1229
|
-
var aEditorResourceBundles =
|
|
1227
|
+
var aEditorResourceBundles = this._oEditorResourceBundles.getResourceBundles();
|
|
1230
1228
|
for (var p in aEditorResourceBundles) {
|
|
1231
1229
|
var oResourceBundleTemp = aEditorResourceBundles[p];
|
|
1232
1230
|
var sTranslatedValue = "";
|
|
@@ -1256,7 +1254,7 @@ sap.ui.define([
|
|
|
1256
1254
|
// build origin translation values if translation type is "property"
|
|
1257
1255
|
ObjectField.prototype.buildPropertyTranslationValues = function(sKey) {
|
|
1258
1256
|
var aOriginTranslatedValues = [];
|
|
1259
|
-
var aEditorResourceBundles =
|
|
1257
|
+
var aEditorResourceBundles = this._oEditorResourceBundles.getResourceBundles();
|
|
1260
1258
|
for (var p in aEditorResourceBundles) {
|
|
1261
1259
|
aOriginTranslatedValues.push({
|
|
1262
1260
|
"key": p,
|
|
@@ -23,7 +23,6 @@ sap.ui.define([
|
|
|
23
23
|
"sap/base/util/restricted/_debounce",
|
|
24
24
|
"sap/ui/core/Core",
|
|
25
25
|
"sap/ui/model/json/JSONModel",
|
|
26
|
-
"sap/ui/integration/editor/EditorResourceBundles",
|
|
27
26
|
"sap/base/util/deepClone",
|
|
28
27
|
"sap/ui/model/Sorter",
|
|
29
28
|
"sap/m/GroupHeaderListItem",
|
|
@@ -47,7 +46,6 @@ sap.ui.define([
|
|
|
47
46
|
_debounce,
|
|
48
47
|
Core,
|
|
49
48
|
JSONModel,
|
|
50
|
-
EditorResourceBundles,
|
|
51
49
|
deepClone,
|
|
52
50
|
Sorter,
|
|
53
51
|
GroupHeaderListItem,
|
|
@@ -67,7 +65,7 @@ sap.ui.define([
|
|
|
67
65
|
* @alias sap.ui.integration.editor.fields.StringField
|
|
68
66
|
* @author SAP SE
|
|
69
67
|
* @since 1.83.0
|
|
70
|
-
* @version 1.
|
|
68
|
+
* @version 1.113.0
|
|
71
69
|
* @private
|
|
72
70
|
* @experimental since 1.83.0
|
|
73
71
|
* @ui5-restricted
|
|
@@ -338,7 +336,7 @@ sap.ui.define([
|
|
|
338
336
|
//get origin values in i18n files
|
|
339
337
|
StringField.prototype.getOriginTranslatedValues = function(oConfig) {
|
|
340
338
|
var aOriginTranslatedValues = [];
|
|
341
|
-
var aEditorResourceBundles =
|
|
339
|
+
var aEditorResourceBundles = this._oEditorResourceBundles.getResourceBundles();
|
|
342
340
|
//get translation key of the value
|
|
343
341
|
var sKey;
|
|
344
342
|
if (oConfig._translatedDefaultPlaceholder && oConfig._translatedDefaultPlaceholder.startsWith("{i18n>") && oConfig._translatedDefaultPlaceholder.endsWith("}")) {
|