@openui5/sap.ui.integration 1.101.0 → 1.102.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 +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 +1 -1
- package/src/sap/ui/integration/cards/AdaptiveContent.js +1 -1
- package/src/sap/ui/integration/cards/AnalyticalContent.js +2 -1
- package/src/sap/ui/integration/cards/AnalyticsCloudContent.js +1 -1
- package/src/sap/ui/integration/cards/BaseContent.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 +1 -1
- package/src/sap/ui/integration/cards/ListContent.js +1 -1
- package/src/sap/ui/integration/cards/NumericHeader.js +1 -1
- package/src/sap/ui/integration/cards/ObjectContent.js +1 -1
- package/src/sap/ui/integration/cards/TableContent.js +1 -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 +1 -1
- package/src/sap/ui/integration/cards/adaptivecards/elements/UI5InputChoiceSet.js +1 -1
- package/src/sap/ui/integration/cards/adaptivecards/elements/UI5InputDate.js +1 -1
- package/src/sap/ui/integration/cards/adaptivecards/elements/UI5InputNumber.js +1 -1
- package/src/sap/ui/integration/cards/adaptivecards/elements/UI5InputText.js +1 -1
- package/src/sap/ui/integration/cards/adaptivecards/elements/UI5InputToggle.js +1 -1
- package/src/sap/ui/integration/cards/filters/BaseFilter.js +1 -1
- 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/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 +1 -1
- package/src/sap/ui/integration/designtime/editor/CardEditor.js +12 -4
- package/src/sap/ui/integration/designtime/editor/CardPreview.js +1 -1
- package/src/sap/ui/integration/editor/Editor.js +145 -41
- 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/Merger.js +0 -1
- package/src/sap/ui/integration/editor/Settings.js +1 -1
- package/src/sap/ui/integration/editor/css/Editor.css +11 -5
- package/src/sap/ui/integration/editor/fields/BaseField.js +43 -9
- package/src/sap/ui/integration/editor/fields/BooleanField.js +1 -1
- package/src/sap/ui/integration/editor/fields/DateField.js +1 -1
- package/src/sap/ui/integration/editor/fields/DateTimeField.js +1 -1
- package/src/sap/ui/integration/editor/fields/DestinationField.js +1 -1
- package/src/sap/ui/integration/editor/fields/IntegerField.js +1 -1
- package/src/sap/ui/integration/editor/fields/NumberField.js +1 -1
- package/src/sap/ui/integration/editor/fields/ObjectField.js +1119 -446
- package/src/sap/ui/integration/editor/fields/ObjectListField.js +186 -197
- package/src/sap/ui/integration/editor/fields/StringField.js +36 -13
- 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/library.js +5 -5
- package/src/sap/ui/integration/messagebundle.properties +44 -23
- package/src/sap/ui/integration/messagebundle_ar.properties +26 -12
- package/src/sap/ui/integration/messagebundle_bg.properties +26 -12
- package/src/sap/ui/integration/messagebundle_ca.properties +26 -12
- package/src/sap/ui/integration/messagebundle_cs.properties +26 -12
- package/src/sap/ui/integration/messagebundle_cy.properties +26 -12
- package/src/sap/ui/integration/messagebundle_da.properties +26 -12
- package/src/sap/ui/integration/messagebundle_de.properties +26 -12
- package/src/sap/ui/integration/messagebundle_el.properties +26 -12
- package/src/sap/ui/integration/messagebundle_en.properties +26 -12
- package/src/sap/ui/integration/messagebundle_en_GB.properties +26 -12
- package/src/sap/ui/integration/messagebundle_en_US_sappsd.properties +26 -12
- package/src/sap/ui/integration/messagebundle_en_US_saprigi.properties +26 -12
- package/src/sap/ui/integration/messagebundle_en_US_saptrc.properties +26 -12
- package/src/sap/ui/integration/messagebundle_es.properties +27 -13
- package/src/sap/ui/integration/messagebundle_es_MX.properties +26 -12
- package/src/sap/ui/integration/messagebundle_et.properties +26 -12
- package/src/sap/ui/integration/messagebundle_fi.properties +27 -13
- package/src/sap/ui/integration/messagebundle_fr.properties +26 -12
- package/src/sap/ui/integration/messagebundle_fr_CA.properties +26 -12
- package/src/sap/ui/integration/messagebundle_hi.properties +26 -12
- package/src/sap/ui/integration/messagebundle_hr.properties +26 -12
- package/src/sap/ui/integration/messagebundle_hu.properties +26 -12
- package/src/sap/ui/integration/messagebundle_id.properties +26 -12
- package/src/sap/ui/integration/messagebundle_it.properties +26 -12
- package/src/sap/ui/integration/messagebundle_iw.properties +26 -12
- package/src/sap/ui/integration/messagebundle_ja.properties +26 -12
- package/src/sap/ui/integration/messagebundle_kk.properties +26 -12
- package/src/sap/ui/integration/messagebundle_ko.properties +27 -13
- package/src/sap/ui/integration/messagebundle_lt.properties +26 -12
- package/src/sap/ui/integration/messagebundle_lv.properties +26 -12
- package/src/sap/ui/integration/messagebundle_ms.properties +26 -12
- package/src/sap/ui/integration/messagebundle_nl.properties +26 -12
- package/src/sap/ui/integration/messagebundle_no.properties +26 -12
- package/src/sap/ui/integration/messagebundle_pl.properties +26 -12
- package/src/sap/ui/integration/messagebundle_pt.properties +26 -12
- package/src/sap/ui/integration/messagebundle_pt_PT.properties +26 -12
- package/src/sap/ui/integration/messagebundle_ro.properties +26 -12
- package/src/sap/ui/integration/messagebundle_ru.properties +26 -12
- package/src/sap/ui/integration/messagebundle_sh.properties +26 -12
- package/src/sap/ui/integration/messagebundle_sk.properties +26 -12
- package/src/sap/ui/integration/messagebundle_sl.properties +26 -12
- package/src/sap/ui/integration/messagebundle_sv.properties +26 -12
- package/src/sap/ui/integration/messagebundle_th.properties +26 -12
- package/src/sap/ui/integration/messagebundle_tr.properties +26 -12
- package/src/sap/ui/integration/messagebundle_uk.properties +26 -12
- package/src/sap/ui/integration/messagebundle_vi.properties +26 -12
- package/src/sap/ui/integration/messagebundle_zh_CN.properties +26 -12
- package/src/sap/ui/integration/messagebundle_zh_TW.properties +26 -12
- 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 +73 -3
- 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/CardMerger.js +82 -8
- package/src/sap/ui/integration/util/CardObserver.js +1 -1
- package/src/sap/ui/integration/util/ContentFactory.js +1 -1
- package/src/sap/ui/integration/util/CsrfTokenHandler.js +1 -1
- package/src/sap/ui/integration/util/DataProvider.js +1 -1
- package/src/sap/ui/integration/util/DataProviderFactory.js +1 -1
- package/src/sap/ui/integration/util/Destinations.js +1 -1
- package/src/sap/ui/integration/util/ExtensionDataProvider.js +1 -1
- package/src/sap/ui/integration/util/HeaderFactory.js +1 -1
- package/src/sap/ui/integration/util/JSONBindingHelper.js +1 -1
- package/src/sap/ui/integration/util/LoadingProvider.js +1 -1
- package/src/sap/ui/integration/util/Manifest.js +2 -1
- package/src/sap/ui/integration/util/RequestDataProvider.js +1 -1
- package/src/sap/ui/integration/util/ServiceDataProvider.js +1 -1
- package/src/sap/ui/integration/util/ServiceManager.js +1 -1
- package/src/sap/ui/integration/util/SkeletonCard.js +1 -1
- package/src/sap/ui/integration/util/Utils.js +16 -1
- package/src/sap/ui/integration/widgets/Card.js +32 -10
|
@@ -44,7 +44,7 @@ sap.ui.define([
|
|
|
44
44
|
* @extends sap.ui.integration.editor.Editor
|
|
45
45
|
*
|
|
46
46
|
* @author SAP SE
|
|
47
|
-
* @version 1.
|
|
47
|
+
* @version 1.102.0
|
|
48
48
|
* @constructor
|
|
49
49
|
* @see {@link topic:5b46b03f024542ba802d99d67bc1a3f4 Cards}
|
|
50
50
|
* @since 1.83
|
|
@@ -159,9 +159,17 @@ sap.ui.define([
|
|
|
159
159
|
|
|
160
160
|
this._oEditorManifest = this._oEditorCard._oCardManifest;
|
|
161
161
|
this._registerManifestModulePath();
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
var
|
|
162
|
+
// since Manifest.js will translate i18n values in the manifest.json which we don't want to,
|
|
163
|
+
// so we need to get inital manifest json, merge it with before layer changes by ourself to keep the i18n key
|
|
164
|
+
var oInitialJson = this._oEditorManifest._oInitialJson;
|
|
165
|
+
this._oInitialManifestModel = new JSONModel(oInitialJson);
|
|
166
|
+
this.setProperty("json", oInitialJson, bSuppress);
|
|
167
|
+
var oManifestJson;
|
|
168
|
+
if (this._beforeLayerManifestChanges) {
|
|
169
|
+
oManifestJson = Merger.mergeDelta(oInitialJson, [this._beforeLayerManifestChanges]);
|
|
170
|
+
} else {
|
|
171
|
+
oManifestJson = oInitialJson;
|
|
172
|
+
}
|
|
165
173
|
var _beforeCurrentLayer = merge({}, oManifestJson);
|
|
166
174
|
this._beforeManifestModel = new JSONModel(_beforeCurrentLayer);
|
|
167
175
|
if (iCurrentModeIndex < Merger.layers["translation"] && this._currentLayerManifestChanges) {
|
|
@@ -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.102.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.102.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
|
|
@@ -1308,6 +1308,8 @@ sap.ui.define([
|
|
|
1308
1308
|
var oTranslationChange = {
|
|
1309
1309
|
"texts": {}
|
|
1310
1310
|
};
|
|
1311
|
+
// delete the error texts property
|
|
1312
|
+
delete oChange.texts;
|
|
1311
1313
|
oTranslationChange.texts[sLanguage] = {};
|
|
1312
1314
|
Object.keys(oChange).forEach(function (s) {
|
|
1313
1315
|
if (s.charAt(0) === "/") {
|
|
@@ -1463,8 +1465,8 @@ sap.ui.define([
|
|
|
1463
1465
|
if (oItem.translatable && !oItem._changed && oItem._translatedPlaceholder && !this._currentLayerManifestChanges[oItem.manifestpath]) {
|
|
1464
1466
|
//do not save a value that was not changed and comes from a translated default value
|
|
1465
1467
|
//mResult[oItem.manifestpath] = oItem._translatedPlaceholder;
|
|
1466
|
-
//
|
|
1467
|
-
continue;
|
|
1468
|
+
//but we need to save the setting changes for the next layer, so remove the continue sentence.
|
|
1469
|
+
//continue;
|
|
1468
1470
|
} else {
|
|
1469
1471
|
if (oItem.valueItems) {
|
|
1470
1472
|
mResult[oItem.manifestpath.substring(0, oItem.manifestpath.lastIndexOf("/")) + "/valueItems"] = oItem.valueItems;
|
|
@@ -1476,6 +1478,13 @@ sap.ui.define([
|
|
|
1476
1478
|
case "string":
|
|
1477
1479
|
if (!oItem.translatable) {
|
|
1478
1480
|
mResult[oItem.manifestpath] = oItem.value;
|
|
1481
|
+
} else if (oItem._hasDynamicValue) {
|
|
1482
|
+
// if value is dynamic value of a translatable parameter, save it and delete all the current translations
|
|
1483
|
+
mResult[oItem.manifestpath] = oItem.value;
|
|
1484
|
+
this.deleteAllTranslationValuesInTexts(oItem.manifestpath);
|
|
1485
|
+
} else if (oItem._beforeValue && (oItem._beforeValue.indexOf("{context>") === 0 || oItem._beforeValue.indexOf("{{parameters") === 0)) {
|
|
1486
|
+
// if before value is dynamic value of a translatable parameter, save it
|
|
1487
|
+
mResult[oItem.manifestpath] = oItem.value;
|
|
1479
1488
|
}
|
|
1480
1489
|
break;
|
|
1481
1490
|
case "group":
|
|
@@ -1517,24 +1526,64 @@ sap.ui.define([
|
|
|
1517
1526
|
}
|
|
1518
1527
|
}
|
|
1519
1528
|
}
|
|
1520
|
-
if (
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1529
|
+
if (this.getMode() === "translation") {
|
|
1530
|
+
// translation mode don't have texts property
|
|
1531
|
+
delete mResult.texts;
|
|
1532
|
+
} else if (oSettings.texts) {
|
|
1533
|
+
mResult.texts = deepClone(oSettings.texts, 500) || {};
|
|
1534
|
+
// Clean the translations of object or object list field :
|
|
1535
|
+
// - remove the translations if the object is not exist in value
|
|
1536
|
+
for (var language in mResult.texts){
|
|
1537
|
+
for (var key in mResult.texts[language]) {
|
|
1538
|
+
if (typeof mResult.texts[language][key] === "object") {
|
|
1539
|
+
var vValue = mResult[key];
|
|
1540
|
+
if (!vValue || typeof vValue !== "object" || deepEqual(vValue, {}) || deepEqual(vValue, [])) {
|
|
1541
|
+
delete mResult.texts[language][key];
|
|
1542
|
+
} else if (Array.isArray(vValue)) {
|
|
1543
|
+
// get all the uuids in value list of object list field
|
|
1544
|
+
var aUUIDs = vValue.map(function (oObject) {
|
|
1545
|
+
return oObject._dt ? oObject._dt._uuid || "" : "";
|
|
1546
|
+
});
|
|
1547
|
+
// delete translation texts if uuid not included in value list
|
|
1548
|
+
for (var uuid in mResult.texts[language][key]) {
|
|
1549
|
+
if (!includes(aUUIDs, uuid)) {
|
|
1550
|
+
delete mResult.texts[language][key][uuid];
|
|
1551
|
+
}
|
|
1552
|
+
}
|
|
1553
|
+
} else {
|
|
1554
|
+
// get the uuid in the object value of object field
|
|
1555
|
+
var sUUID = vValue._dt ? vValue._dt._uuid || "" : "";
|
|
1556
|
+
if (sUUID !== "") {
|
|
1557
|
+
// only save the translation texts of current uuid
|
|
1558
|
+
var oTranslation = mResult.texts[language][key][sUUID];
|
|
1559
|
+
if (!oTranslation) {
|
|
1560
|
+
delete mResult.texts[language][key];
|
|
1561
|
+
} else {
|
|
1562
|
+
mResult.texts[language][key] = {};
|
|
1563
|
+
mResult.texts[language][key][sUUID] = oTranslation;
|
|
1564
|
+
}
|
|
1565
|
+
} else {
|
|
1566
|
+
delete mResult.texts[language][key];
|
|
1567
|
+
}
|
|
1568
|
+
}
|
|
1569
|
+
}
|
|
1570
|
+
}
|
|
1571
|
+
if (deepEqual(mResult.texts[language], {})) {
|
|
1572
|
+
delete mResult.texts[language];
|
|
1526
1573
|
}
|
|
1527
1574
|
}
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
mResult[":multipleLanguage"] = true;
|
|
1575
|
+
if (deepEqual(mResult.texts, {})) {
|
|
1576
|
+
delete mResult.texts;
|
|
1577
|
+
}
|
|
1532
1578
|
}
|
|
1533
1579
|
mResult[":layer"] = Merger.layers[this.getMode()];
|
|
1534
1580
|
mResult[":errors"] = this.checkCurrentSettings()[":errors"];
|
|
1535
1581
|
if (mNext) {
|
|
1536
1582
|
mResult[":designtime"] = mNext;
|
|
1537
1583
|
}
|
|
1584
|
+
if (oSettings[":designtime"]) {
|
|
1585
|
+
mResult[":designtime"] = merge(mResult[":designtime"], oSettings[":designtime"]);
|
|
1586
|
+
}
|
|
1538
1587
|
return mResult;
|
|
1539
1588
|
};
|
|
1540
1589
|
/**
|
|
@@ -1956,8 +2005,8 @@ sap.ui.define([
|
|
|
1956
2005
|
}
|
|
1957
2006
|
}.bind(this)));
|
|
1958
2007
|
//listen to value changes on the settings
|
|
1959
|
-
|
|
1960
|
-
|
|
2008
|
+
oField._oValueBinding = this._settingsModel.bindProperty(oConfig._settingspath + "/value");
|
|
2009
|
+
oField._oValueBinding.attachChange(function () {
|
|
1961
2010
|
if (!this._bIgnoreUpdates) {
|
|
1962
2011
|
oConfig._changed = true;
|
|
1963
2012
|
if (oConfig._dependentFields && oConfig._dependentFields.length > 0) {
|
|
@@ -1994,7 +2043,7 @@ sap.ui.define([
|
|
|
1994
2043
|
}
|
|
1995
2044
|
oField._oDataProviderFactory = this._oDataProviderFactory;
|
|
1996
2045
|
oField.setAssociation("_messageStrip", MessageStripId);
|
|
1997
|
-
oField.
|
|
2046
|
+
oField._previewPosition = this.getPreviewPosition();
|
|
1998
2047
|
return oField;
|
|
1999
2048
|
};
|
|
2000
2049
|
|
|
@@ -2034,7 +2083,7 @@ sap.ui.define([
|
|
|
2034
2083
|
/**
|
|
2035
2084
|
* request data via data provider in RT
|
|
2036
2085
|
* @param {object} oConfig
|
|
2037
|
-
* @param {BaseField} oField
|
|
2086
|
+
* @param {sap.ui.integration.editor.fields.BaseField} oField
|
|
2038
2087
|
*/
|
|
2039
2088
|
Editor.prototype._requestData = function (oConfig, oField) {
|
|
2040
2089
|
var oDataProvider = this._oDataProviderFactory.create(oConfig.values.data);
|
|
@@ -2072,7 +2121,9 @@ sap.ui.define([
|
|
|
2072
2121
|
}
|
|
2073
2122
|
if (oConfig.type === "object" || oConfig.type === "object[]") {
|
|
2074
2123
|
tResult.forEach(function (oResult) {
|
|
2075
|
-
oResult.
|
|
2124
|
+
oResult._dt = {
|
|
2125
|
+
_editable: false
|
|
2126
|
+
};
|
|
2076
2127
|
});
|
|
2077
2128
|
}
|
|
2078
2129
|
if (this.getMode() === "content" && oConfig.pageAdminValues && oConfig.pageAdminValues.length > 0) {
|
|
@@ -2282,7 +2333,7 @@ sap.ui.define([
|
|
|
2282
2333
|
/**
|
|
2283
2334
|
* Creates a unnamed model if a values.data section exists in the configuration
|
|
2284
2335
|
* @param {object} oConfig
|
|
2285
|
-
* @param {BaseField} oField
|
|
2336
|
+
* @param {sap.ui.integration.editor.fields.BaseField} oField
|
|
2286
2337
|
*/
|
|
2287
2338
|
Editor.prototype._addValueListModel = function (oConfig, oField, nTimeout) {
|
|
2288
2339
|
if (oConfig.values) {
|
|
@@ -2347,7 +2398,7 @@ sap.ui.define([
|
|
|
2347
2398
|
/**
|
|
2348
2399
|
* Creates a meta model if a values.metadata section exists in the configuration
|
|
2349
2400
|
* @param {object} oConfig
|
|
2350
|
-
* @param {BaseField} oField
|
|
2401
|
+
* @param {sap.ui.integration.editor.fields.BaseField} oField
|
|
2351
2402
|
*/
|
|
2352
2403
|
Editor.prototype._addMetadataModel = function (oConfig, oField) {
|
|
2353
2404
|
if (oConfig.values && oConfig.values.metadata) {
|
|
@@ -2370,16 +2421,6 @@ sap.ui.define([
|
|
|
2370
2421
|
oRequestDefaultParameters.serviceUrl = oData.url;
|
|
2371
2422
|
var oMetaDataModel = new ODataModel(oRequestDefaultParameters);
|
|
2372
2423
|
oMetaDataModel.oMetaModel.fetchData().then(function(oMetaData) {
|
|
2373
|
-
if (oConfig.type === "object" || oConfig.type === "object[]") {
|
|
2374
|
-
var sPath = oConfig.values.metadata.namespace + "." + oConfig.values.metadata.entityTypeName;
|
|
2375
|
-
oMetaData[sPath] = Object.assign(oMetaData[sPath], {
|
|
2376
|
-
_Actions: {
|
|
2377
|
-
$kind: 'Property',
|
|
2378
|
-
$Type: 'Actions',
|
|
2379
|
-
$MaxLength: 15
|
|
2380
|
-
}
|
|
2381
|
-
});
|
|
2382
|
-
}
|
|
2383
2424
|
oField.setModel(new JSONModel(oMetaData), "meta");
|
|
2384
2425
|
});
|
|
2385
2426
|
});
|
|
@@ -2424,17 +2465,33 @@ sap.ui.define([
|
|
|
2424
2465
|
}
|
|
2425
2466
|
};
|
|
2426
2467
|
|
|
2427
|
-
Editor.prototype.getBeforeLayerChange = function (
|
|
2468
|
+
Editor.prototype.getBeforeLayerChange = function (sManifestPath) {
|
|
2428
2469
|
if (!this._beforeLayerManifestChanges) {
|
|
2429
2470
|
this._beforeLayerManifestChanges = {};
|
|
2430
2471
|
}
|
|
2431
|
-
return this._beforeLayerManifestChanges[
|
|
2472
|
+
return this._beforeLayerManifestChanges[sManifestPath];
|
|
2432
2473
|
};
|
|
2433
2474
|
|
|
2434
|
-
Editor.prototype.getTranslationValueInTexts = function (sLanguage,
|
|
2475
|
+
Editor.prototype.getTranslationValueInTexts = function (sLanguage, sManifestPath) {
|
|
2435
2476
|
var sTranslationPath = "/texts/" + sLanguage;
|
|
2436
2477
|
var oProperty = this._settingsModel.getProperty(sTranslationPath) || {};
|
|
2437
|
-
return oProperty[
|
|
2478
|
+
return oProperty[sManifestPath];
|
|
2479
|
+
};
|
|
2480
|
+
|
|
2481
|
+
Editor.prototype.deleteAllTranslationValuesInTexts = function (sManifestPath) {
|
|
2482
|
+
var that = this;
|
|
2483
|
+
var oData = that._settingsModel.getData();
|
|
2484
|
+
if (!oData || !oData.texts) {
|
|
2485
|
+
return;
|
|
2486
|
+
}
|
|
2487
|
+
var sTranslationPath = "/texts";
|
|
2488
|
+
var oTexts = deepClone(oData.texts, 500);
|
|
2489
|
+
for (var n in oTexts) {
|
|
2490
|
+
if (oTexts[n][sManifestPath]) {
|
|
2491
|
+
delete oTexts[n][sManifestPath];
|
|
2492
|
+
}
|
|
2493
|
+
}
|
|
2494
|
+
this._settingsModel.setProperty(sTranslationPath, oTexts);
|
|
2438
2495
|
};
|
|
2439
2496
|
|
|
2440
2497
|
Editor.prototype._handleITBValidation = function (oEditor, sItem, sErrorType) {
|
|
@@ -2787,6 +2844,9 @@ sap.ui.define([
|
|
|
2787
2844
|
var oNewLabel = null;
|
|
2788
2845
|
var sLanguage = Core.getConfiguration().getLanguage().replaceAll('_', '-');
|
|
2789
2846
|
if (sMode === "translation") {
|
|
2847
|
+
if (oConfig.type !== "string") {
|
|
2848
|
+
return;
|
|
2849
|
+
}
|
|
2790
2850
|
if ((typeof oConfig.value === "string" && oConfig.value.indexOf("{") === 0) || typeof oConfig.values !== "undefined") {
|
|
2791
2851
|
//do not show dynamic values for translation
|
|
2792
2852
|
return;
|
|
@@ -2861,10 +2921,13 @@ sap.ui.define([
|
|
|
2861
2921
|
oConfig.value = this._currentLayerManifestChanges[oConfig.manifestpath];
|
|
2862
2922
|
oConfig._beforeLayerChange = oConfig.value;
|
|
2863
2923
|
}
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2924
|
+
//only get translations of string fields
|
|
2925
|
+
if (oConfig.type === "string") {
|
|
2926
|
+
sLanguage = this._language;
|
|
2927
|
+
var sTranslateText = this.getTranslationValueInTexts(sLanguage, oConfig.manifestpath);
|
|
2928
|
+
if (sTranslateText) {
|
|
2929
|
+
oConfig.value = sTranslateText;
|
|
2930
|
+
}
|
|
2868
2931
|
}
|
|
2869
2932
|
var oField = this._createField(oConfig);
|
|
2870
2933
|
this.addAggregation("_formContent",
|
|
@@ -3057,6 +3120,11 @@ sap.ui.define([
|
|
|
3057
3120
|
sTranslationTextKey = sPlaceholder.substring(6, sPlaceholder.length - 1);
|
|
3058
3121
|
}
|
|
3059
3122
|
}
|
|
3123
|
+
// if the value is a dynamic value, do not allow to translate, and delete all the translations
|
|
3124
|
+
if (oItem.value && (oItem.value.indexOf("{context>") === 0 || oItem.value.indexOf("{{parameters") === 0)) {
|
|
3125
|
+
this.deleteAllTranslationValuesInTexts(oItem.manifestpath);
|
|
3126
|
+
sTranslationTextKey = null;
|
|
3127
|
+
}
|
|
3060
3128
|
var sTranslationValueinTexts = this.getTranslationValueInTexts(sLanguage, oItem.manifestpath);
|
|
3061
3129
|
//only if there is a translation key
|
|
3062
3130
|
if (sTranslationTextKey) {
|
|
@@ -3103,6 +3171,24 @@ sap.ui.define([
|
|
|
3103
3171
|
if (oValueTokens) {
|
|
3104
3172
|
oItem.valueTokens = oValueTokens;
|
|
3105
3173
|
}
|
|
3174
|
+
} else if (typeof oItem.value === "object" && oItem.type === "object") {
|
|
3175
|
+
// backward compatibility for pre saved value
|
|
3176
|
+
if (typeof oItem.value._editable === "boolean") {
|
|
3177
|
+
oItem.value._dt = {
|
|
3178
|
+
"_editable" : oItem.value._editable
|
|
3179
|
+
};
|
|
3180
|
+
delete oItem.value._editable;
|
|
3181
|
+
}
|
|
3182
|
+
} else if (Array.isArray(oItem.value) && oItem.value.length > 0 && oItem.type === "object[]") {
|
|
3183
|
+
// backward compatibility for pre saved value
|
|
3184
|
+
oItem.value.forEach(function (oObject) {
|
|
3185
|
+
if (typeof oObject._editable === "boolean") {
|
|
3186
|
+
oObject._dt = {
|
|
3187
|
+
"_editable" : oObject._editable
|
|
3188
|
+
};
|
|
3189
|
+
delete oObject._editable;
|
|
3190
|
+
}
|
|
3191
|
+
});
|
|
3106
3192
|
}
|
|
3107
3193
|
|
|
3108
3194
|
//translate label if it is {{KEY}}
|
|
@@ -3259,6 +3345,7 @@ sap.ui.define([
|
|
|
3259
3345
|
*/
|
|
3260
3346
|
Editor.prototype._applyDesigntimeLayers = function (oSettings) {
|
|
3261
3347
|
var oTexts = {};
|
|
3348
|
+
var oDesigntime = {};
|
|
3262
3349
|
//pull current values
|
|
3263
3350
|
if (this._appliedLayerManifestChanges && Array.isArray(this._appliedLayerManifestChanges)) {
|
|
3264
3351
|
for (var i = 0; i < this._appliedLayerManifestChanges.length; i++) {
|
|
@@ -3266,7 +3353,14 @@ sap.ui.define([
|
|
|
3266
3353
|
if (oChanges) {
|
|
3267
3354
|
var aKeys = Object.keys(oChanges);
|
|
3268
3355
|
for (var j = 0; j < aKeys.length; j++) {
|
|
3269
|
-
|
|
3356
|
+
var vValue = oChanges[aKeys[j]];
|
|
3357
|
+
// if the value of design time is object type,it should for the object field/object list field
|
|
3358
|
+
// add it into designtime of settings
|
|
3359
|
+
if (typeof vValue === "object") {
|
|
3360
|
+
oDesigntime[aKeys[j]] = merge(oDesigntime[aKeys[j]], vValue);
|
|
3361
|
+
continue;
|
|
3362
|
+
}
|
|
3363
|
+
this._settingsModel.setProperty(aKeys[j], vValue);
|
|
3270
3364
|
}
|
|
3271
3365
|
}
|
|
3272
3366
|
var oAppliedLayerManifestChangeTexts = this._appliedLayerManifestChanges[i]["texts"];
|
|
@@ -3283,14 +3377,21 @@ sap.ui.define([
|
|
|
3283
3377
|
//apply the values to a "_next/editable", "_next/visible" entry to the settings.
|
|
3284
3378
|
//the current layer needs to be able to change those values
|
|
3285
3379
|
var sPath = aKeys[j],
|
|
3380
|
+
vValue = oChanges[sPath];
|
|
3286
3381
|
sNext = sPath.substring(0, sPath.lastIndexOf("/") + 1) + "_next";
|
|
3382
|
+
// if the value of design time is object type,it should for the object field/object list field
|
|
3383
|
+
// add it into designtime of settings
|
|
3384
|
+
if (typeof vValue === "object") {
|
|
3385
|
+
oDesigntime[sPath] = merge(oDesigntime[sPath], vValue);
|
|
3386
|
+
continue;
|
|
3387
|
+
}
|
|
3287
3388
|
if (!this._settingsModel.getProperty(sNext)) {
|
|
3288
3389
|
//create a _next entry if it does not exist
|
|
3289
3390
|
this._settingsModel.setProperty(sNext, {});
|
|
3290
3391
|
}
|
|
3291
3392
|
var sNext = sPath.substring(0, sPath.lastIndexOf("/") + 1) + "_next",
|
|
3292
3393
|
sProp = sPath.substring(sPath.lastIndexOf("/") + 1);
|
|
3293
|
-
this._settingsModel.setProperty(sNext + "/" + sProp,
|
|
3394
|
+
this._settingsModel.setProperty(sNext + "/" + sProp, vValue);
|
|
3294
3395
|
}
|
|
3295
3396
|
}
|
|
3296
3397
|
var ocurrentLayerManifestChangeTexts = this._currentLayerManifestChanges["texts"];
|
|
@@ -3301,6 +3402,9 @@ sap.ui.define([
|
|
|
3301
3402
|
if (!deepEqual(oTexts, {})) {
|
|
3302
3403
|
this._settingsModel.setProperty("/texts", oTexts);
|
|
3303
3404
|
}
|
|
3405
|
+
if (!deepEqual(oDesigntime, {})) {
|
|
3406
|
+
this._settingsModel.setProperty("/:designtime", oDesigntime);
|
|
3407
|
+
}
|
|
3304
3408
|
};
|
|
3305
3409
|
/**
|
|
3306
3410
|
* Creates a designtime instance based on an configuration section within the manifest.
|