@openui5/sap.ui.integration 1.103.1 → 1.104.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/.eslintrc.json +2 -3
- package/.reuse/dep5 +17 -0
- package/LICENSES/LicenseRef-tzdata-PublicDomain.txt +5 -0
- package/THIRDPARTY.txt +35 -2
- package/package.json +3 -3
- 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 +11 -5
- package/src/sap/ui/integration/cards/AdaptiveContent.js +3 -4
- package/src/sap/ui/integration/cards/AnalyticalContent.js +1 -1
- package/src/sap/ui/integration/cards/AnalyticsCloudContent.js +1 -1
- package/src/sap/ui/integration/cards/BaseContent.js +12 -7
- 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 +1 -1
- package/src/sap/ui/integration/cards/ComponentContent.js +1 -1
- package/src/sap/ui/integration/cards/Footer.js +1 -1
- package/src/sap/ui/integration/cards/Header.js +40 -9
- package/src/sap/ui/integration/cards/ListContent.js +1 -1
- package/src/sap/ui/integration/cards/NumericHeader.js +10 -1
- package/src/sap/ui/integration/cards/ObjectContent.js +142 -4
- package/src/sap/ui/integration/cards/TableContent.js +69 -1
- package/src/sap/ui/integration/cards/TableContentRenderer.js +11 -1
- package/src/sap/ui/integration/cards/TimelineContent.js +1 -1
- package/src/sap/ui/integration/cards/WebPageContent.js +1 -1
- package/src/sap/ui/integration/cards/actions/CardActions.js +24 -12
- package/src/sap/ui/integration/cards/actions/SubmitAction.js +27 -14
- 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 +16 -1
- package/src/sap/ui/integration/cards/filters/DateRangeFilter.js +2 -2
- 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 +2 -2
- package/src/sap/ui/integration/cards/filters/SelectFilter.js +2 -7
- 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 +1 -1
- 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/Paginator.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/BaseEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/PropertyEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/PropertyEditors.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/BasePropertyEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/PropertyEditorFactory.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/arrayEditor/ArrayEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/booleanEditor/BooleanEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/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 +2 -2
- package/src/sap/ui/integration/designtime/editor/CardEditor.js +7 -4
- package/src/sap/ui/integration/designtime/editor/CardPreview.js +1 -1
- package/src/sap/ui/integration/editor/Editor.js +49 -23
- package/src/sap/ui/integration/editor/EditorResourceBundles.js +1 -1
- package/src/sap/ui/integration/editor/Extension.js +10 -24
- package/src/sap/ui/integration/editor/Manifest.js +1 -1
- package/src/sap/ui/integration/editor/Settings.js +2 -2
- package/src/sap/ui/integration/editor/fields/BaseField.js +8 -4
- package/src/sap/ui/integration/editor/fields/BooleanField.js +1 -1
- package/src/sap/ui/integration/editor/fields/DateField.js +1 -1
- package/src/sap/ui/integration/editor/fields/DateTimeField.js +1 -1
- package/src/sap/ui/integration/editor/fields/DestinationField.js +1 -2
- 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 +110 -44
- package/src/sap/ui/integration/editor/fields/ObjectListField.js +36 -11
- package/src/sap/ui/integration/editor/fields/StringField.js +2 -2
- package/src/sap/ui/integration/editor/fields/StringListField.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/formatters/IconFormatter.js +0 -12
- package/src/sap/ui/integration/library.js +2 -2
- package/src/sap/ui/integration/messagebundle.properties +8 -2
- package/src/sap/ui/integration/messagebundle_ar.properties +4 -0
- package/src/sap/ui/integration/messagebundle_bg.properties +4 -0
- package/src/sap/ui/integration/messagebundle_ca.properties +4 -0
- package/src/sap/ui/integration/messagebundle_cs.properties +4 -0
- package/src/sap/ui/integration/messagebundle_cy.properties +4 -0
- package/src/sap/ui/integration/messagebundle_da.properties +4 -0
- package/src/sap/ui/integration/messagebundle_de.properties +4 -0
- package/src/sap/ui/integration/messagebundle_el.properties +6 -2
- package/src/sap/ui/integration/messagebundle_en.properties +6 -2
- package/src/sap/ui/integration/messagebundle_en_GB.properties +6 -2
- package/src/sap/ui/integration/messagebundle_en_US_sappsd.properties +6 -2
- package/src/sap/ui/integration/messagebundle_en_US_saprigi.properties +6 -2
- package/src/sap/ui/integration/messagebundle_en_US_saptrc.properties +6 -2
- package/src/sap/ui/integration/messagebundle_es.properties +5 -1
- package/src/sap/ui/integration/messagebundle_es_MX.properties +4 -0
- package/src/sap/ui/integration/messagebundle_et.properties +4 -0
- package/src/sap/ui/integration/messagebundle_fi.properties +4 -0
- package/src/sap/ui/integration/messagebundle_fr.properties +4 -0
- package/src/sap/ui/integration/messagebundle_fr_CA.properties +4 -0
- package/src/sap/ui/integration/messagebundle_hi.properties +4 -0
- package/src/sap/ui/integration/messagebundle_hr.properties +4 -0
- package/src/sap/ui/integration/messagebundle_hu.properties +5 -1
- package/src/sap/ui/integration/messagebundle_id.properties +6 -2
- package/src/sap/ui/integration/messagebundle_it.properties +4 -0
- package/src/sap/ui/integration/messagebundle_iw.properties +4 -0
- package/src/sap/ui/integration/messagebundle_ja.properties +4 -0
- package/src/sap/ui/integration/messagebundle_kk.properties +4 -0
- package/src/sap/ui/integration/messagebundle_ko.properties +4 -0
- package/src/sap/ui/integration/messagebundle_lt.properties +4 -0
- package/src/sap/ui/integration/messagebundle_lv.properties +4 -0
- package/src/sap/ui/integration/messagebundle_ms.properties +6 -2
- package/src/sap/ui/integration/messagebundle_nl.properties +4 -0
- package/src/sap/ui/integration/messagebundle_no.properties +4 -0
- package/src/sap/ui/integration/messagebundle_pl.properties +5 -1
- package/src/sap/ui/integration/messagebundle_pt.properties +4 -0
- package/src/sap/ui/integration/messagebundle_pt_PT.properties +4 -0
- package/src/sap/ui/integration/messagebundle_ro.properties +4 -0
- package/src/sap/ui/integration/messagebundle_ru.properties +6 -2
- package/src/sap/ui/integration/messagebundle_sh.properties +4 -0
- package/src/sap/ui/integration/messagebundle_sk.properties +4 -0
- package/src/sap/ui/integration/messagebundle_sl.properties +4 -0
- package/src/sap/ui/integration/messagebundle_sv.properties +4 -0
- package/src/sap/ui/integration/messagebundle_th.properties +5 -1
- package/src/sap/ui/integration/messagebundle_tr.properties +4 -0
- package/src/sap/ui/integration/messagebundle_uk.properties +4 -0
- package/src/sap/ui/integration/messagebundle_vi.properties +4 -0
- package/src/sap/ui/integration/messagebundle_zh_CN.properties +4 -0
- package/src/sap/ui/integration/messagebundle_zh_TW.properties +4 -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 +58 -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/CardObserver.js +1 -1
- package/src/sap/ui/integration/util/ContentFactory.js +1 -2
- package/src/sap/ui/integration/util/CsrfTokenHandler.js +1 -1
- package/src/sap/ui/integration/util/DataProvider.js +1 -1
- package/src/sap/ui/integration/util/DataProviderFactory.js +1 -1
- package/src/sap/ui/integration/util/Destinations.js +49 -17
- package/src/sap/ui/integration/util/ExtensionDataProvider.js +1 -1
- package/src/sap/ui/integration/util/HeaderFactory.js +9 -45
- package/src/sap/ui/integration/util/JSONBindingHelper.js +1 -1
- package/src/sap/ui/integration/util/LoadingProvider.js +27 -3
- package/src/sap/ui/integration/util/Manifest.js +11 -6
- package/src/sap/ui/integration/util/RequestDataProvider.js +1 -1
- package/src/sap/ui/integration/util/ServiceDataProvider.js +1 -1
- package/src/sap/ui/integration/util/ServiceManager.js +1 -1
- package/src/sap/ui/integration/util/SkeletonCard.js +1 -1
- package/src/sap/ui/integration/util/Utils.js +42 -1
- package/src/sap/ui/integration/widgets/Card.js +93 -64
|
@@ -144,7 +144,7 @@ sap.ui.define([
|
|
|
144
144
|
* @extends sap.ui.core.Control
|
|
145
145
|
*
|
|
146
146
|
* @author SAP SE
|
|
147
|
-
* @version 1.
|
|
147
|
+
* @version 1.104.0
|
|
148
148
|
* @constructor
|
|
149
149
|
* @since 1.94
|
|
150
150
|
* @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.104.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
|
|
@@ -1161,7 +1161,10 @@ sap.ui.define([
|
|
|
1161
1161
|
this._oDestinations.setHost(oHostInstance);
|
|
1162
1162
|
} else {
|
|
1163
1163
|
var sConfigurationPath = this.getConfigurationPath();
|
|
1164
|
-
this._oDestinations = new Destinations(
|
|
1164
|
+
this._oDestinations = new Destinations({
|
|
1165
|
+
host: oHostInstance,
|
|
1166
|
+
manifestConfig: this._manifestModel.getProperty(sConfigurationPath + "/destinations")
|
|
1167
|
+
});
|
|
1165
1168
|
}
|
|
1166
1169
|
};
|
|
1167
1170
|
|
|
@@ -1491,8 +1494,22 @@ sap.ui.define([
|
|
|
1491
1494
|
break;
|
|
1492
1495
|
case "object":
|
|
1493
1496
|
case "object[]":
|
|
1494
|
-
if (
|
|
1495
|
-
|
|
1497
|
+
if (Array.isArray(oItem.value)) {
|
|
1498
|
+
var aValue = deepClone(oItem.value, 500);
|
|
1499
|
+
// sort the value list according by the position value
|
|
1500
|
+
aValue = aValue.sort(function (a, b) {
|
|
1501
|
+
// if _position property not exists, do nothing
|
|
1502
|
+
if (!a._dt || !a._dt._position || !b._dt || !b._dt._position) {
|
|
1503
|
+
return 0;
|
|
1504
|
+
}
|
|
1505
|
+
return a._dt._position - b._dt._position;
|
|
1506
|
+
});
|
|
1507
|
+
// recount the position value
|
|
1508
|
+
for (var i = 0; i < aValue.length; i++) {
|
|
1509
|
+
var oValue = aValue[i];
|
|
1510
|
+
oValue._dt._position = i + 1;
|
|
1511
|
+
}
|
|
1512
|
+
mResult[oItem.manifestpath] = aValue;
|
|
1496
1513
|
}
|
|
1497
1514
|
break;
|
|
1498
1515
|
default:
|
|
@@ -2043,7 +2060,6 @@ sap.ui.define([
|
|
|
2043
2060
|
}
|
|
2044
2061
|
oField._oDataProviderFactory = this._oDataProviderFactory;
|
|
2045
2062
|
oField.setAssociation("_messageStrip", MessageStripId);
|
|
2046
|
-
oField._previewPosition = this.getPreviewPosition();
|
|
2047
2063
|
return oField;
|
|
2048
2064
|
};
|
|
2049
2065
|
|
|
@@ -3223,26 +3239,28 @@ sap.ui.define([
|
|
|
3223
3239
|
this._addItem(oItem);
|
|
3224
3240
|
}
|
|
3225
3241
|
// customize the size of card editor, define the size in dt.js
|
|
3226
|
-
var
|
|
3227
|
-
|
|
3242
|
+
var editorHeight = this._settingsModel.getProperty("/form/height") !== undefined ? this._settingsModel.getProperty("/form/height") : "350px",
|
|
3243
|
+
editorWidth = this._settingsModel.getProperty("/form/width") !== undefined ? this._settingsModel.getProperty("/form/width") : "100%";
|
|
3228
3244
|
if (this.getProperty("height") === "") {
|
|
3229
|
-
this.setProperty("height",
|
|
3230
|
-
document.body.style.setProperty("--sapUiIntegrationEditorFormHeight",
|
|
3245
|
+
this.setProperty("height", editorHeight);
|
|
3246
|
+
document.body.style.setProperty("--sapUiIntegrationEditorFormHeight", editorHeight);
|
|
3231
3247
|
}
|
|
3232
3248
|
if (this.getProperty("width") === "") {
|
|
3233
|
-
this.setProperty("width",
|
|
3234
|
-
document.body.style.setProperty("--sapUiIntegrationEditorFormWidth",
|
|
3249
|
+
this.setProperty("width", editorWidth);
|
|
3250
|
+
document.body.style.setProperty("--sapUiIntegrationEditorFormWidth", editorWidth);
|
|
3235
3251
|
}
|
|
3236
3252
|
//add additional content
|
|
3237
3253
|
if (this.getMode() !== "translation") {
|
|
3238
|
-
|
|
3254
|
+
this._initPreview().then(function() {
|
|
3239
3255
|
Promise.all(this._aFieldReadyPromise).then(function () {
|
|
3256
|
+
this.setPreviewPositionForFields();
|
|
3240
3257
|
this._ready = true;
|
|
3241
3258
|
this.fireReady();
|
|
3242
3259
|
}.bind(this));
|
|
3243
3260
|
}.bind(this));
|
|
3244
3261
|
} else {
|
|
3245
3262
|
Promise.all(this._aFieldReadyPromise).then(function () {
|
|
3263
|
+
this.setPreviewPositionForFields();
|
|
3246
3264
|
this._ready = true;
|
|
3247
3265
|
this.fireReady();
|
|
3248
3266
|
}.bind(this));
|
|
@@ -3263,6 +3281,14 @@ sap.ui.define([
|
|
|
3263
3281
|
}
|
|
3264
3282
|
};
|
|
3265
3283
|
|
|
3284
|
+
Editor.prototype.setPreviewPositionForFields = function() {
|
|
3285
|
+
var sPosition = this.hasPreview() ? this.getPreviewPosition() : "";
|
|
3286
|
+
var oSettings = this._settingsModel.getData();
|
|
3287
|
+
oSettings.preview = oSettings.preview || {};
|
|
3288
|
+
oSettings.preview.position = sPosition;
|
|
3289
|
+
this._settingsModel.setData(oSettings);
|
|
3290
|
+
};
|
|
3291
|
+
|
|
3266
3292
|
/**
|
|
3267
3293
|
* Destroy the editor and the internal instances that it created
|
|
3268
3294
|
*/
|
|
@@ -3474,7 +3500,7 @@ sap.ui.define([
|
|
|
3474
3500
|
var oItems = oSettings.form.items,
|
|
3475
3501
|
oHost = this.getHostInstance();
|
|
3476
3502
|
Object.keys(oConfiguration.destinations).forEach(function (n) {
|
|
3477
|
-
oItems[n + ".
|
|
3503
|
+
oItems[n + ".destination"] = merge({
|
|
3478
3504
|
manifestpath: sBasePath + "/" + n + "/name", //destination points to name not value
|
|
3479
3505
|
visible: true,
|
|
3480
3506
|
type: "destination",
|
|
@@ -3483,15 +3509,15 @@ sap.ui.define([
|
|
|
3483
3509
|
allowSettings: false,
|
|
3484
3510
|
value: oConfiguration.destinations[n].name,
|
|
3485
3511
|
defaultValue: oConfiguration.destinations[n].defaultUrl,
|
|
3486
|
-
_settingspath: "/form/items/" + [n + ".
|
|
3512
|
+
_settingspath: "/form/items/" + [n + ".destination"],
|
|
3487
3513
|
_values: [],
|
|
3488
3514
|
_destinationName: n
|
|
3489
3515
|
}, oConfiguration.destinations[n]);
|
|
3490
|
-
if (typeof oItems[n + ".
|
|
3491
|
-
oItems[n + ".
|
|
3516
|
+
if (typeof oItems[n + ".destination"].label === "undefined") {
|
|
3517
|
+
oItems[n + ".destination"].label = n;
|
|
3492
3518
|
}
|
|
3493
3519
|
if (oHost) {
|
|
3494
|
-
oItems[n + ".
|
|
3520
|
+
oItems[n + ".destination"]._loading = true;
|
|
3495
3521
|
}
|
|
3496
3522
|
});
|
|
3497
3523
|
var getDestinationsDone = false;
|
|
@@ -3499,8 +3525,8 @@ sap.ui.define([
|
|
|
3499
3525
|
this.getHostInstance().getDestinations().then(function (a) {
|
|
3500
3526
|
getDestinationsDone = true;
|
|
3501
3527
|
Object.keys(oConfiguration.destinations).forEach(function (n) {
|
|
3502
|
-
oItems[n + ".
|
|
3503
|
-
oItems[n + ".
|
|
3528
|
+
oItems[n + ".destination"]._values = a;
|
|
3529
|
+
oItems[n + ".destination"]._loading = false;
|
|
3504
3530
|
this._settingsModel.checkUpdate(true);
|
|
3505
3531
|
}.bind(this));
|
|
3506
3532
|
}.bind(this)).catch(function () {
|
|
@@ -3511,13 +3537,13 @@ sap.ui.define([
|
|
|
3511
3537
|
return;
|
|
3512
3538
|
}
|
|
3513
3539
|
Object.keys(oConfiguration.destinations).forEach(function (n) {
|
|
3514
|
-
oItems[n + ".
|
|
3515
|
-
oItems[n + ".
|
|
3540
|
+
oItems[n + ".destination"]._values = b;
|
|
3541
|
+
oItems[n + ".destination"]._loading = false;
|
|
3516
3542
|
this._settingsModel.checkUpdate(true);
|
|
3517
3543
|
}.bind(this));
|
|
3518
3544
|
}.bind(this)).catch(function (e) {
|
|
3519
3545
|
Object.keys(oConfiguration.destinations).forEach(function (n) {
|
|
3520
|
-
oItems[n + ".
|
|
3546
|
+
oItems[n + ".destination"]._loading = false;
|
|
3521
3547
|
this._settingsModel.checkUpdate(true);
|
|
3522
3548
|
}.bind(this));
|
|
3523
3549
|
Log.error("Can not get destinations list from '" + oHost.getId() + "'.");
|
|
@@ -4,12 +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/integration/
|
|
8
|
-
"sap/base/Log"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
Log,
|
|
12
|
-
ManagedObject) {
|
|
7
|
+
"sap/ui/integration/Extension",
|
|
8
|
+
"sap/base/Log"
|
|
9
|
+
], function (BaseExtension,
|
|
10
|
+
Log) {
|
|
13
11
|
"use strict";
|
|
14
12
|
|
|
15
13
|
/**
|
|
@@ -21,10 +19,10 @@ sap.ui.define([
|
|
|
21
19
|
* @class
|
|
22
20
|
* Brings JavaScript capabilities for an {@link sap.ui.integration.editor.Editor} where custom logic can be implemented.
|
|
23
21
|
*
|
|
24
|
-
* @extends sap.ui.
|
|
22
|
+
* @extends sap.ui.integration.Extension
|
|
25
23
|
*
|
|
26
24
|
* @author SAP SE
|
|
27
|
-
* @version 1.
|
|
25
|
+
* @version 1.104.0
|
|
28
26
|
*
|
|
29
27
|
* @constructor
|
|
30
28
|
* @public
|
|
@@ -32,27 +30,16 @@ sap.ui.define([
|
|
|
32
30
|
* @alias sap.ui.integration.editor.Extension
|
|
33
31
|
* @ui5-metamodel This control/element will also be described in the UI5 (legacy) designtime metamodel
|
|
34
32
|
*/
|
|
35
|
-
var Extension =
|
|
36
|
-
metadata: {
|
|
37
|
-
library: "sap.ui.integration",
|
|
38
|
-
properties: {
|
|
39
|
-
/**
|
|
40
|
-
* The formatters, which can be used in the manifest.
|
|
41
|
-
* @experimental since 1.94
|
|
42
|
-
*/
|
|
43
|
-
formatters: {
|
|
44
|
-
type: "object"
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
});
|
|
33
|
+
var Extension = BaseExtension.extend("sap.ui.integration.editor.Extension");
|
|
49
34
|
|
|
50
35
|
Extension.prototype.init = function () {
|
|
36
|
+
BaseExtension.prototype.init.apply(this, arguments);
|
|
51
37
|
this._oEditorInterface = null;
|
|
52
38
|
this._oEditor = null;
|
|
53
39
|
};
|
|
54
40
|
|
|
55
41
|
Extension.prototype.exit = function () {
|
|
42
|
+
BaseExtension.prototype.exit.apply(this, arguments);
|
|
56
43
|
this._oEditorInterface = null;
|
|
57
44
|
this._oEditor = null;
|
|
58
45
|
};
|
|
@@ -61,8 +48,7 @@ sap.ui.define([
|
|
|
61
48
|
* See generated JSDoc
|
|
62
49
|
*/
|
|
63
50
|
Extension.prototype.setFormatters = function (aFormatters) {
|
|
64
|
-
|
|
65
|
-
|
|
51
|
+
BaseExtension.prototype.setFormatters.apply(this, arguments);
|
|
66
52
|
if (!this._oEditor) {
|
|
67
53
|
return;
|
|
68
54
|
}
|
|
@@ -66,7 +66,7 @@ sap.ui.define([
|
|
|
66
66
|
* @alias sap.ui.integration.editor.Settings
|
|
67
67
|
* @author SAP SE
|
|
68
68
|
* @since 1.83.0
|
|
69
|
-
* @version 1.
|
|
69
|
+
* @version 1.104.0
|
|
70
70
|
* @private
|
|
71
71
|
* @experimental since 1.83.0
|
|
72
72
|
* @ui5-restricted
|
|
@@ -131,7 +131,7 @@ sap.ui.define([
|
|
|
131
131
|
var iOffsetHeight = (!oPreview || oPreview.getDomRef() === null || oPreview.getDomRef().offsetHeight === 0) ? 350 : oPreview.getDomRef().offsetHeight;
|
|
132
132
|
oPopover.setContentWidth(iOffsetWidth + "px");
|
|
133
133
|
oPopover.setContentHeight((iOffsetHeight - 50) + "px");
|
|
134
|
-
if (
|
|
134
|
+
if (oParent.getPreviewPosition() === "right") {
|
|
135
135
|
oPopover.setPlacement("Right");
|
|
136
136
|
} else {
|
|
137
137
|
oPopover.setPlacement("Left");
|
|
@@ -34,7 +34,7 @@ sap.ui.define([
|
|
|
34
34
|
* @alias sap.ui.integration.editor.fields.BaseField
|
|
35
35
|
* @author SAP SE
|
|
36
36
|
* @since 1.83.0
|
|
37
|
-
* @version 1.
|
|
37
|
+
* @version 1.104.0
|
|
38
38
|
* @private
|
|
39
39
|
* @ui5-restricted
|
|
40
40
|
* @experimental since 1.83.0
|
|
@@ -697,7 +697,7 @@ sap.ui.define([
|
|
|
697
697
|
this._triggerValidation(value);
|
|
698
698
|
}.bind(this));
|
|
699
699
|
}*/
|
|
700
|
-
var oBinding = this.
|
|
700
|
+
var oBinding = this._settingsModel.bindProperty("value", this.getBindingContext("currentSettings"));
|
|
701
701
|
oBinding.attachChange(function () {
|
|
702
702
|
this._triggerValidation(oConfig.value);
|
|
703
703
|
}.bind(this));
|
|
@@ -803,12 +803,12 @@ sap.ui.define([
|
|
|
803
803
|
BaseField.prototype._setCurrentProperty = function (sProperty, vValue) {
|
|
804
804
|
//avoid fire binding changes in the model
|
|
805
805
|
if (this._getCurrentProperty(sProperty) !== vValue) {
|
|
806
|
-
this.
|
|
806
|
+
this._settingsModel.setProperty(sProperty, vValue, this.getBindingContext("currentSettings"));
|
|
807
807
|
}
|
|
808
808
|
};
|
|
809
809
|
|
|
810
810
|
BaseField.prototype._getCurrentProperty = function (sProperty) {
|
|
811
|
-
return this.
|
|
811
|
+
return this._settingsModel.getProperty(sProperty, this.getBindingContext("currentSettings"));
|
|
812
812
|
};
|
|
813
813
|
|
|
814
814
|
BaseField.prototype._applySettings = function (oData) {
|
|
@@ -912,5 +912,9 @@ sap.ui.define([
|
|
|
912
912
|
return oItem;
|
|
913
913
|
};
|
|
914
914
|
|
|
915
|
+
BaseField.prototype.getPreviewPosition = function () {
|
|
916
|
+
return this._settingsModel.getProperty("/preview/position");
|
|
917
|
+
};
|
|
918
|
+
|
|
915
919
|
return BaseField;
|
|
916
920
|
});
|
|
@@ -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.104.0
|
|
23
23
|
* @private
|
|
24
24
|
* @experimental since 1.83.0
|
|
25
25
|
* @ui5-restricted
|
|
@@ -46,7 +46,6 @@ sap.ui.define([
|
|
|
46
46
|
text: "{currentSettings>name}",
|
|
47
47
|
key: "{currentSettings>name}"
|
|
48
48
|
})
|
|
49
|
-
|
|
50
49
|
}
|
|
51
50
|
}
|
|
52
51
|
};
|
|
@@ -84,7 +84,7 @@ sap.ui.define([
|
|
|
84
84
|
* @alias sap.ui.integration.editor.fields.ObjectField
|
|
85
85
|
* @author SAP SE
|
|
86
86
|
* @since 1.100.0
|
|
87
|
-
* @version 1.
|
|
87
|
+
* @version 1.104.0
|
|
88
88
|
* @private
|
|
89
89
|
* @experimental since 1.100.0
|
|
90
90
|
* @ui5-restricted
|
|
@@ -179,7 +179,6 @@ sap.ui.define([
|
|
|
179
179
|
var oVisualization = {
|
|
180
180
|
type: Table,
|
|
181
181
|
settings: {
|
|
182
|
-
rows: "{" + sPath + "}",
|
|
183
182
|
visibleRowCount: 5,
|
|
184
183
|
busy: "{currentSettings>_loading}",
|
|
185
184
|
columns: columns,
|
|
@@ -189,6 +188,12 @@ sap.ui.define([
|
|
|
189
188
|
filter: that.onFilter.bind(that)
|
|
190
189
|
}
|
|
191
190
|
};
|
|
191
|
+
if (oConfig.type === "object") {
|
|
192
|
+
oVisualization.settings.rows = "{" + sPath + "}";
|
|
193
|
+
} else {
|
|
194
|
+
// for object list parameter, allow sort
|
|
195
|
+
oVisualization.settings.rows = "{path: '" + sPath + "', sorter: {path: '_dt/_position', descending: false}}";
|
|
196
|
+
}
|
|
192
197
|
return oVisualization;
|
|
193
198
|
};
|
|
194
199
|
|
|
@@ -353,6 +358,8 @@ sap.ui.define([
|
|
|
353
358
|
var oSelectionColumn = new Column({
|
|
354
359
|
width: "3.2rem",
|
|
355
360
|
hAlign: "Center",
|
|
361
|
+
// hide selection column for object list field with properties defined only
|
|
362
|
+
visible: typeof oConfig.values === "undefined" ? false : true,
|
|
356
363
|
multiLabels: [
|
|
357
364
|
oSelectionColumnLabels
|
|
358
365
|
],
|
|
@@ -527,50 +534,66 @@ sap.ui.define([
|
|
|
527
534
|
if (bAddButtonVisible && oConfig.values) {
|
|
528
535
|
bAddButtonVisible = oConfig.values.allowAdd === true;
|
|
529
536
|
}
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
537
|
+
var oContents = [
|
|
538
|
+
new ToolbarSpacer(),
|
|
539
|
+
new Button({
|
|
540
|
+
icon: "sap-icon://add",
|
|
541
|
+
visible: bAddButtonVisible,
|
|
542
|
+
tooltip: sAddButtonTooltip,
|
|
543
|
+
press: that.addNewObject.bind(that)
|
|
544
|
+
}),
|
|
545
|
+
new Button({
|
|
546
|
+
icon: "sap-icon://edit",
|
|
547
|
+
tooltip: oResourceBundle.getText("EDITOR_FIELD_OBJECT_TABLE_BUTTON_EDIT_TOOLTIP"),
|
|
548
|
+
enabled: "{= !!${/_hasTableSelected}}",
|
|
549
|
+
press: that.onEditOrViewDetail.bind(that)
|
|
550
|
+
}),
|
|
551
|
+
new Button({
|
|
552
|
+
icon: "sap-icon://delete",
|
|
553
|
+
tooltip: oResourceBundle.getText("EDITOR_FIELD_OBJECT_DELETE"),
|
|
554
|
+
enabled: "{= !!${/_canDelete}}",
|
|
555
|
+
press: that.onDelete.bind(that)
|
|
556
|
+
}),
|
|
557
|
+
new Button({
|
|
558
|
+
icon: "sap-icon://clear-filter",
|
|
559
|
+
visible: bHasFilterDefined,
|
|
560
|
+
enabled: "{= !!${/_hasFilter}}",
|
|
561
|
+
tooltip: oResourceBundle.getText("EDITOR_FIELD_OBJECT_TABLE_BUTTON_CLEAR_ALL_FILTERS_TOOLTIP"),
|
|
562
|
+
press: that.clearAllFilters.bind(that)
|
|
563
|
+
}),
|
|
564
|
+
new Button({
|
|
565
|
+
icon: "sap-icon://multiselect-all",
|
|
566
|
+
visible: false,
|
|
567
|
+
enabled: "{= !${/_hasTableAllSelected}}",
|
|
568
|
+
tooltip: oResourceBundle.getText("EDITOR_FIELD_OBJECT_TABLE_BUTTON_SELECT_ALL_SELETIONS_TOOLTIP"),
|
|
569
|
+
press: that.selectAllTableSelections.bind(that)
|
|
570
|
+
}),
|
|
571
|
+
new Button({
|
|
572
|
+
icon: "sap-icon://multiselect-none",
|
|
573
|
+
visible: false,
|
|
574
|
+
enabled: "{= !!${/_hasTableSelected}}",
|
|
575
|
+
tooltip: oResourceBundle.getText("EDITOR_FIELD_OBJECT_TABLE_BUTTON_CLEAR_ALL_SELETIONS_TOOLTIP"),
|
|
576
|
+
press: that.clearAllTableSelections.bind(that)
|
|
577
|
+
})
|
|
578
|
+
];
|
|
579
|
+
if (oConfig.type === "object[]") {
|
|
580
|
+
oContents = oContents.concat([
|
|
545
581
|
new Button({
|
|
546
|
-
icon: "sap-icon://
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
press: that.
|
|
550
|
-
}),
|
|
551
|
-
new Icon({
|
|
552
|
-
src: "sap-icon://vertical-grip"
|
|
553
|
-
}),
|
|
554
|
-
new Button({
|
|
555
|
-
icon: "sap-icon://clear-filter",
|
|
556
|
-
visible: bHasFilterDefined,
|
|
557
|
-
enabled: "{= !!${/_hasFilter}}",
|
|
558
|
-
tooltip: oResourceBundle.getText("EDITOR_FIELD_OBJECT_TABLE_BUTTON_CLEAR_ALL_FILTERS_TOOLTIP"),
|
|
559
|
-
press: that.clearAllFilters.bind(that)
|
|
560
|
-
}),
|
|
561
|
-
new Button({
|
|
562
|
-
icon: "sap-icon://multiselect-all",
|
|
563
|
-
enabled: "{= !${/_hasTableAllSelected}}",
|
|
564
|
-
tooltip: oResourceBundle.getText("EDITOR_FIELD_OBJECT_TABLE_BUTTON_SELECT_ALL_SELETIONS_TOOLTIP"),
|
|
565
|
-
press: that.selectAllTableSelections.bind(that)
|
|
582
|
+
icon: "sap-icon://navigation-up-arrow",
|
|
583
|
+
enabled: "{= !!${/_hasOnlyOneRowSelected}}",
|
|
584
|
+
tooltip: oResourceBundle.getText("EDITOR_FIELD_OBJECT_TABLE_BUTTON_MOVE_UP_TOOLTIP"),
|
|
585
|
+
press: that.moveRowUp.bind(that)
|
|
566
586
|
}),
|
|
567
587
|
new Button({
|
|
568
|
-
icon: "sap-icon://
|
|
569
|
-
enabled: "{= !!${/
|
|
570
|
-
tooltip: oResourceBundle.getText("
|
|
571
|
-
press: that.
|
|
588
|
+
icon: "sap-icon://navigation-down-arrow",
|
|
589
|
+
enabled: "{= !!${/_hasOnlyOneRowSelected}}",
|
|
590
|
+
tooltip: oResourceBundle.getText("EDITOR_FIELD_OBJECT_TABLE_BUTTON_MOVE_DOWN_TOOLTIP"),
|
|
591
|
+
press: that.moveRowDown.bind(that)
|
|
572
592
|
})
|
|
573
|
-
]
|
|
593
|
+
]);
|
|
594
|
+
}
|
|
595
|
+
return new OverflowToolbar({
|
|
596
|
+
content: oContents
|
|
574
597
|
});
|
|
575
598
|
};
|
|
576
599
|
|
|
@@ -683,8 +706,14 @@ sap.ui.define([
|
|
|
683
706
|
var aSelectedIndices = oTable.getSelectedIndices();
|
|
684
707
|
if (aSelectedIndices.length > 0) {
|
|
685
708
|
oModel.setProperty("/_hasTableSelected", true);
|
|
709
|
+
if (aSelectedIndices.length === 1) {
|
|
710
|
+
oModel.setProperty("/_hasOnlyOneRowSelected", true);
|
|
711
|
+
} else {
|
|
712
|
+
oModel.setProperty("/_hasOnlyOneRowSelected", false);
|
|
713
|
+
}
|
|
686
714
|
} else {
|
|
687
715
|
oModel.setProperty("/_hasTableSelected", false);
|
|
716
|
+
oModel.setProperty("/_hasOnlyOneRowSelected", false);
|
|
688
717
|
oModel.setProperty("/_canDelete", false);
|
|
689
718
|
return;
|
|
690
719
|
}
|
|
@@ -722,10 +751,46 @@ sap.ui.define([
|
|
|
722
751
|
var oModel = oTable.getModel();
|
|
723
752
|
oTable.clearSelection();
|
|
724
753
|
oModel.setProperty("/_hasTableSelected", false);
|
|
754
|
+
oModel.setProperty("/_hasOnlyOneRowSelected", false);
|
|
725
755
|
oModel.setProperty("/_canDelete", false);
|
|
726
756
|
oModel.setProperty("/_hasTableAllSelected", false);
|
|
727
757
|
};
|
|
728
758
|
|
|
759
|
+
ObjectField.prototype.moveRowUp = function (oEvent) {
|
|
760
|
+
this.moveSelectedRow("Up");
|
|
761
|
+
};
|
|
762
|
+
|
|
763
|
+
ObjectField.prototype.moveRowDown = function (oEvent) {
|
|
764
|
+
this.moveSelectedRow("Down");
|
|
765
|
+
};
|
|
766
|
+
|
|
767
|
+
ObjectField.prototype.moveSelectedRow = function (sDirection) {
|
|
768
|
+
var that = this;
|
|
769
|
+
var oTable = that.getAggregation("_field");
|
|
770
|
+
var oModel = oTable.getModel();
|
|
771
|
+
var iSelectedRowIndex = oTable.getSelectedIndex();
|
|
772
|
+
var oSelectedRowContext = oTable.getContextByIndex(iSelectedRowIndex);
|
|
773
|
+
|
|
774
|
+
var iSiblingRowIndex = iSelectedRowIndex + (sDirection === "Up" ? -1 : 1);
|
|
775
|
+
var oSiblingRowContext = oTable.getContextByIndex(iSiblingRowIndex);
|
|
776
|
+
if (!oSiblingRowContext) {
|
|
777
|
+
return;
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
// swap the selected and the siblings rank
|
|
781
|
+
var iSiblingRowRank = oSiblingRowContext.getProperty("_dt/_position");
|
|
782
|
+
var iSelectedRowRank = oSelectedRowContext.getProperty("_dt/_position");
|
|
783
|
+
oModel.setProperty("_dt/_position", iSiblingRowRank, oSelectedRowContext);
|
|
784
|
+
oModel.setProperty("_dt/_position", iSelectedRowRank, oSiblingRowContext);
|
|
785
|
+
oModel.refresh(true);
|
|
786
|
+
|
|
787
|
+
// after move select the sibling
|
|
788
|
+
oTable.setSelectedIndex(iSiblingRowIndex);
|
|
789
|
+
|
|
790
|
+
// save change
|
|
791
|
+
that.refreshValue();
|
|
792
|
+
};
|
|
793
|
+
|
|
729
794
|
ObjectField.prototype.onSelectionChange = function (oEvent) {
|
|
730
795
|
var that = this;
|
|
731
796
|
var oControl = oEvent.getSource();
|
|
@@ -1200,7 +1265,7 @@ sap.ui.define([
|
|
|
1200
1265
|
var oResourceBundle = that.getResourceBundle();
|
|
1201
1266
|
var oItemCloned = deepClone(oItem, 500);
|
|
1202
1267
|
var oModel;
|
|
1203
|
-
var sPlacement = sMode === "add" && that.
|
|
1268
|
+
var sPlacement = sMode === "add" && that.getPreviewPosition() !== "right" ? "Left" : "Right";
|
|
1204
1269
|
if (!that._oObjectDetailsPopover) {
|
|
1205
1270
|
var oAddButton = new Button({
|
|
1206
1271
|
text: oResourceBundle.getText("EDITOR_FIELD_OBJECT_DETAILS_POPOVER_BUTTON_ADD"),
|
|
@@ -1626,7 +1691,7 @@ sap.ui.define([
|
|
|
1626
1691
|
if (!that._oTranslationPopover) {
|
|
1627
1692
|
var oList = that.buildTranslationsList();
|
|
1628
1693
|
var oTranslationsFooter = that.buildTranslationsFooter(oList, true);
|
|
1629
|
-
var sPlacement = that.
|
|
1694
|
+
var sPlacement = that.getPreviewPosition() === "right" ? "Right" : "Left";
|
|
1630
1695
|
that._oTranslationPopover = new Popover({
|
|
1631
1696
|
placement: sPlacement,
|
|
1632
1697
|
contentWidth: "300px",
|
|
@@ -1685,6 +1750,7 @@ sap.ui.define([
|
|
|
1685
1750
|
oModel.setProperty("/_hasSelected", true);
|
|
1686
1751
|
oModel.setProperty("/_hasTableAllSelected", false);
|
|
1687
1752
|
oModel.setProperty("/_hasTableSelected", false);
|
|
1753
|
+
oModel.setProperty("/_hasOnlyOneRowSelected", false);
|
|
1688
1754
|
oModel.checkUpdate();
|
|
1689
1755
|
that.refreshValue();
|
|
1690
1756
|
that.updateTable();
|