@openui5/sap.ui.integration 1.117.1 → 1.119.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 +2 -2
- package/package.json +6 -6
- package/src/sap/ui/integration/.library +2 -2
- 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 +32 -33
- package/src/sap/ui/integration/cards/AdaptiveContent.js +1 -1
- package/src/sap/ui/integration/cards/AnalyticalContent.js +13 -9
- package/src/sap/ui/integration/cards/AnalyticsCloudContent.js +1 -1
- package/src/sap/ui/integration/cards/BaseContent.js +2 -1
- package/src/sap/ui/integration/cards/BaseListContent.js +10 -7
- 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 +18 -1
- package/src/sap/ui/integration/cards/ListContent.js +9 -2
- package/src/sap/ui/integration/cards/ListContentRenderer.js +1 -1
- package/src/sap/ui/integration/cards/NumericHeader.js +52 -4
- package/src/sap/ui/integration/cards/ObjectContent.js +5 -1
- package/src/sap/ui/integration/cards/TableContent.js +9 -2
- package/src/sap/ui/integration/cards/TimelineContent.js +8 -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/actions/ShowCardAction.js +18 -8
- package/src/sap/ui/integration/cards/adaptivecards/elements/UI5InputChoiceSet.js +5 -3
- 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/cards/list/MicrochartsResizeHelper.js +1 -1
- package/src/sap/ui/integration/controls/ActionsStrip.js +4 -2
- package/src/sap/ui/integration/controls/ActionsToolbar.js +1 -1
- package/src/sap/ui/integration/controls/BlockingMessage.js +1 -1
- package/src/sap/ui/integration/controls/LinkWithIcon.js +1 -1
- package/src/sap/ui/integration/controls/ListContentItem.js +24 -12
- 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 +1 -1
- package/src/sap/ui/integration/controls/Paginator.js +16 -25
- 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 +1 -2
- package/src/sap/ui/integration/editor/Editor.js +163 -97
- package/src/sap/ui/integration/editor/EditorResourceBundles.js +1 -1
- package/src/sap/ui/integration/editor/Extension.js +1 -1
- package/src/sap/ui/integration/editor/Manifest.js +1 -1
- package/src/sap/ui/integration/editor/Settings.js +347 -79
- package/src/sap/ui/integration/editor/css/Editor.css +7 -0
- package/src/sap/ui/integration/editor/fields/BaseField.js +98 -5
- 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/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 +171 -105
- package/src/sap/ui/integration/editor/fields/ObjectListField.js +18 -12
- package/src/sap/ui/integration/editor/fields/StringField.js +60 -123
- 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 +100 -42
- package/src/sap/ui/integration/editor/fields/viz/ImageSelect.js +40 -0
- package/src/sap/ui/integration/editor/fields/viz/ShapeSelect.js +1 -1
- package/src/sap/ui/integration/editor/fields/viz/VizBase.js +1 -9
- package/src/sap/ui/integration/library-bootstrap.js +5 -4
- package/src/sap/ui/integration/library.js +46 -5
- package/src/sap/ui/integration/messagebundle.properties +12 -0
- package/src/sap/ui/integration/messagebundle_bg.properties +1 -1
- package/src/sap/ui/integration/messagebundle_ca.properties +1 -1
- package/src/sap/ui/integration/messagebundle_da.properties +1 -1
- package/src/sap/ui/integration/messagebundle_el.properties +1 -1
- package/src/sap/ui/integration/messagebundle_en.properties +9 -1
- package/src/sap/ui/integration/messagebundle_es.properties +1 -1
- package/src/sap/ui/integration/messagebundle_es_MX.properties +1 -1
- package/src/sap/ui/integration/messagebundle_et.properties +1 -1
- package/src/sap/ui/integration/messagebundle_fr.properties +1 -1
- package/src/sap/ui/integration/messagebundle_fr_CA.properties +1 -1
- package/src/sap/ui/integration/messagebundle_hi.properties +1 -1
- package/src/sap/ui/integration/messagebundle_hr.properties +1 -1
- package/src/sap/ui/integration/messagebundle_hu.properties +1 -1
- package/src/sap/ui/integration/messagebundle_it.properties +1 -1
- package/src/sap/ui/integration/messagebundle_iw.properties +1 -1
- package/src/sap/ui/integration/messagebundle_ja.properties +1 -1
- package/src/sap/ui/integration/messagebundle_kk.properties +1 -1
- package/src/sap/ui/integration/messagebundle_lt.properties +1 -1
- package/src/sap/ui/integration/messagebundle_lv.properties +1 -1
- package/src/sap/ui/integration/messagebundle_nl.properties +1 -1
- package/src/sap/ui/integration/messagebundle_no.properties +1 -1
- package/src/sap/ui/integration/messagebundle_pl.properties +1 -1
- package/src/sap/ui/integration/messagebundle_pt_PT.properties +1 -1
- package/src/sap/ui/integration/messagebundle_ro.properties +1 -1
- package/src/sap/ui/integration/messagebundle_ru.properties +1 -1
- package/src/sap/ui/integration/messagebundle_sh.properties +1 -1
- package/src/sap/ui/integration/messagebundle_sl.properties +1 -1
- package/src/sap/ui/integration/messagebundle_th.properties +2 -2
- package/src/sap/ui/integration/messagebundle_tr.properties +1 -1
- package/src/sap/ui/integration/messagebundle_uk.properties +4 -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 +449 -332
- package/src/sap/ui/integration/themes/base/Card.less +141 -1
- package/src/sap/ui/integration/thirdparty/markdown-it.js +42 -26
- 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 +25 -10
- 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/ErrorHandler.js +1 -1
- package/src/sap/ui/integration/util/ExtensionDataProvider.js +1 -1
- package/src/sap/ui/integration/util/Form.js +1 -1
- package/src/sap/ui/integration/util/HeaderFactory.js +39 -4
- package/src/sap/ui/integration/util/JSONBindingHelper.js +1 -1
- package/src/sap/ui/integration/util/LoadingProvider.js +1 -1
- package/src/sap/ui/integration/util/Manifest.js +1 -1
- package/src/sap/ui/integration/util/Measurement.js +7 -3
- package/src/sap/ui/integration/util/RequestDataProvider.js +31 -13
- 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 +4 -4
- package/src/sap/ui/integration/util/Validators.js +1 -1
- package/src/sap/ui/integration/util/loadCardEditor.js +1 -1
- package/src/sap/ui/integration/widgets/Card.js +79 -48
- package/src/sap/ui/integration/widgets/CardRenderer.js +2 -0
- package/src/sap-ui-integration.js +5 -5
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
sap.ui.define([
|
|
7
7
|
"sap/ui/core/Control",
|
|
8
|
+
"sap/m/Text",
|
|
9
|
+
"sap/m/Input",
|
|
8
10
|
"sap/m/MultiInput",
|
|
9
11
|
"sap/m/Token",
|
|
10
12
|
"sap/ui/core/Core",
|
|
@@ -14,9 +16,17 @@ sap.ui.define([
|
|
|
14
16
|
"sap/base/util/deepEqual",
|
|
15
17
|
"sap/base/util/deepClone",
|
|
16
18
|
"sap/ui/core/Fragment",
|
|
17
|
-
"sap/ui/integration/util/Validators"
|
|
19
|
+
"sap/ui/integration/util/Validators",
|
|
20
|
+
"sap/ui/model/json/JSONModel",
|
|
21
|
+
"sap/m/List",
|
|
22
|
+
"sap/m/CustomListItem",
|
|
23
|
+
"sap/m/VBox",
|
|
24
|
+
"sap/ui/core/CustomData",
|
|
25
|
+
"sap/ui/model/Sorter"
|
|
18
26
|
], function (
|
|
19
27
|
Control,
|
|
28
|
+
Text,
|
|
29
|
+
Input,
|
|
20
30
|
MultiInput,
|
|
21
31
|
Token,
|
|
22
32
|
Core,
|
|
@@ -26,7 +36,13 @@ sap.ui.define([
|
|
|
26
36
|
deepEqual,
|
|
27
37
|
deepClone,
|
|
28
38
|
Fragment,
|
|
29
|
-
Validators
|
|
39
|
+
Validators,
|
|
40
|
+
JSONModel,
|
|
41
|
+
List,
|
|
42
|
+
CustomListItem,
|
|
43
|
+
VBox,
|
|
44
|
+
CustomData,
|
|
45
|
+
Sorter
|
|
30
46
|
) {
|
|
31
47
|
"use strict";
|
|
32
48
|
|
|
@@ -38,7 +54,7 @@ sap.ui.define([
|
|
|
38
54
|
* @alias sap.ui.integration.editor.fields.BaseField
|
|
39
55
|
* @author SAP SE
|
|
40
56
|
* @since 1.83.0
|
|
41
|
-
* @version 1.
|
|
57
|
+
* @version 1.119.0
|
|
42
58
|
* @private
|
|
43
59
|
* @ui5-restricted
|
|
44
60
|
* @experimental since 1.83.0
|
|
@@ -63,8 +79,12 @@ sap.ui.define([
|
|
|
63
79
|
type: "boolean",
|
|
64
80
|
defaultValue: true
|
|
65
81
|
},
|
|
66
|
-
|
|
82
|
+
parameterKey: {
|
|
67
83
|
type: "string"
|
|
84
|
+
},
|
|
85
|
+
allowPopover: {
|
|
86
|
+
type: "boolean",
|
|
87
|
+
defaultValue: true
|
|
68
88
|
}
|
|
69
89
|
},
|
|
70
90
|
aggregations: {
|
|
@@ -89,6 +109,11 @@ sap.ui.define([
|
|
|
89
109
|
type: "sap.m.MessageStrip",
|
|
90
110
|
multiple: false,
|
|
91
111
|
visibility: "hidden"
|
|
112
|
+
},
|
|
113
|
+
_editor: {
|
|
114
|
+
type: "sap.ui.core.Control",
|
|
115
|
+
multiple: false,
|
|
116
|
+
visibility: "hidden"
|
|
92
117
|
}
|
|
93
118
|
},
|
|
94
119
|
events: {
|
|
@@ -529,6 +554,10 @@ sap.ui.define([
|
|
|
529
554
|
}
|
|
530
555
|
};
|
|
531
556
|
|
|
557
|
+
BaseField.prototype.getParameterId = function () {
|
|
558
|
+
return this.getAssociation("_editor") + "_" + this.getParameterKey();
|
|
559
|
+
};
|
|
560
|
+
|
|
532
561
|
BaseField.prototype.initEditor = function (oConfig) {
|
|
533
562
|
var oControl;
|
|
534
563
|
this._settingsModel = this.getModel("currentSettings");
|
|
@@ -665,7 +694,8 @@ sap.ui.define([
|
|
|
665
694
|
oConfig._hasSettings = (
|
|
666
695
|
oConfig._next.visible === !bVisibleDefault ||
|
|
667
696
|
bEditable === !bEditableDefault ||
|
|
668
|
-
oConfig._next.allowDynamicValues === !bAllowDynamicValuesDefault
|
|
697
|
+
oConfig._next.allowDynamicValues === !bAllowDynamicValuesDefault ||
|
|
698
|
+
typeof oConfig._next.pageAdminNewDestinationParameter !== "undefined"
|
|
669
699
|
);
|
|
670
700
|
} else {
|
|
671
701
|
oConfig._hasSettings = false;
|
|
@@ -843,5 +873,68 @@ sap.ui.define([
|
|
|
843
873
|
return sPlacement;
|
|
844
874
|
};
|
|
845
875
|
|
|
876
|
+
BaseField.prototype.buildTranslationsList = function (sId) {
|
|
877
|
+
return new List(sId + "", {
|
|
878
|
+
growing: true, // required to enable Extended Change Detection (ECD)
|
|
879
|
+
growingThreshold: 60,
|
|
880
|
+
items: {
|
|
881
|
+
path: "languages>/translatedLanguages",
|
|
882
|
+
key: "key", // ECD
|
|
883
|
+
template: new CustomListItem({
|
|
884
|
+
content: [
|
|
885
|
+
new VBox({
|
|
886
|
+
items: [
|
|
887
|
+
new Text({
|
|
888
|
+
text: "{languages>description}"
|
|
889
|
+
}),
|
|
890
|
+
new Input({
|
|
891
|
+
value: "{languages>value}",
|
|
892
|
+
editable: "{languages>editable}"
|
|
893
|
+
})
|
|
894
|
+
]
|
|
895
|
+
})
|
|
896
|
+
],
|
|
897
|
+
customData: [
|
|
898
|
+
new CustomData({
|
|
899
|
+
key: "{languages>key}",
|
|
900
|
+
value: "{languages>description}"
|
|
901
|
+
})
|
|
902
|
+
]
|
|
903
|
+
}),
|
|
904
|
+
sorter: [new Sorter({
|
|
905
|
+
path: 'status',
|
|
906
|
+
descending: true,
|
|
907
|
+
group: true
|
|
908
|
+
})]
|
|
909
|
+
}
|
|
910
|
+
});
|
|
911
|
+
};
|
|
912
|
+
|
|
913
|
+
BaseField.prototype.buildTranslationsModel = function (oTranslatedValues) {
|
|
914
|
+
var that = this;
|
|
915
|
+
var oResourceBundle = that.getResourceBundle();
|
|
916
|
+
var oTranslatonsModel = new JSONModel(oTranslatedValues);
|
|
917
|
+
oTranslatonsModel.attachPropertyChange(function(oEvent) {
|
|
918
|
+
var oContext = oEvent.getParameter("context");
|
|
919
|
+
var oLanguageChanged = oTranslatonsModel.getProperty(oContext.getPath());
|
|
920
|
+
var sStatusStr = oResourceBundle.getText("EDITOR_FIELD_TRANSLATION_LIST_POPOVER_LISTITEM_GROUP_NOTUPDATED");
|
|
921
|
+
if (oLanguageChanged.value !== oLanguageChanged.originValue) {
|
|
922
|
+
sStatusStr = oResourceBundle.getText("EDITOR_FIELD_TRANSLATION_LIST_POPOVER_LISTITEM_GROUP_UPDATED");
|
|
923
|
+
}
|
|
924
|
+
var bIsUpdated = false;
|
|
925
|
+
var oData = oTranslatonsModel.getData();
|
|
926
|
+
for (var i = 0; i < oData.translatedLanguages.length; i++) {
|
|
927
|
+
var oLanguage = oData.translatedLanguages[i];
|
|
928
|
+
if (oLanguage.value !== oLanguage.originValue) {
|
|
929
|
+
bIsUpdated = true;
|
|
930
|
+
break;
|
|
931
|
+
}
|
|
932
|
+
}
|
|
933
|
+
oTranslatonsModel.setProperty(oContext.getPath("status"), sStatusStr, null, /*async:*/true);
|
|
934
|
+
oTranslatonsModel.setProperty("/isUpdated", bIsUpdated, null, /*async:*/true);
|
|
935
|
+
});
|
|
936
|
+
return oTranslatonsModel;
|
|
937
|
+
};
|
|
938
|
+
|
|
846
939
|
return BaseField;
|
|
847
940
|
});
|
|
@@ -18,8 +18,8 @@ sap.ui.define([
|
|
|
18
18
|
"sap/ui/model/json/JSONModel",
|
|
19
19
|
"sap/ui/table/Table",
|
|
20
20
|
"sap/ui/table/Column",
|
|
21
|
+
"sap/ui/table/rowmodes/Fixed",
|
|
21
22
|
"sap/m/Label",
|
|
22
|
-
"sap/m/VBox",
|
|
23
23
|
"sap/ui/model/Filter",
|
|
24
24
|
"sap/ui/model/FilterOperator",
|
|
25
25
|
"sap/base/util/deepEqual",
|
|
@@ -32,11 +32,11 @@ sap.ui.define([
|
|
|
32
32
|
"sap/m/Link",
|
|
33
33
|
"sap/ui/layout/form/SimpleForm",
|
|
34
34
|
"sap/base/util/merge",
|
|
35
|
-
"sap/m/List",
|
|
36
|
-
"sap/m/CustomListItem",
|
|
37
35
|
"sap/ui/model/Sorter",
|
|
38
|
-
"sap/ui/
|
|
39
|
-
"sap/
|
|
36
|
+
"sap/ui/integration/util/Utils",
|
|
37
|
+
"sap/m/table/columnmenu/Menu",
|
|
38
|
+
"sap/m/ComboBox",
|
|
39
|
+
"sap/ui/core/ListItem"
|
|
40
40
|
], function (
|
|
41
41
|
BaseField,
|
|
42
42
|
Text,
|
|
@@ -51,8 +51,8 @@ sap.ui.define([
|
|
|
51
51
|
JSONModel,
|
|
52
52
|
Table,
|
|
53
53
|
Column,
|
|
54
|
+
FixedRowMode,
|
|
54
55
|
Label,
|
|
55
|
-
VBox,
|
|
56
56
|
Filter,
|
|
57
57
|
FilterOperator,
|
|
58
58
|
deepEqual,
|
|
@@ -65,11 +65,11 @@ sap.ui.define([
|
|
|
65
65
|
Link,
|
|
66
66
|
SimpleForm,
|
|
67
67
|
merge,
|
|
68
|
-
List,
|
|
69
|
-
CustomListItem,
|
|
70
68
|
Sorter,
|
|
71
|
-
|
|
72
|
-
|
|
69
|
+
Utils,
|
|
70
|
+
Menu,
|
|
71
|
+
ComboBox,
|
|
72
|
+
ListItem
|
|
73
73
|
) {
|
|
74
74
|
"use strict";
|
|
75
75
|
var REGEXP_TRANSLATABLE = /\{\{(?!parameters.)(?!destinations.)([^\}\}]+)\}\}/g;
|
|
@@ -80,7 +80,7 @@ sap.ui.define([
|
|
|
80
80
|
* @alias sap.ui.integration.editor.fields.ObjectField
|
|
81
81
|
* @author SAP SE
|
|
82
82
|
* @since 1.100.0
|
|
83
|
-
* @version 1.
|
|
83
|
+
* @version 1.119.0
|
|
84
84
|
* @private
|
|
85
85
|
* @experimental since 1.100.0
|
|
86
86
|
* @ui5-restricted
|
|
@@ -139,6 +139,15 @@ sap.ui.define([
|
|
|
139
139
|
}));
|
|
140
140
|
} else if (oControl instanceof Table) {
|
|
141
141
|
oControl.addStyleClass("sapUiIntegrationEditorItemObjectFieldTable");
|
|
142
|
+
// create a column header menu
|
|
143
|
+
that._oMenu = new Menu();
|
|
144
|
+
var aColumns = oControl.getColumns();
|
|
145
|
+
for (var i = 0; i < aColumns.length; i++) {
|
|
146
|
+
// if column supports filter or sort, add menu as header menu for it
|
|
147
|
+
if (aColumns[i].getFilterProperty() || aColumns[i].getSortProperty()) {
|
|
148
|
+
aColumns[i].setHeaderMenu(that._oMenu.getId());
|
|
149
|
+
}
|
|
150
|
+
}
|
|
142
151
|
}
|
|
143
152
|
};
|
|
144
153
|
|
|
@@ -183,13 +192,15 @@ sap.ui.define([
|
|
|
183
192
|
var oVisualization = {
|
|
184
193
|
type: Table,
|
|
185
194
|
settings: {
|
|
186
|
-
|
|
195
|
+
rowMode: new FixedRowMode({
|
|
196
|
+
rowCount: 5
|
|
197
|
+
}),
|
|
187
198
|
busy: "{currentSettings>_loading}",
|
|
188
199
|
busyIndicatorDelay: 200,
|
|
189
200
|
columns: columns,
|
|
190
201
|
selectionBehavior: "RowOnly",
|
|
191
202
|
rowSelectionChange: that.onTableSelectionChange.bind(that),
|
|
192
|
-
|
|
203
|
+
extension: oTableToolbar,
|
|
193
204
|
filter: that.onFilter.bind(that)
|
|
194
205
|
}
|
|
195
206
|
};
|
|
@@ -209,7 +220,7 @@ sap.ui.define([
|
|
|
209
220
|
var fnChange = function() {
|
|
210
221
|
var oModel = this.getAggregation("_field").getModel();
|
|
211
222
|
oModel.checkUpdate(true);
|
|
212
|
-
var oValue = oModel.getProperty("/value");
|
|
223
|
+
var oValue = oModel.getProperty("/value") || {};
|
|
213
224
|
// generate uuid if not exists
|
|
214
225
|
if (!oValue._dt) {
|
|
215
226
|
oValue._dt = {
|
|
@@ -361,12 +372,16 @@ sap.ui.define([
|
|
|
361
372
|
var aKeys = Object.keys(oConfig.properties);
|
|
362
373
|
if (aKeys.length > 0) {
|
|
363
374
|
var oResourceBundle = that.getResourceBundle();
|
|
375
|
+
var bSelectionColumnVisible = typeof oConfig.values === "undefined" ? false : true;
|
|
376
|
+
if (bSelectionColumnVisible) {
|
|
377
|
+
bSelectionColumnVisible = typeof oConfig.showSelectionColumn === "undefined" ? true : oConfig.showSelectionColumn;
|
|
378
|
+
}
|
|
364
379
|
var oSelectionColumnLabels = that.buildSelectionColumnLabels();
|
|
365
380
|
var oSelectionColumn = new Column(sParameterId + "_control_table_column_selection", {
|
|
366
381
|
width: "3.2rem",
|
|
367
382
|
hAlign: "Center",
|
|
368
383
|
// hide selection column for object list field with properties defined only
|
|
369
|
-
visible:
|
|
384
|
+
visible: bSelectionColumnVisible,
|
|
370
385
|
multiLabels: [
|
|
371
386
|
oSelectionColumnLabels
|
|
372
387
|
],
|
|
@@ -420,6 +435,12 @@ sap.ui.define([
|
|
|
420
435
|
var oCellSettings;
|
|
421
436
|
var oCell = deepClone(oProperty.cell) || {};
|
|
422
437
|
delete oCell.type;
|
|
438
|
+
if (sCellType === "string" && oCell.values) {
|
|
439
|
+
sCellType = "ComboBox";
|
|
440
|
+
}
|
|
441
|
+
if (sCellType === "Text" && oCell.editable) {
|
|
442
|
+
sCellType = "Input";
|
|
443
|
+
}
|
|
423
444
|
switch (sCellType) {
|
|
424
445
|
case "int":
|
|
425
446
|
case "number":
|
|
@@ -507,6 +528,37 @@ sap.ui.define([
|
|
|
507
528
|
oCellSettings = merge(oCellSettings, oCell);
|
|
508
529
|
oCellTemplate = new Link(oCellSettings);
|
|
509
530
|
break;
|
|
531
|
+
case "ComboBox":
|
|
532
|
+
oCellSettings = {
|
|
533
|
+
width: "100%",
|
|
534
|
+
selectedKey: sDefaultValue,
|
|
535
|
+
items: {
|
|
536
|
+
path: "settings>" + oCell.values.data.path,
|
|
537
|
+
template: new ListItem(oCell.values.item)
|
|
538
|
+
}
|
|
539
|
+
};
|
|
540
|
+
if (oCell.values.sorter) {
|
|
541
|
+
oCellSettings.items.sorter = [new Sorter({
|
|
542
|
+
path: oCell.values.sorter
|
|
543
|
+
})];
|
|
544
|
+
}
|
|
545
|
+
if (oCell.change) {
|
|
546
|
+
oCellSettings.change = oCell.change;
|
|
547
|
+
}
|
|
548
|
+
var oComboBoxSettingsModel = new JSONModel(oCell.values.data.json);
|
|
549
|
+
oCellTemplate = new ComboBox(oCellSettings);
|
|
550
|
+
oCellTemplate.setModel(oComboBoxSettingsModel,"settings");
|
|
551
|
+
break;
|
|
552
|
+
case "Input":
|
|
553
|
+
oCellSettings = {
|
|
554
|
+
value: sDefaultValue
|
|
555
|
+
};
|
|
556
|
+
if (oCell.text) {
|
|
557
|
+
oCellSettings.value = oCell.text;
|
|
558
|
+
}
|
|
559
|
+
oCellSettings.tooltip = oCell.tooltip || oCellSettings.text;
|
|
560
|
+
oCellTemplate = new Input(oCellSettings);
|
|
561
|
+
break;
|
|
510
562
|
default:
|
|
511
563
|
oCellTemplate = new Text({
|
|
512
564
|
text: sDefaultValue,
|
|
@@ -556,6 +608,7 @@ sap.ui.define([
|
|
|
556
608
|
icon: "sap-icon://edit",
|
|
557
609
|
tooltip: oResourceBundle.getText("EDITOR_FIELD_OBJECT_TABLE_BUTTON_EDIT_TOOLTIP"),
|
|
558
610
|
enabled: "{= !!${/_hasTableSelected}}",
|
|
611
|
+
visible: that.getAllowPopover(),
|
|
559
612
|
press: that.onEditOrViewDetail.bind(that)
|
|
560
613
|
}),
|
|
561
614
|
new Button(sParameterId + "_control_table_delete_btn", {
|
|
@@ -626,7 +679,7 @@ sap.ui.define([
|
|
|
626
679
|
var that = this;
|
|
627
680
|
var oTable = that.getAggregation("_field");
|
|
628
681
|
|
|
629
|
-
var iSelectIndex = oTable.
|
|
682
|
+
var iSelectIndex = oTable.getSelectedIndices()[0];
|
|
630
683
|
var oRowContexts = oTable.getBinding("rows").getContexts();
|
|
631
684
|
var oItem = oRowContexts[iSelectIndex].getObject();
|
|
632
685
|
var iFirstIndex = oTable.getFirstVisibleRow();
|
|
@@ -773,7 +826,7 @@ sap.ui.define([
|
|
|
773
826
|
var that = this;
|
|
774
827
|
var oTable = that.getAggregation("_field");
|
|
775
828
|
var oModel = oTable.getModel();
|
|
776
|
-
var iSelectedRowIndex = oTable.
|
|
829
|
+
var iSelectedRowIndex = oTable.getSelectedIndices()[0];
|
|
777
830
|
var oSelectedRowContext = oTable.getContextByIndex(iSelectedRowIndex);
|
|
778
831
|
|
|
779
832
|
var iSiblingRowIndex = iSelectedRowIndex + (sDirection === "Up" ? -1 : 1);
|
|
@@ -824,7 +877,11 @@ sap.ui.define([
|
|
|
824
877
|
var that = this;
|
|
825
878
|
var oControl = oEvent.getSource();
|
|
826
879
|
that._newObjectTemplate._dt._uuid = Utils.generateUuidV4();
|
|
827
|
-
that.
|
|
880
|
+
if (that.getAllowPopover()) {
|
|
881
|
+
that.openObjectDetailsPopover(that._newObjectTemplate, oControl, "add");
|
|
882
|
+
} else {
|
|
883
|
+
that.onAddDirectly(that._newObjectTemplate);
|
|
884
|
+
}
|
|
828
885
|
};
|
|
829
886
|
|
|
830
887
|
ObjectField.prototype.mergeValueWithRequestResult = function (tResult) {
|
|
@@ -832,9 +889,9 @@ sap.ui.define([
|
|
|
832
889
|
var oConfig = that.getConfiguration();
|
|
833
890
|
var oTable = that.getAggregation("_field");
|
|
834
891
|
var oModel = oTable.getModel();
|
|
892
|
+
var sPath = oTable.getBinding("rows").getPath();
|
|
835
893
|
if (oConfig.value && (typeof oConfig.value === "object") && !deepEqual(oConfig.value, {})) {
|
|
836
|
-
var oValue = deepClone(oConfig.value, 500)
|
|
837
|
-
sPath = oTable.getBinding("rows").getPath();
|
|
894
|
+
var oValue = deepClone(oConfig.value, 500);
|
|
838
895
|
if (Array.isArray(tResult) && tResult.length > 0) {
|
|
839
896
|
if (oValue._dt && oValue._dt._editable === false) {
|
|
840
897
|
var sUUID = oValue._dt._uuid || Utils.generateUuidV4();
|
|
@@ -874,6 +931,8 @@ sap.ui.define([
|
|
|
874
931
|
tResult.forEach(function(oResult) {
|
|
875
932
|
oResult._dt._uuid = Utils.generateUuidV4();
|
|
876
933
|
});
|
|
934
|
+
} else {
|
|
935
|
+
oModel.setProperty(sPath, {});
|
|
877
936
|
}
|
|
878
937
|
oModel.setProperty("/_hasSelected", false);
|
|
879
938
|
}
|
|
@@ -1386,7 +1445,7 @@ sap.ui.define([
|
|
|
1386
1445
|
that._oNavContainer.back();
|
|
1387
1446
|
that._oObjectDetailsPage.focus();
|
|
1388
1447
|
};
|
|
1389
|
-
var oList = that.buildTranslationsList(
|
|
1448
|
+
var oList = that.buildTranslationsList(sParameterId + "_control_objectdetails_popover_translation_page_value_list");
|
|
1390
1449
|
var oTranslationsFooter = that.buildTranslationsFooter(oList, false);
|
|
1391
1450
|
that._oTranslationListPage = new Page({
|
|
1392
1451
|
title: oResourceBundle.getText("EDITOR_FIELD_OBJECT_TRANSLATION_LIST_TITLE", "{languages>/property}"),
|
|
@@ -1541,69 +1600,6 @@ sap.ui.define([
|
|
|
1541
1600
|
return sKey;
|
|
1542
1601
|
};
|
|
1543
1602
|
|
|
1544
|
-
ObjectField.prototype.buildTranslationsModel = function (oTranslatedValues) {
|
|
1545
|
-
var that = this;
|
|
1546
|
-
var oResourceBundle = that.getResourceBundle();
|
|
1547
|
-
var oTranslatonsModel = new JSONModel(oTranslatedValues);
|
|
1548
|
-
oTranslatonsModel.attachPropertyChange(function(oEvent) {
|
|
1549
|
-
//update the status of each translation for grouping
|
|
1550
|
-
//update the isUpdated property
|
|
1551
|
-
var oData = oTranslatonsModel.getData();
|
|
1552
|
-
var sUpdatedStr = oResourceBundle.getText("EDITOR_FIELD_TRANSLATION_LIST_POPOVER_LISTITEM_GROUP_UPDATED");
|
|
1553
|
-
var sNotUpdatedStr = oResourceBundle.getText("EDITOR_FIELD_TRANSLATION_LIST_POPOVER_LISTITEM_GROUP_NOTUPDATED");
|
|
1554
|
-
var bIsUpdated = false;
|
|
1555
|
-
oData.translatedLanguages.forEach(function(oLanguage) {
|
|
1556
|
-
if (oLanguage.value !== oLanguage.originValue) {
|
|
1557
|
-
oLanguage.status = sUpdatedStr;
|
|
1558
|
-
bIsUpdated = true;
|
|
1559
|
-
} else {
|
|
1560
|
-
oLanguage.status = sNotUpdatedStr;
|
|
1561
|
-
}
|
|
1562
|
-
});
|
|
1563
|
-
oData.isUpdated = bIsUpdated;
|
|
1564
|
-
oTranslatonsModel.setData(oData);
|
|
1565
|
-
oTranslatonsModel.checkUpdate(true);
|
|
1566
|
-
});
|
|
1567
|
-
return oTranslatonsModel;
|
|
1568
|
-
};
|
|
1569
|
-
|
|
1570
|
-
ObjectField.prototype.buildTranslationsList = function (bIsInTranslationPopover) {
|
|
1571
|
-
var that = this;
|
|
1572
|
-
var sParameterId = that.getParameterId();
|
|
1573
|
-
var sIdPrefix = bIsInTranslationPopover ? sParameterId + "_control_translation_popover" : sParameterId + "_control_objectdetails_popover_translation_page";
|
|
1574
|
-
return new List(sIdPrefix + "_value_list", {
|
|
1575
|
-
items: {
|
|
1576
|
-
path: "languages>/translatedLanguages",
|
|
1577
|
-
template: new CustomListItem({
|
|
1578
|
-
content: [
|
|
1579
|
-
new VBox({
|
|
1580
|
-
items: [
|
|
1581
|
-
new Text({
|
|
1582
|
-
text: "{languages>description}"
|
|
1583
|
-
}),
|
|
1584
|
-
new Input({
|
|
1585
|
-
value: "{languages>value}",
|
|
1586
|
-
editable: "{languages>editable}"
|
|
1587
|
-
})
|
|
1588
|
-
]
|
|
1589
|
-
})
|
|
1590
|
-
],
|
|
1591
|
-
customData: [
|
|
1592
|
-
new CustomData({
|
|
1593
|
-
key: "{languages>key}",
|
|
1594
|
-
value: "{languages>description}"
|
|
1595
|
-
})
|
|
1596
|
-
]
|
|
1597
|
-
}),
|
|
1598
|
-
sorter: [new Sorter({
|
|
1599
|
-
path: 'status',
|
|
1600
|
-
descending: true,
|
|
1601
|
-
group: true
|
|
1602
|
-
})]
|
|
1603
|
-
}
|
|
1604
|
-
});
|
|
1605
|
-
};
|
|
1606
|
-
|
|
1607
1603
|
ObjectField.prototype.buildTranslationsFooter = function (oList, bIsInTranslationPopover) {
|
|
1608
1604
|
var that = this;
|
|
1609
1605
|
var sParameterId = that.getParameterId();
|
|
@@ -1650,6 +1646,9 @@ sap.ui.define([
|
|
|
1650
1646
|
if (bUpdateDependentFieldsAndPreview && that._oValueBinding) {
|
|
1651
1647
|
that._oValueBinding.fireEvent("change");
|
|
1652
1648
|
}
|
|
1649
|
+
if (bIsInTranslationPopover) {
|
|
1650
|
+
that._oTranslationPopover.close();
|
|
1651
|
+
}
|
|
1653
1652
|
}
|
|
1654
1653
|
});
|
|
1655
1654
|
var oResetTranslationButton = new Button(sIdPrefix + "_reset_btn", {
|
|
@@ -1710,9 +1709,10 @@ sap.ui.define([
|
|
|
1710
1709
|
var oTranslatonsModel;
|
|
1711
1710
|
var sPlacement = this.getPopoverPlacement(oControl._oValueHelpIcon);
|
|
1712
1711
|
if (!that._oTranslationPopover) {
|
|
1713
|
-
var
|
|
1712
|
+
var sParameterId = that.getParameterId();
|
|
1713
|
+
var oList = that.buildTranslationsList(sParameterId + "_control_translation_popover_value_list");
|
|
1714
1714
|
var oTranslationsFooter = that.buildTranslationsFooter(oList, true);
|
|
1715
|
-
that._oTranslationPopover = new Popover(
|
|
1715
|
+
that._oTranslationPopover = new Popover(sParameterId + "_control_translation_popover", {
|
|
1716
1716
|
placement: sPlacement,
|
|
1717
1717
|
contentWidth: "300px",
|
|
1718
1718
|
contentHeight: "345px",
|
|
@@ -1778,6 +1778,26 @@ sap.ui.define([
|
|
|
1778
1778
|
that._oObjectDetailsPopover.close();
|
|
1779
1779
|
};
|
|
1780
1780
|
|
|
1781
|
+
ObjectField.prototype.onAddDirectly = function(oItem) {
|
|
1782
|
+
var that = this;
|
|
1783
|
+
var oNewObject = deepClone(oItem, 500);
|
|
1784
|
+
var oControl = that.getAggregation("_field");
|
|
1785
|
+
var oModel = oControl.getModel();
|
|
1786
|
+
var sPath = oControl.getBinding("rows").getPath();
|
|
1787
|
+
var oData = oModel.getProperty(sPath);
|
|
1788
|
+
var iPositionCount = 1;
|
|
1789
|
+
oData.unshift(oNewObject);
|
|
1790
|
+
oData.forEach(function (oItem) {
|
|
1791
|
+
oItem._dt = oItem._dt || {};
|
|
1792
|
+
oItem._dt._selected = false;
|
|
1793
|
+
oItem._dt._position = iPositionCount;
|
|
1794
|
+
iPositionCount++;
|
|
1795
|
+
});
|
|
1796
|
+
oModel.checkUpdate();
|
|
1797
|
+
that.refreshValue();
|
|
1798
|
+
that.updateTable();
|
|
1799
|
+
};
|
|
1800
|
+
|
|
1781
1801
|
ObjectField.prototype.onUpdate = function (oEvent) {
|
|
1782
1802
|
var that = this;
|
|
1783
1803
|
var oTable = that.getAggregation("_field");
|
|
@@ -1821,30 +1841,48 @@ sap.ui.define([
|
|
|
1821
1841
|
MessageBox.error(oResourceBundle.getText("EDITOR_FIELD_OBJECT_DELETE_ERROR_MSG"));
|
|
1822
1842
|
return;
|
|
1823
1843
|
}
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1844
|
+
if (that.getAllowPopover()) {
|
|
1845
|
+
MessageBox.confirm(oResourceBundle.getText("EDITOR_FIELD_OBJECT_DELETE_CONFIRM_MSG"), {
|
|
1846
|
+
title: oResourceBundle.getText("EDITOR_FIELD_OBJECT_DELETE_CONFIRM_TITLE"),
|
|
1847
|
+
onClose: function(sAction) {
|
|
1848
|
+
if (sAction === MessageBox.Action.OK) {
|
|
1849
|
+
var sPath = oTable.getBindingContext().getPath();
|
|
1850
|
+
var oModel = oTable.getModel();
|
|
1851
|
+
var oData = oModel.getProperty(sPath);
|
|
1852
|
+
var oNewData = [];
|
|
1853
|
+
for (var i = 0; i < oData.length; i++) {
|
|
1854
|
+
if (aSelectedIndexs.includes(i + "")) {
|
|
1855
|
+
that.deleteTranslationValueInTexts(undefined, oData[i]._dt._uuid);
|
|
1856
|
+
} else {
|
|
1857
|
+
oNewData.push(oData[i]);
|
|
1858
|
+
}
|
|
1837
1859
|
}
|
|
1860
|
+
oModel.setProperty(sPath, oNewData);
|
|
1861
|
+
oModel.checkUpdate(true);
|
|
1862
|
+
that.refreshValue();
|
|
1863
|
+
that.updateTable();
|
|
1864
|
+
} else {
|
|
1865
|
+
MessageToast.show(oResourceBundle.getText("EDITOR_FIELD_OBJECT_DELETE_CONFIRM_CANCLE"));
|
|
1838
1866
|
}
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1867
|
+
}
|
|
1868
|
+
});
|
|
1869
|
+
} else {
|
|
1870
|
+
var sPath = oTable.getBinding("rows").getPath();
|
|
1871
|
+
var oModel = oTable.getModel();
|
|
1872
|
+
var oData = oModel.getProperty(sPath);
|
|
1873
|
+
var oNewData = [];
|
|
1874
|
+
for (var i = 0; i < oData.length; i++) {
|
|
1875
|
+
if (aSelectedIndexs.includes(i + "")) {
|
|
1876
|
+
that.deleteTranslationValueInTexts(undefined, oData[i]._dt._uuid);
|
|
1843
1877
|
} else {
|
|
1844
|
-
|
|
1878
|
+
oNewData.push(oData[i]);
|
|
1845
1879
|
}
|
|
1846
1880
|
}
|
|
1847
|
-
|
|
1881
|
+
oModel.setProperty(sPath, oNewData);
|
|
1882
|
+
oModel.checkUpdate(true);
|
|
1883
|
+
that.refreshValue();
|
|
1884
|
+
that.updateTable();
|
|
1885
|
+
}
|
|
1848
1886
|
};
|
|
1849
1887
|
|
|
1850
1888
|
ObjectField.prototype.refreshValue = function () {
|
|
@@ -1864,6 +1902,34 @@ sap.ui.define([
|
|
|
1864
1902
|
that.setValue(oValue);
|
|
1865
1903
|
};
|
|
1866
1904
|
|
|
1905
|
+
ObjectField.prototype.resetControl = function () {
|
|
1906
|
+
var that = this;
|
|
1907
|
+
var oControl = that.getAggregation("_field");
|
|
1908
|
+
var oValue = that._getCurrentProperty("value");
|
|
1909
|
+
var oModel = oControl.getModel();
|
|
1910
|
+
if (oControl instanceof SimpleForm) {
|
|
1911
|
+
// delete the translation texts when deleting the object
|
|
1912
|
+
var oObject = oModel.getProperty("/value");
|
|
1913
|
+
if (oObject && oObject._dt && oObject._dt._uuid) {
|
|
1914
|
+
that.deleteTranslationValueInTexts(undefined, oObject._dt._uuid);
|
|
1915
|
+
}
|
|
1916
|
+
oValue = oValue || {};
|
|
1917
|
+
oModel.setProperty("/value", oValue);
|
|
1918
|
+
oModel.checkUpdate(true);
|
|
1919
|
+
} else if (oControl instanceof Table) {
|
|
1920
|
+
var oConfig = that.getConfiguration();
|
|
1921
|
+
var oData;
|
|
1922
|
+
if (oConfig.values) {
|
|
1923
|
+
var sPath = oControl.getBinding("rows").getPath();
|
|
1924
|
+
oData = oModel.getProperty(sPath);
|
|
1925
|
+
oData.forEach(function(oItem) {
|
|
1926
|
+
delete oItem._dt._selected;
|
|
1927
|
+
});
|
|
1928
|
+
}
|
|
1929
|
+
that.mergeValueWithRequestResult(oData);
|
|
1930
|
+
}
|
|
1931
|
+
};
|
|
1932
|
+
|
|
1867
1933
|
ObjectField.prototype.clearAllFilters = function(oEvent) {
|
|
1868
1934
|
var that = this;
|
|
1869
1935
|
var oTable = that.getAggregation("_field");
|