@openui5/sap.ui.rta 1.132.1 → 1.134.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.reuse/dep5 +2 -9
- package/LICENSES/LicenseRef-Unicode-3.0.txt +39 -0
- package/THIRDPARTY.txt +45 -78
- package/package.json +6 -6
- package/src/sap/ui/rta/.library +1 -1
- package/src/sap/ui/rta/Client.js +1 -1
- package/src/sap/ui/rta/RuntimeAuthoring.js +5 -7
- package/src/sap/ui/rta/Utils.js +12 -2
- package/src/sap/ui/rta/appVariant/AppVariantManager.js +2 -2
- package/src/sap/ui/rta/appVariant/AppVariantUtils.js +0 -4
- package/src/sap/ui/rta/appVariant/Feature.js +15 -21
- package/src/sap/ui/rta/appVariant/Utils.js +31 -35
- package/src/sap/ui/rta/command/AddIFrame.js +1 -1
- package/src/sap/ui/rta/command/AddProperty.js +1 -1
- package/src/sap/ui/rta/command/AddXML.js +1 -1
- package/src/sap/ui/rta/command/AddXMLAtExtensionPoint.js +1 -1
- package/src/sap/ui/rta/command/AnnotationCommand.js +1 -1
- package/src/sap/ui/rta/command/AppDescriptorCommand.js +1 -1
- package/src/sap/ui/rta/command/BaseCommand.js +1 -1
- package/src/sap/ui/rta/command/BindProperty.js +1 -1
- package/src/sap/ui/rta/command/Combine.js +1 -1
- package/src/sap/ui/rta/command/CommandFactory.js +1 -1
- package/src/sap/ui/rta/command/CompositeCommand.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantConfigure.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantSave.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantSaveAs.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantSetTitle.js +1 -1
- package/src/sap/ui/rta/command/ControlVariantSwitch.js +1 -1
- package/src/sap/ui/rta/command/CreateContainer.js +1 -1
- package/src/sap/ui/rta/command/CustomAdd.js +1 -1
- package/src/sap/ui/rta/command/FlexCommand.js +1 -1
- package/src/sap/ui/rta/command/LREPSerializer.js +1 -1
- package/src/sap/ui/rta/command/LocalReset.js +1 -1
- package/src/sap/ui/rta/command/Move.js +1 -1
- package/src/sap/ui/rta/command/Property.js +1 -1
- package/src/sap/ui/rta/command/Remove.js +1 -1
- package/src/sap/ui/rta/command/Rename.js +1 -1
- package/src/sap/ui/rta/command/Resize.js +1 -1
- package/src/sap/ui/rta/command/Reveal.js +1 -1
- package/src/sap/ui/rta/command/Settings.js +1 -1
- package/src/sap/ui/rta/command/Split.js +1 -1
- package/src/sap/ui/rta/command/Stack.js +1 -1
- package/src/sap/ui/rta/command/appDescriptor/AddLibrary.js +1 -1
- package/src/sap/ui/rta/command/compVariant/CompVariantContent.js +1 -1
- package/src/sap/ui/rta/command/compVariant/CompVariantSaveAs.js +1 -1
- package/src/sap/ui/rta/command/compVariant/CompVariantSwitch.js +1 -1
- package/src/sap/ui/rta/command/compVariant/CompVariantUpdate.js +1 -1
- package/src/sap/ui/rta/enablement/elementActionTest.js +1 -7
- package/src/sap/ui/rta/library.js +2 -2
- package/src/sap/ui/rta/messagebundle.properties +6 -4
- package/src/sap/ui/rta/messagebundle_ar.properties +2 -1
- package/src/sap/ui/rta/messagebundle_bg.properties +3 -2
- package/src/sap/ui/rta/messagebundle_ca.properties +2 -1
- package/src/sap/ui/rta/messagebundle_cnr.properties +3 -2
- package/src/sap/ui/rta/messagebundle_cs.properties +2 -1
- package/src/sap/ui/rta/messagebundle_cy.properties +2 -1
- package/src/sap/ui/rta/messagebundle_da.properties +3 -2
- package/src/sap/ui/rta/messagebundle_de.properties +2 -1
- package/src/sap/ui/rta/messagebundle_el.properties +2 -1
- package/src/sap/ui/rta/messagebundle_en.properties +2 -1
- package/src/sap/ui/rta/messagebundle_en_GB.properties +2 -1
- package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +3 -1
- package/src/sap/ui/rta/messagebundle_es.properties +2 -1
- package/src/sap/ui/rta/messagebundle_es_MX.properties +3 -2
- package/src/sap/ui/rta/messagebundle_et.properties +2 -1
- package/src/sap/ui/rta/messagebundle_fi.properties +2 -1
- package/src/sap/ui/rta/messagebundle_fr.properties +2 -1
- package/src/sap/ui/rta/messagebundle_fr_CA.properties +2 -1
- package/src/sap/ui/rta/messagebundle_hi.properties +2 -1
- package/src/sap/ui/rta/messagebundle_hr.properties +2 -1
- package/src/sap/ui/rta/messagebundle_hu.properties +2 -1
- package/src/sap/ui/rta/messagebundle_id.properties +2 -1
- package/src/sap/ui/rta/messagebundle_it.properties +2 -1
- package/src/sap/ui/rta/messagebundle_iw.properties +2 -1
- package/src/sap/ui/rta/messagebundle_ja.properties +2 -1
- package/src/sap/ui/rta/messagebundle_kk.properties +2 -1
- package/src/sap/ui/rta/messagebundle_ko.properties +2 -1
- package/src/sap/ui/rta/messagebundle_lt.properties +2 -1
- package/src/sap/ui/rta/messagebundle_lv.properties +2 -1
- package/src/sap/ui/rta/messagebundle_mk.properties +3 -2
- package/src/sap/ui/rta/messagebundle_ms.properties +2 -1
- package/src/sap/ui/rta/messagebundle_nl.properties +2 -1
- package/src/sap/ui/rta/messagebundle_no.properties +2 -1
- package/src/sap/ui/rta/messagebundle_pl.properties +2 -1
- package/src/sap/ui/rta/messagebundle_pt.properties +2 -1
- package/src/sap/ui/rta/messagebundle_pt_PT.properties +2 -1
- package/src/sap/ui/rta/messagebundle_ro.properties +2 -1
- package/src/sap/ui/rta/messagebundle_ru.properties +2 -1
- package/src/sap/ui/rta/messagebundle_sh.properties +3 -2
- package/src/sap/ui/rta/messagebundle_sk.properties +2 -1
- package/src/sap/ui/rta/messagebundle_sl.properties +2 -1
- package/src/sap/ui/rta/messagebundle_sr.properties +3 -2
- package/src/sap/ui/rta/messagebundle_sv.properties +2 -1
- package/src/sap/ui/rta/messagebundle_th.properties +2 -1
- package/src/sap/ui/rta/messagebundle_tr.properties +2 -1
- package/src/sap/ui/rta/messagebundle_uk.properties +2 -1
- package/src/sap/ui/rta/messagebundle_vi.properties +2 -1
- package/src/sap/ui/rta/messagebundle_zh_CN.properties +2 -1
- package/src/sap/ui/rta/messagebundle_zh_TW.properties +2 -1
- package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +9 -3
- package/src/sap/ui/rta/plugin/AddXMLPlugin.js +168 -0
- package/src/sap/ui/rta/plugin/BaseCreate.js +1 -1
- package/src/sap/ui/rta/plugin/Combine.js +1 -1
- package/src/sap/ui/rta/plugin/ControlVariant.js +1 -1
- package/src/sap/ui/rta/plugin/CreateContainer.js +1 -1
- package/src/sap/ui/rta/plugin/CutPaste.js +1 -1
- package/src/sap/ui/rta/plugin/DragDrop.js +1 -1
- package/src/sap/ui/rta/plugin/LocalReset.js +1 -1
- package/src/sap/ui/rta/plugin/Plugin.js +5 -4
- package/src/sap/ui/rta/plugin/RTAElementMover.js +1 -1
- package/src/sap/ui/rta/plugin/Remove.js +1 -1
- package/src/sap/ui/rta/plugin/Rename.js +1 -1
- package/src/sap/ui/rta/plugin/RenameHandler.js +2 -2
- package/src/sap/ui/rta/plugin/Resize.js +1 -1
- package/src/sap/ui/rta/plugin/Selection.js +1 -1
- package/src/sap/ui/rta/plugin/Settings.js +1 -1
- package/src/sap/ui/rta/plugin/Split.js +1 -1
- package/src/sap/ui/rta/plugin/Stretch.js +1 -1
- package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +1 -1
- package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +1 -1
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +1 -1
- package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +1 -1
- package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +1 -1
- package/src/sap/ui/rta/plugin/annotations/AnnotationChangeDialog.fragment.xml +30 -47
- package/src/sap/ui/rta/plugin/annotations/AnnotationChangeDialog.js +30 -41
- package/src/sap/ui/rta/plugin/annotations/AnnotationChangeDialogController.js +89 -32
- package/src/sap/ui/rta/plugin/annotations/AnnotationPlugin.js +19 -1
- package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +1 -1
- package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +1 -1
- package/src/sap/ui/rta/service/Action.js +1 -1
- package/src/sap/ui/rta/service/ControllerExtension.js +1 -1
- package/src/sap/ui/rta/service/Outline.js +1 -1
- package/src/sap/ui/rta/service/Property.js +1 -1
- package/src/sap/ui/rta/service/Selection.js +1 -1
- package/src/sap/ui/rta/service/SupportTools.js +1 -1
- package/src/sap/ui/rta/themes/base/Toolbar.adaptation.less +12 -0
- package/src/sap/ui/rta/toolbar/Adaptation.js +1 -1
- package/src/sap/ui/rta/toolbar/Base.js +1 -1
- package/src/sap/ui/rta/toolbar/Fiori.js +1 -1
- package/src/sap/ui/rta/toolbar/FioriLike.js +1 -1
- package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +1 -1
- package/src/sap/ui/rta/toolbar/Standalone.js +6 -4
- package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptation.js +1 -1
- package/src/sap/ui/rta/toolbar/translation/Translation.js +1 -1
- package/src/sap/ui/rta/toolbar/versioning/Versioning.js +7 -4
- package/src/sap/ui/rta/util/Animation.js +1 -1
- package/src/sap/ui/rta/util/BindingsExtractor.js +1 -1
- package/src/sap/ui/rta/util/PluginManager.js +5 -7
- package/src/sap/ui/rta/util/PopupManager.js +1 -1
- package/src/sap/ui/rta/util/ReloadManager.js +1 -1
- package/src/sap/ui/rta/util/ServiceEventBus.js +1 -1
- package/src/sap/ui/rta/util/ServiceManager.js +1 -1
- package/src/sap/ui/rta/util/adaptationStarter.js +3 -3
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +1 -1
- package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +1 -1
- package/src/sap/ui/rta/util/isReuseComponent.js +44 -0
- package/src/sap/ui/rta/util/validateText.js +1 -1
- package/src/sap/ui/rta/util/whatsNew/WhatsNew.js +1 -1
- package/src/sap/ui/rta/util/whatsNew/WhatsNewUtils.js +12 -7
- package/LICENSES/LicenseRef-tzdata-PublicDomain.txt +0 -5
- package/LICENSES/Unicode-DFS-2015.txt +0 -51
|
@@ -7,19 +7,19 @@
|
|
|
7
7
|
sap.ui.define([
|
|
8
8
|
"sap/ui/base/ManagedObject",
|
|
9
9
|
"sap/ui/core/Fragment",
|
|
10
|
-
"sap/ui/fl/apply/api/FlexRuntimeInfoAPI",
|
|
11
10
|
"sap/ui/fl/write/api/PersistenceWriteAPI",
|
|
12
11
|
"sap/ui/model/json/JSONModel",
|
|
13
12
|
"sap/ui/model/resource/ResourceModel",
|
|
14
|
-
"sap/ui/rta/plugin/annotations/AnnotationChangeDialogController"
|
|
13
|
+
"sap/ui/rta/plugin/annotations/AnnotationChangeDialogController",
|
|
14
|
+
"sap/ui/rta/Utils"
|
|
15
15
|
], function(
|
|
16
16
|
ManagedObject,
|
|
17
17
|
Fragment,
|
|
18
|
-
FlexRuntimeInfoAPI,
|
|
19
18
|
PersistenceWriteAPI,
|
|
20
19
|
JSONModel,
|
|
21
20
|
ResourceModel,
|
|
22
|
-
AnnotationChangeDialogController
|
|
21
|
+
AnnotationChangeDialogController,
|
|
22
|
+
RtaUtils
|
|
23
23
|
) {
|
|
24
24
|
"use strict";
|
|
25
25
|
|
|
@@ -27,7 +27,7 @@ sap.ui.define([
|
|
|
27
27
|
* @class Constructor for a new sap.ui.rta.plugin.annotations.AnnotationChangeDialog.
|
|
28
28
|
* @extends sap.ui.base.ManagedObject
|
|
29
29
|
* @author SAP SE
|
|
30
|
-
* @version 1.
|
|
30
|
+
* @version 1.134.0
|
|
31
31
|
* @constructor
|
|
32
32
|
* @since 1.132
|
|
33
33
|
* @private
|
|
@@ -37,19 +37,20 @@ sap.ui.define([
|
|
|
37
37
|
|
|
38
38
|
AnnotationChangeDialog.prototype._createDialog = async function() {
|
|
39
39
|
this._oController = new AnnotationChangeDialogController();
|
|
40
|
-
const
|
|
40
|
+
const oDialog = await Fragment.load({
|
|
41
41
|
name: "sap.ui.rta.plugin.annotations.AnnotationChangeDialog",
|
|
42
42
|
controller: this._oController
|
|
43
43
|
});
|
|
44
|
+
oDialog.addStyleClass(RtaUtils.getRtaStyleClassName());
|
|
44
45
|
this.oChangeAnnotationModel = new JSONModel();
|
|
45
|
-
|
|
46
|
+
oDialog.setModel(this.oChangeAnnotationModel);
|
|
46
47
|
const oI18nModel = new ResourceModel({ bundleName: "sap.ui.rta.messagebundle" });
|
|
47
|
-
|
|
48
|
-
return
|
|
48
|
+
oDialog.setModel(oI18nModel, "i18n");
|
|
49
|
+
return oDialog;
|
|
49
50
|
};
|
|
50
51
|
|
|
51
52
|
AnnotationChangeDialog.prototype._openDialog = function() {
|
|
52
|
-
this.
|
|
53
|
+
this._oDialog.open();
|
|
53
54
|
return this._oController.initialize();
|
|
54
55
|
};
|
|
55
56
|
|
|
@@ -66,8 +67,7 @@ sap.ui.define([
|
|
|
66
67
|
* @property {string} possibleValues.key - Key of the option
|
|
67
68
|
* @property {string} possibleValues.text - Text of the option
|
|
68
69
|
* @property {string} [preSelectedProperty] - Name of the property that should be filtered for initially
|
|
69
|
-
* @
|
|
70
|
-
* @ui5-restricted
|
|
70
|
+
* @public
|
|
71
71
|
*/
|
|
72
72
|
|
|
73
73
|
/**
|
|
@@ -75,8 +75,7 @@ sap.ui.define([
|
|
|
75
75
|
* @property {sap.ui.core.Control} oControl - Control for which the annotation change is made
|
|
76
76
|
* @property {string} sAnnotation - Annotation name
|
|
77
77
|
* @returns {sap.ui.rta.plugin.annotations.AnnotationChangeInfo} - Annotation change info
|
|
78
|
-
* @
|
|
79
|
-
* @ui5-restricted
|
|
78
|
+
* @public
|
|
80
79
|
*/
|
|
81
80
|
|
|
82
81
|
/**
|
|
@@ -88,8 +87,7 @@ sap.ui.define([
|
|
|
88
87
|
* @property {string} content.annotationPath - Path of the property
|
|
89
88
|
* @property {string} content.value - New value
|
|
90
89
|
* @property {string} serviceUrl - Url of the OData service
|
|
91
|
-
* @
|
|
92
|
-
* @ui5-restricted
|
|
90
|
+
* @public
|
|
93
91
|
*/
|
|
94
92
|
|
|
95
93
|
/**
|
|
@@ -116,10 +114,16 @@ sap.ui.define([
|
|
|
116
114
|
} = mPropertyBag;
|
|
117
115
|
const {
|
|
118
116
|
serviceUrl: sServiceUrl,
|
|
119
|
-
properties:
|
|
117
|
+
properties: aDelegateProperties,
|
|
120
118
|
possibleValues: aPossibleValues,
|
|
121
119
|
preSelectedProperty: sPreSelectedPropertyKey
|
|
122
120
|
} = oDelegate.getAnnotationsChangeInfo(oControl, sAnnotation);
|
|
121
|
+
const aProperties = aDelegateProperties.map((oProperty) => ({
|
|
122
|
+
...oProperty,
|
|
123
|
+
originalValue: oProperty.currentValue
|
|
124
|
+
}));
|
|
125
|
+
|
|
126
|
+
aProperties.sort((oProperty1, oProperty2) => oProperty1.propertyName.localeCompare(oProperty2.propertyName));
|
|
123
127
|
|
|
124
128
|
const aExistingChanges = PersistenceWriteAPI._getAnnotationChanges({
|
|
125
129
|
control: oControl
|
|
@@ -129,12 +133,7 @@ sap.ui.define([
|
|
|
129
133
|
return oChange.getContent().annotationPath;
|
|
130
134
|
});
|
|
131
135
|
|
|
132
|
-
this.
|
|
133
|
-
|
|
134
|
-
const oOriginalProperties = {};
|
|
135
|
-
aProperties.forEach(({ annotationPath, currentValue }) => {
|
|
136
|
-
oOriginalProperties[annotationPath] = currentValue;
|
|
137
|
-
});
|
|
136
|
+
this._oDialog ||= await this._createDialog();
|
|
138
137
|
|
|
139
138
|
const sFilterText = sPreSelectedPropertyKey
|
|
140
139
|
? aProperties.find((oProperty) => oProperty.annotationPath === sPreSelectedPropertyKey).propertyName
|
|
@@ -144,35 +143,25 @@ sap.ui.define([
|
|
|
144
143
|
description: sAnnotationDescription,
|
|
145
144
|
properties: aProperties, // all properties
|
|
146
145
|
changedProperties: aProperties.filter(({ annotationPath }) => aChangedAnnotations.includes(annotationPath)),
|
|
147
|
-
propertiesToDisplay: aProperties, // switches
|
|
146
|
+
propertiesToDisplay: aProperties, // switches dynamically between all properties and changed properties
|
|
148
147
|
showChangedPropertiesOnly: false,
|
|
149
148
|
filterText: sFilterText,
|
|
150
149
|
possibleValues: aPossibleValues,
|
|
151
|
-
valueType: sAnnotationValueType
|
|
150
|
+
valueType: sAnnotationValueType,
|
|
151
|
+
serviceUrl: sServiceUrl
|
|
152
152
|
});
|
|
153
153
|
if (sFilterText) {
|
|
154
154
|
this._oController.filterProperties(sFilterText);
|
|
155
155
|
}
|
|
156
|
-
const
|
|
157
|
-
this.
|
|
158
|
-
return
|
|
159
|
-
if (oOriginalProperties[sPath] === vNewValue) {
|
|
160
|
-
return null;
|
|
161
|
-
}
|
|
162
|
-
return {
|
|
163
|
-
serviceUrl: sServiceUrl,
|
|
164
|
-
content: {
|
|
165
|
-
annotationPath: sPath,
|
|
166
|
-
value: vNewValue
|
|
167
|
-
}
|
|
168
|
-
};
|
|
169
|
-
}).filter(Boolean);
|
|
156
|
+
const aChangedProperties = await this._openDialog();
|
|
157
|
+
this._oDialog.close();
|
|
158
|
+
return aChangedProperties;
|
|
170
159
|
};
|
|
171
160
|
|
|
172
161
|
AnnotationChangeDialog.prototype.destroy = function(...aArgs) {
|
|
173
162
|
ManagedObject.prototype.destroy.apply(this, aArgs);
|
|
174
|
-
if (this.
|
|
175
|
-
this.
|
|
163
|
+
if (this._oDialog) {
|
|
164
|
+
this._oDialog.destroy();
|
|
176
165
|
}
|
|
177
166
|
if (this._oController) {
|
|
178
167
|
this._oController.destroy();
|
|
@@ -5,14 +5,24 @@
|
|
|
5
5
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
6
6
|
*/
|
|
7
7
|
sap.ui.define([
|
|
8
|
+
"sap/m/Input",
|
|
9
|
+
"sap/m/Select",
|
|
10
|
+
"sap/m/Switch",
|
|
8
11
|
"sap/ui/core/mvc/Controller",
|
|
9
12
|
"sap/ui/core/Element",
|
|
13
|
+
"sap/ui/core/Item",
|
|
14
|
+
"sap/ui/layout/form/FormElement",
|
|
10
15
|
"sap/ui/model/Filter",
|
|
11
16
|
"sap/ui/model/FilterOperator",
|
|
12
17
|
"sap/ui/rta/plugin/annotations/AnnotationTypes"
|
|
13
18
|
], function(
|
|
19
|
+
Input,
|
|
20
|
+
Select,
|
|
21
|
+
Switch,
|
|
14
22
|
Controller,
|
|
15
23
|
Element,
|
|
24
|
+
Item,
|
|
25
|
+
FormElement,
|
|
16
26
|
Filter,
|
|
17
27
|
FilterOperator,
|
|
18
28
|
AnnotationTypes
|
|
@@ -23,7 +33,7 @@ sap.ui.define([
|
|
|
23
33
|
* @class Controller for the AnnotationChangeDialog.
|
|
24
34
|
* @extends sap.ui.core.mvc.Controller
|
|
25
35
|
* @author SAP SE
|
|
26
|
-
* @version 1.
|
|
36
|
+
* @version 1.134.0
|
|
27
37
|
* @constructor
|
|
28
38
|
* @since 1.132
|
|
29
39
|
* @private
|
|
@@ -32,7 +42,6 @@ sap.ui.define([
|
|
|
32
42
|
const AnnotationChangeDialogController = Controller.extend("sap.ui.rta.plugin.annotations.AnnotationChangeDialogController");
|
|
33
43
|
|
|
34
44
|
AnnotationChangeDialogController.prototype.initialize = function() {
|
|
35
|
-
this._oChangedProperties = {};
|
|
36
45
|
return new Promise((resolve) => {
|
|
37
46
|
this._fnResolveAfterClose = resolve;
|
|
38
47
|
});
|
|
@@ -55,9 +64,9 @@ sap.ui.define([
|
|
|
55
64
|
this.filterProperties(sQuery);
|
|
56
65
|
};
|
|
57
66
|
|
|
58
|
-
AnnotationChangeDialogController.prototype.switchDisplayMode = function() {
|
|
67
|
+
AnnotationChangeDialogController.prototype.switchDisplayMode = function(oEvent) {
|
|
68
|
+
const bShowChangedPropertiesOnly = oEvent.getParameter("state");
|
|
59
69
|
const oList = Element.getElementById("sapUiRtaChangeAnnotationDialog_propertyList");
|
|
60
|
-
const bShowChangedPropertiesOnly = !oList.getModel().getProperty("/showChangedPropertiesOnly");
|
|
61
70
|
oList.getModel().setProperty("/showChangedPropertiesOnly", bShowChangedPropertiesOnly);
|
|
62
71
|
oList.getModel().setProperty(
|
|
63
72
|
"/propertiesToDisplay",
|
|
@@ -67,42 +76,90 @@ sap.ui.define([
|
|
|
67
76
|
);
|
|
68
77
|
};
|
|
69
78
|
|
|
70
|
-
AnnotationChangeDialogController.prototype.
|
|
71
|
-
const
|
|
72
|
-
const
|
|
73
|
-
|
|
79
|
+
AnnotationChangeDialogController.prototype.onSavePress = function(oEvent) {
|
|
80
|
+
const oModelData = oEvent.getSource().getModel().getData();
|
|
81
|
+
const aChanges = oModelData.properties
|
|
82
|
+
.map((oProperty) => {
|
|
83
|
+
if (oProperty.originalValue === oProperty.currentValue) {
|
|
84
|
+
return null;
|
|
85
|
+
}
|
|
86
|
+
const oChangeSpecificData = {
|
|
87
|
+
serviceUrl: oModelData.serviceUrl,
|
|
88
|
+
content: {
|
|
89
|
+
annotationPath: oProperty.annotationPath
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
oChangeSpecificData.content[oModelData.valueType === AnnotationTypes.StringType ? "text" : "value"] = oProperty.currentValue;
|
|
93
|
+
return oChangeSpecificData;
|
|
94
|
+
})
|
|
95
|
+
.filter(Boolean);
|
|
96
|
+
this._fnResolveAfterClose(aChanges);
|
|
74
97
|
};
|
|
75
98
|
|
|
76
|
-
AnnotationChangeDialogController.prototype.
|
|
77
|
-
|
|
78
|
-
const bSelected = oEvent.getParameters().selected;
|
|
79
|
-
this._oChangedProperties[sPath] = bSelected;
|
|
99
|
+
AnnotationChangeDialogController.prototype.onCancelPress = function() {
|
|
100
|
+
this._fnResolveAfterClose([]);
|
|
80
101
|
};
|
|
81
102
|
|
|
82
|
-
|
|
83
|
-
const
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
103
|
+
function createEditorField(sValueType) {
|
|
104
|
+
const onChange = () => {
|
|
105
|
+
// Property updates are handled via two-way binding
|
|
106
|
+
// However, the binding of the save button doesn't detect changes
|
|
107
|
+
// within nested object properties, so it has to be refreshed explicitly
|
|
108
|
+
const oSaveButton = Element.getElementById("sapUiRtaChangeAnnotationDialog_saveButton");
|
|
109
|
+
oSaveButton.getBinding("enabled").refresh(true);
|
|
110
|
+
};
|
|
87
111
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
112
|
+
if (sValueType === AnnotationTypes.ValueListType) {
|
|
113
|
+
const oSelect = new Select({
|
|
114
|
+
selectedKey: "{currentValue}",
|
|
115
|
+
change: onChange
|
|
116
|
+
});
|
|
91
117
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
118
|
+
const oItemTemplate = new Item({
|
|
119
|
+
key: "{key}",
|
|
120
|
+
text: "{text}"
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
oSelect.bindItems({
|
|
124
|
+
path: "/possibleValues",
|
|
125
|
+
template: oItemTemplate,
|
|
126
|
+
templateShareable: false
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
return oSelect;
|
|
130
|
+
}
|
|
95
131
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
return sType === AnnotationTypes.BooleanType;
|
|
102
|
-
},
|
|
103
|
-
isString(sType) {
|
|
104
|
-
return sType === AnnotationTypes.StringType;
|
|
132
|
+
if (sValueType === AnnotationTypes.StringType) {
|
|
133
|
+
return new Input({
|
|
134
|
+
value: "{currentValue}",
|
|
135
|
+
change: onChange
|
|
136
|
+
});
|
|
105
137
|
}
|
|
138
|
+
|
|
139
|
+
if (sValueType === AnnotationTypes.BooleanType) {
|
|
140
|
+
return new Switch({
|
|
141
|
+
state: "{currentValue}",
|
|
142
|
+
change: onChange
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
throw new Error(`Unsupported value type: ${sValueType}`);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
AnnotationChangeDialogController.prototype.editorFactory = function(sId, oContext) {
|
|
150
|
+
const sValueType = oContext.getProperty("/valueType");
|
|
151
|
+
|
|
152
|
+
return new FormElement({
|
|
153
|
+
id: sId,
|
|
154
|
+
label: "{propertyName}",
|
|
155
|
+
fields: [
|
|
156
|
+
createEditorField.call(this, sValueType)
|
|
157
|
+
]
|
|
158
|
+
});
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
AnnotationChangeDialogController.prototype.hasChangesFormatter = function(aProperties) {
|
|
162
|
+
return aProperties?.some((oProperty) => oProperty.originalValue !== oProperty.currentValue);
|
|
106
163
|
};
|
|
107
164
|
|
|
108
165
|
return AnnotationChangeDialogController;
|
|
@@ -6,11 +6,13 @@
|
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
8
|
"sap/base/Log",
|
|
9
|
+
"sap/ui/base/DesignTime",
|
|
9
10
|
"sap/ui/dt/Util",
|
|
10
11
|
"sap/ui/rta/plugin/annotations/AnnotationChangeDialog",
|
|
11
12
|
"sap/ui/rta/plugin/Plugin"
|
|
12
13
|
], function(
|
|
13
14
|
BaseLog,
|
|
15
|
+
DesignTime,
|
|
14
16
|
DtUtil,
|
|
15
17
|
AnnotationChangeDialog,
|
|
16
18
|
Plugin
|
|
@@ -80,7 +82,7 @@ sap.ui.define([
|
|
|
80
82
|
* @class
|
|
81
83
|
* @extends sap.ui.rta.plugin.Plugin
|
|
82
84
|
* @author SAP SE
|
|
83
|
-
* @version 1.
|
|
85
|
+
* @version 1.134.0
|
|
84
86
|
* @constructor
|
|
85
87
|
* @private
|
|
86
88
|
* @since 1.132
|
|
@@ -108,6 +110,12 @@ sap.ui.define([
|
|
|
108
110
|
* @private
|
|
109
111
|
*/
|
|
110
112
|
AnnotationPlugin.prototype._isEditable = function(oElementOverlay) {
|
|
113
|
+
// Currently annotation changes are not supported for developers,
|
|
114
|
+
// because the changes are not guaranteed to be loaded in time to be properly applied
|
|
115
|
+
if (DesignTime.isDesignModeEnabled()) {
|
|
116
|
+
return false;
|
|
117
|
+
}
|
|
118
|
+
|
|
111
119
|
const oActions = this.getAction(oElementOverlay);
|
|
112
120
|
|
|
113
121
|
if (oActions) {
|
|
@@ -127,6 +135,10 @@ sap.ui.define([
|
|
|
127
135
|
* @public
|
|
128
136
|
*/
|
|
129
137
|
AnnotationPlugin.prototype.isEnabled = function(aElementOverlays) {
|
|
138
|
+
if (aElementOverlays.length !== 1) {
|
|
139
|
+
return false;
|
|
140
|
+
}
|
|
141
|
+
|
|
130
142
|
const oElementOverlay = aElementOverlays[0];
|
|
131
143
|
const oResponsibleElementOverlay = this.getResponsibleElementOverlay(oElementOverlay);
|
|
132
144
|
const oActions = this.getAction(oResponsibleElementOverlay);
|
|
@@ -235,5 +247,11 @@ sap.ui.define([
|
|
|
235
247
|
return "annotation";
|
|
236
248
|
};
|
|
237
249
|
|
|
250
|
+
AnnotationPlugin.prototype.destroy = function(...args) {
|
|
251
|
+
Plugin.prototype.destroy.apply(this, args);
|
|
252
|
+
this._oDialog.destroy();
|
|
253
|
+
delete this._oDialog;
|
|
254
|
+
};
|
|
255
|
+
|
|
238
256
|
return AnnotationPlugin;
|
|
239
257
|
});
|
|
@@ -119,7 +119,7 @@ sap.ui.define([
|
|
|
119
119
|
* @class The AddIFrame allows trigger AddIFrame operations on the overlay.
|
|
120
120
|
* @extends sap.ui.rta.plugin.BaseCreate
|
|
121
121
|
* @author SAP SE
|
|
122
|
-
* @version 1.
|
|
122
|
+
* @version 1.134.0
|
|
123
123
|
* @constructor
|
|
124
124
|
* @private
|
|
125
125
|
* @since 1.75
|
|
@@ -104,6 +104,18 @@
|
|
|
104
104
|
color: @_sap_ui_rta_Toolbar_Adaptation_ActiveVersionColor;
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
+
.sapUiRtaVersionButton.sapUiRtaVersionColor > span > span > bdi,
|
|
108
|
+
.sapUiRtaVersionButton.sapUiRtaVersionColor > span > span.sapMBtnIcon {
|
|
109
|
+
color: @_sap_ui_rta_Toolbar_Adaptation_TextColor;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.sapUiRtaVersionButton.sapUiRtaVersionColor:hover {
|
|
113
|
+
> span.sapMBtnHoverable.sapMBtnTransparent > span.sapMBtnIcon,
|
|
114
|
+
> span > span > bdi {
|
|
115
|
+
color: @_sap_ui_rta_Toolbar_Adaptation_TextColor;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
107
119
|
.sapUiRtaToolbarActionsSection > div:first-child {
|
|
108
120
|
width: 100%;
|
|
109
121
|
}
|
|
@@ -5,10 +5,12 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
|
-
"./Adaptation"
|
|
8
|
+
"./Adaptation",
|
|
9
|
+
"./AdaptationRenderer"
|
|
9
10
|
],
|
|
10
11
|
function(
|
|
11
|
-
Adaptation
|
|
12
|
+
Adaptation,
|
|
13
|
+
AdaptationRenderer
|
|
12
14
|
) {
|
|
13
15
|
"use strict";
|
|
14
16
|
|
|
@@ -20,7 +22,7 @@ function(
|
|
|
20
22
|
* @extends sap.ui.rta.toolbar.Adaptation
|
|
21
23
|
*
|
|
22
24
|
* @author SAP SE
|
|
23
|
-
* @version 1.
|
|
25
|
+
* @version 1.134.0
|
|
24
26
|
*
|
|
25
27
|
* @constructor
|
|
26
28
|
* @private
|
|
@@ -31,7 +33,7 @@ function(
|
|
|
31
33
|
metadata: {
|
|
32
34
|
library: "sap.ui.rta"
|
|
33
35
|
},
|
|
34
|
-
renderer:
|
|
36
|
+
renderer: AdaptationRenderer,
|
|
35
37
|
type: "standalone"
|
|
36
38
|
});
|
|
37
39
|
|
|
@@ -10,7 +10,7 @@ sap.ui.define([
|
|
|
10
10
|
"sap/ui/base/ManagedObject",
|
|
11
11
|
"sap/ui/core/format/DateFormat",
|
|
12
12
|
"sap/ui/core/Fragment",
|
|
13
|
-
"sap/ui/core/
|
|
13
|
+
"sap/ui/core/message/MessageType",
|
|
14
14
|
"sap/ui/fl/initial/api/Version",
|
|
15
15
|
"sap/ui/model/Sorter",
|
|
16
16
|
"sap/ui/rta/Utils"
|
|
@@ -20,16 +20,16 @@ sap.ui.define([
|
|
|
20
20
|
ManagedObject,
|
|
21
21
|
DateFormat,
|
|
22
22
|
Fragment,
|
|
23
|
-
|
|
23
|
+
MessageType,
|
|
24
24
|
Version,
|
|
25
25
|
Sorter,
|
|
26
26
|
Utils
|
|
27
27
|
) {
|
|
28
28
|
"use strict";
|
|
29
29
|
|
|
30
|
-
var {MessageType} = coreLibrary;
|
|
31
30
|
var DRAFT_ACCENT_COLOR = "sapUiRtaDraftVersionAccent";
|
|
32
31
|
var ACTIVE_ACCENT_COLOR = "sapUiRtaActiveVersionAccent";
|
|
32
|
+
var VERSION_COLOR = "sapUiRtaVersionColor";
|
|
33
33
|
|
|
34
34
|
/**
|
|
35
35
|
* Controller for the <code>sap.ui.rta.toolbar.versioning.Versioning</code> controls.
|
|
@@ -38,7 +38,7 @@ sap.ui.define([
|
|
|
38
38
|
* @class
|
|
39
39
|
*
|
|
40
40
|
* @author SAP SE
|
|
41
|
-
* @version 1.
|
|
41
|
+
* @version 1.134.0
|
|
42
42
|
*
|
|
43
43
|
* @constructor
|
|
44
44
|
* @private
|
|
@@ -149,12 +149,15 @@ sap.ui.define([
|
|
|
149
149
|
case Version.Type.Draft:
|
|
150
150
|
oVersionButton.addStyleClass(DRAFT_ACCENT_COLOR);
|
|
151
151
|
oVersionButton.removeStyleClass(ACTIVE_ACCENT_COLOR);
|
|
152
|
+
oVersionButton.removeStyleClass(VERSION_COLOR);
|
|
152
153
|
break;
|
|
153
154
|
case Version.Type.Active:
|
|
154
155
|
oVersionButton.addStyleClass(ACTIVE_ACCENT_COLOR);
|
|
155
156
|
oVersionButton.removeStyleClass(DRAFT_ACCENT_COLOR);
|
|
157
|
+
oVersionButton.removeStyleClass(VERSION_COLOR);
|
|
156
158
|
break;
|
|
157
159
|
default:
|
|
160
|
+
oVersionButton.addStyleClass(VERSION_COLOR);
|
|
158
161
|
oVersionButton.removeStyleClass(ACTIVE_ACCENT_COLOR);
|
|
159
162
|
oVersionButton.removeStyleClass(DRAFT_ACCENT_COLOR);
|
|
160
163
|
}
|