@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.
Files changed (162) hide show
  1. package/.reuse/dep5 +2 -9
  2. package/LICENSES/LicenseRef-Unicode-3.0.txt +39 -0
  3. package/THIRDPARTY.txt +45 -78
  4. package/package.json +6 -6
  5. package/src/sap/ui/rta/.library +1 -1
  6. package/src/sap/ui/rta/Client.js +1 -1
  7. package/src/sap/ui/rta/RuntimeAuthoring.js +5 -7
  8. package/src/sap/ui/rta/Utils.js +12 -2
  9. package/src/sap/ui/rta/appVariant/AppVariantManager.js +2 -2
  10. package/src/sap/ui/rta/appVariant/AppVariantUtils.js +0 -4
  11. package/src/sap/ui/rta/appVariant/Feature.js +15 -21
  12. package/src/sap/ui/rta/appVariant/Utils.js +31 -35
  13. package/src/sap/ui/rta/command/AddIFrame.js +1 -1
  14. package/src/sap/ui/rta/command/AddProperty.js +1 -1
  15. package/src/sap/ui/rta/command/AddXML.js +1 -1
  16. package/src/sap/ui/rta/command/AddXMLAtExtensionPoint.js +1 -1
  17. package/src/sap/ui/rta/command/AnnotationCommand.js +1 -1
  18. package/src/sap/ui/rta/command/AppDescriptorCommand.js +1 -1
  19. package/src/sap/ui/rta/command/BaseCommand.js +1 -1
  20. package/src/sap/ui/rta/command/BindProperty.js +1 -1
  21. package/src/sap/ui/rta/command/Combine.js +1 -1
  22. package/src/sap/ui/rta/command/CommandFactory.js +1 -1
  23. package/src/sap/ui/rta/command/CompositeCommand.js +1 -1
  24. package/src/sap/ui/rta/command/ControlVariantConfigure.js +1 -1
  25. package/src/sap/ui/rta/command/ControlVariantSave.js +1 -1
  26. package/src/sap/ui/rta/command/ControlVariantSaveAs.js +1 -1
  27. package/src/sap/ui/rta/command/ControlVariantSetTitle.js +1 -1
  28. package/src/sap/ui/rta/command/ControlVariantSwitch.js +1 -1
  29. package/src/sap/ui/rta/command/CreateContainer.js +1 -1
  30. package/src/sap/ui/rta/command/CustomAdd.js +1 -1
  31. package/src/sap/ui/rta/command/FlexCommand.js +1 -1
  32. package/src/sap/ui/rta/command/LREPSerializer.js +1 -1
  33. package/src/sap/ui/rta/command/LocalReset.js +1 -1
  34. package/src/sap/ui/rta/command/Move.js +1 -1
  35. package/src/sap/ui/rta/command/Property.js +1 -1
  36. package/src/sap/ui/rta/command/Remove.js +1 -1
  37. package/src/sap/ui/rta/command/Rename.js +1 -1
  38. package/src/sap/ui/rta/command/Resize.js +1 -1
  39. package/src/sap/ui/rta/command/Reveal.js +1 -1
  40. package/src/sap/ui/rta/command/Settings.js +1 -1
  41. package/src/sap/ui/rta/command/Split.js +1 -1
  42. package/src/sap/ui/rta/command/Stack.js +1 -1
  43. package/src/sap/ui/rta/command/appDescriptor/AddLibrary.js +1 -1
  44. package/src/sap/ui/rta/command/compVariant/CompVariantContent.js +1 -1
  45. package/src/sap/ui/rta/command/compVariant/CompVariantSaveAs.js +1 -1
  46. package/src/sap/ui/rta/command/compVariant/CompVariantSwitch.js +1 -1
  47. package/src/sap/ui/rta/command/compVariant/CompVariantUpdate.js +1 -1
  48. package/src/sap/ui/rta/enablement/elementActionTest.js +1 -7
  49. package/src/sap/ui/rta/library.js +2 -2
  50. package/src/sap/ui/rta/messagebundle.properties +6 -4
  51. package/src/sap/ui/rta/messagebundle_ar.properties +2 -1
  52. package/src/sap/ui/rta/messagebundle_bg.properties +3 -2
  53. package/src/sap/ui/rta/messagebundle_ca.properties +2 -1
  54. package/src/sap/ui/rta/messagebundle_cnr.properties +3 -2
  55. package/src/sap/ui/rta/messagebundle_cs.properties +2 -1
  56. package/src/sap/ui/rta/messagebundle_cy.properties +2 -1
  57. package/src/sap/ui/rta/messagebundle_da.properties +3 -2
  58. package/src/sap/ui/rta/messagebundle_de.properties +2 -1
  59. package/src/sap/ui/rta/messagebundle_el.properties +2 -1
  60. package/src/sap/ui/rta/messagebundle_en.properties +2 -1
  61. package/src/sap/ui/rta/messagebundle_en_GB.properties +2 -1
  62. package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +3 -1
  63. package/src/sap/ui/rta/messagebundle_es.properties +2 -1
  64. package/src/sap/ui/rta/messagebundle_es_MX.properties +3 -2
  65. package/src/sap/ui/rta/messagebundle_et.properties +2 -1
  66. package/src/sap/ui/rta/messagebundle_fi.properties +2 -1
  67. package/src/sap/ui/rta/messagebundle_fr.properties +2 -1
  68. package/src/sap/ui/rta/messagebundle_fr_CA.properties +2 -1
  69. package/src/sap/ui/rta/messagebundle_hi.properties +2 -1
  70. package/src/sap/ui/rta/messagebundle_hr.properties +2 -1
  71. package/src/sap/ui/rta/messagebundle_hu.properties +2 -1
  72. package/src/sap/ui/rta/messagebundle_id.properties +2 -1
  73. package/src/sap/ui/rta/messagebundle_it.properties +2 -1
  74. package/src/sap/ui/rta/messagebundle_iw.properties +2 -1
  75. package/src/sap/ui/rta/messagebundle_ja.properties +2 -1
  76. package/src/sap/ui/rta/messagebundle_kk.properties +2 -1
  77. package/src/sap/ui/rta/messagebundle_ko.properties +2 -1
  78. package/src/sap/ui/rta/messagebundle_lt.properties +2 -1
  79. package/src/sap/ui/rta/messagebundle_lv.properties +2 -1
  80. package/src/sap/ui/rta/messagebundle_mk.properties +3 -2
  81. package/src/sap/ui/rta/messagebundle_ms.properties +2 -1
  82. package/src/sap/ui/rta/messagebundle_nl.properties +2 -1
  83. package/src/sap/ui/rta/messagebundle_no.properties +2 -1
  84. package/src/sap/ui/rta/messagebundle_pl.properties +2 -1
  85. package/src/sap/ui/rta/messagebundle_pt.properties +2 -1
  86. package/src/sap/ui/rta/messagebundle_pt_PT.properties +2 -1
  87. package/src/sap/ui/rta/messagebundle_ro.properties +2 -1
  88. package/src/sap/ui/rta/messagebundle_ru.properties +2 -1
  89. package/src/sap/ui/rta/messagebundle_sh.properties +3 -2
  90. package/src/sap/ui/rta/messagebundle_sk.properties +2 -1
  91. package/src/sap/ui/rta/messagebundle_sl.properties +2 -1
  92. package/src/sap/ui/rta/messagebundle_sr.properties +3 -2
  93. package/src/sap/ui/rta/messagebundle_sv.properties +2 -1
  94. package/src/sap/ui/rta/messagebundle_th.properties +2 -1
  95. package/src/sap/ui/rta/messagebundle_tr.properties +2 -1
  96. package/src/sap/ui/rta/messagebundle_uk.properties +2 -1
  97. package/src/sap/ui/rta/messagebundle_vi.properties +2 -1
  98. package/src/sap/ui/rta/messagebundle_zh_CN.properties +2 -1
  99. package/src/sap/ui/rta/messagebundle_zh_TW.properties +2 -1
  100. package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +9 -3
  101. package/src/sap/ui/rta/plugin/AddXMLPlugin.js +168 -0
  102. package/src/sap/ui/rta/plugin/BaseCreate.js +1 -1
  103. package/src/sap/ui/rta/plugin/Combine.js +1 -1
  104. package/src/sap/ui/rta/plugin/ControlVariant.js +1 -1
  105. package/src/sap/ui/rta/plugin/CreateContainer.js +1 -1
  106. package/src/sap/ui/rta/plugin/CutPaste.js +1 -1
  107. package/src/sap/ui/rta/plugin/DragDrop.js +1 -1
  108. package/src/sap/ui/rta/plugin/LocalReset.js +1 -1
  109. package/src/sap/ui/rta/plugin/Plugin.js +5 -4
  110. package/src/sap/ui/rta/plugin/RTAElementMover.js +1 -1
  111. package/src/sap/ui/rta/plugin/Remove.js +1 -1
  112. package/src/sap/ui/rta/plugin/Rename.js +1 -1
  113. package/src/sap/ui/rta/plugin/RenameHandler.js +2 -2
  114. package/src/sap/ui/rta/plugin/Resize.js +1 -1
  115. package/src/sap/ui/rta/plugin/Selection.js +1 -1
  116. package/src/sap/ui/rta/plugin/Settings.js +1 -1
  117. package/src/sap/ui/rta/plugin/Split.js +1 -1
  118. package/src/sap/ui/rta/plugin/Stretch.js +1 -1
  119. package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +1 -1
  120. package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +1 -1
  121. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +1 -1
  122. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +1 -1
  123. package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +1 -1
  124. package/src/sap/ui/rta/plugin/annotations/AnnotationChangeDialog.fragment.xml +30 -47
  125. package/src/sap/ui/rta/plugin/annotations/AnnotationChangeDialog.js +30 -41
  126. package/src/sap/ui/rta/plugin/annotations/AnnotationChangeDialogController.js +89 -32
  127. package/src/sap/ui/rta/plugin/annotations/AnnotationPlugin.js +19 -1
  128. package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +1 -1
  129. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +1 -1
  130. package/src/sap/ui/rta/service/Action.js +1 -1
  131. package/src/sap/ui/rta/service/ControllerExtension.js +1 -1
  132. package/src/sap/ui/rta/service/Outline.js +1 -1
  133. package/src/sap/ui/rta/service/Property.js +1 -1
  134. package/src/sap/ui/rta/service/Selection.js +1 -1
  135. package/src/sap/ui/rta/service/SupportTools.js +1 -1
  136. package/src/sap/ui/rta/themes/base/Toolbar.adaptation.less +12 -0
  137. package/src/sap/ui/rta/toolbar/Adaptation.js +1 -1
  138. package/src/sap/ui/rta/toolbar/Base.js +1 -1
  139. package/src/sap/ui/rta/toolbar/Fiori.js +1 -1
  140. package/src/sap/ui/rta/toolbar/FioriLike.js +1 -1
  141. package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +1 -1
  142. package/src/sap/ui/rta/toolbar/Standalone.js +6 -4
  143. package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptation.js +1 -1
  144. package/src/sap/ui/rta/toolbar/translation/Translation.js +1 -1
  145. package/src/sap/ui/rta/toolbar/versioning/Versioning.js +7 -4
  146. package/src/sap/ui/rta/util/Animation.js +1 -1
  147. package/src/sap/ui/rta/util/BindingsExtractor.js +1 -1
  148. package/src/sap/ui/rta/util/PluginManager.js +5 -7
  149. package/src/sap/ui/rta/util/PopupManager.js +1 -1
  150. package/src/sap/ui/rta/util/ReloadManager.js +1 -1
  151. package/src/sap/ui/rta/util/ServiceEventBus.js +1 -1
  152. package/src/sap/ui/rta/util/ServiceManager.js +1 -1
  153. package/src/sap/ui/rta/util/adaptationStarter.js +3 -3
  154. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +1 -1
  155. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +1 -1
  156. package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +1 -1
  157. package/src/sap/ui/rta/util/isReuseComponent.js +44 -0
  158. package/src/sap/ui/rta/util/validateText.js +1 -1
  159. package/src/sap/ui/rta/util/whatsNew/WhatsNew.js +1 -1
  160. package/src/sap/ui/rta/util/whatsNew/WhatsNewUtils.js +12 -7
  161. package/LICENSES/LicenseRef-tzdata-PublicDomain.txt +0 -5
  162. 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.132.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 oPopover = await Fragment.load({
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
- oPopover.setModel(this.oChangeAnnotationModel);
46
+ oDialog.setModel(this.oChangeAnnotationModel);
46
47
  const oI18nModel = new ResourceModel({ bundleName: "sap.ui.rta.messagebundle" });
47
- oPopover.setModel(oI18nModel, "i18n");
48
- return oPopover;
48
+ oDialog.setModel(oI18nModel, "i18n");
49
+ return oDialog;
49
50
  };
50
51
 
51
52
  AnnotationChangeDialog.prototype._openDialog = function() {
52
- this._oPopover.open();
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
- * @private
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
- * @private
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
- * @private
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: aProperties,
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._oPopover ||= await this._createDialog();
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 dynamcially between all properties and changed properties
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 oChangedProperties = await this._openDialog();
157
- this._oPopover.close();
158
- return Object.entries(oChangedProperties).map(([sPath, vNewValue]) => {
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._oPopover) {
175
- this._oPopover.destroy();
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.132.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.onValueListChange = function(oEvent) {
71
- const sPath = oEvent.getSource().getBindingContext().getObject().annotationPath;
72
- const sSelectedKey = oEvent.getParameters().selectedItem.getKey();
73
- this._oChangedProperties[sPath] = sSelectedKey;
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.onBooleanChange = function(oEvent) {
77
- const sPath = oEvent.getSource().getBindingContext().getObject().annotationPath;
78
- const bSelected = oEvent.getParameters().selected;
79
- this._oChangedProperties[sPath] = bSelected;
99
+ AnnotationChangeDialogController.prototype.onCancelPress = function() {
100
+ this._fnResolveAfterClose([]);
80
101
  };
81
102
 
82
- AnnotationChangeDialogController.prototype.onStringChange = function(oEvent) {
83
- const sPath = oEvent.getSource().getBindingContext().getObject().annotationPath;
84
- const sValue = oEvent.getParameters().value;
85
- this._oChangedProperties[sPath] = sValue;
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
- AnnotationChangeDialogController.prototype.onSavePress = function() {
89
- this._fnResolveAfterClose(this._oChangedProperties);
90
- };
112
+ if (sValueType === AnnotationTypes.ValueListType) {
113
+ const oSelect = new Select({
114
+ selectedKey: "{currentValue}",
115
+ change: onChange
116
+ });
91
117
 
92
- AnnotationChangeDialogController.prototype.onCancelPress = function() {
93
- this._fnResolveAfterClose({});
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
- AnnotationChangeDialogController.prototype.formatters = {
97
- isValueList(sType) {
98
- return sType === AnnotationTypes.ValueListType;
99
- },
100
- isBoolean(sType) {
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.132.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.132.1
122
+ * @version 1.134.0
123
123
  * @constructor
124
124
  * @private
125
125
  * @since 1.75
@@ -159,7 +159,7 @@ sap.ui.define([
159
159
  * @class Context - Dialog for IFrame settings in Runtime Authoring
160
160
  * @extends sap.ui.base.ManagedObject
161
161
  * @author SAP SE
162
- * @version 1.132.1
162
+ * @version 1.134.0
163
163
  * @constructor
164
164
  * @private
165
165
  * @since 1.78
@@ -24,7 +24,7 @@ sap.ui.define([
24
24
  * @name sap.ui.rta.service.Action
25
25
  * @author SAP SE
26
26
  * @since 1.58
27
- * @version 1.132.1
27
+ * @version 1.134.0
28
28
  * @private
29
29
  * @ui5-restricted
30
30
  *
@@ -30,7 +30,7 @@ sap.ui.define([
30
30
  * @name sap.ui.rta.service.ControllerExtension
31
31
  * @author SAP SE
32
32
  * @since 1.58
33
- * @version 1.132.1
33
+ * @version 1.134.0
34
34
  * @private
35
35
  * @ui5-restricted
36
36
  */
@@ -43,7 +43,7 @@ sap.ui.define([
43
43
  * @name sap.ui.rta.service.Outline
44
44
  * @author SAP SE
45
45
  * @since 1.56
46
- * @version 1.132.1
46
+ * @version 1.134.0
47
47
  * @private
48
48
  * @ui5-restricted
49
49
  */
@@ -27,7 +27,7 @@ sap.ui.define([
27
27
  * @name sap.ui.rta.service.Property
28
28
  * @author SAP SE
29
29
  * @since 1.58
30
- * @version 1.132.1
30
+ * @version 1.134.0
31
31
  * @private
32
32
  * @ui5-restricted
33
33
  */
@@ -14,7 +14,7 @@ sap.ui.define(function() {
14
14
  * @name sap.ui.rta.service.Selection
15
15
  * @author SAP SE
16
16
  * @since 1.58
17
- * @version 1.132.1
17
+ * @version 1.134.0
18
18
  * @private
19
19
  * @ui5-restricted
20
20
  */
@@ -30,7 +30,7 @@ sap.ui.define([
30
30
  * @name sap.ui.rta.service.SupportTools
31
31
  * @author SAP SE
32
32
  * @since 1.106
33
- * @version 1.132.1
33
+ * @version 1.134.0
34
34
  * @private
35
35
  * @ui5-restricted
36
36
  */
@@ -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
  }
@@ -57,7 +57,7 @@ sap.ui.define([
57
57
  * @extends sap.ui.rta.toolbar.Base
58
58
  *
59
59
  * @author SAP SE
60
- * @version 1.132.1
60
+ * @version 1.134.0
61
61
  *
62
62
  * @constructor
63
63
  * @private
@@ -33,7 +33,7 @@ sap.ui.define([
33
33
  * @extends sap.m.HBox
34
34
  *
35
35
  * @author SAP SE
36
- * @version 1.132.1
36
+ * @version 1.134.0
37
37
  *
38
38
  * @constructor
39
39
  * @private
@@ -32,7 +32,7 @@ function(
32
32
  * @extends sap.ui.rta.toolbar.Adaptation
33
33
  *
34
34
  * @author SAP SE
35
- * @version 1.132.1
35
+ * @version 1.134.0
36
36
  *
37
37
  * @constructor
38
38
  * @private
@@ -20,7 +20,7 @@ function(
20
20
  * @extends sap.ui.rta.toolbar.Adaptation
21
21
  *
22
22
  * @author SAP SE
23
- * @version 1.132.1
23
+ * @version 1.134.0
24
24
  *
25
25
  * @constructor
26
26
  * @private
@@ -23,7 +23,7 @@ sap.ui.define([
23
23
  * @extends sap.m.OverflowToolbarButton
24
24
  *
25
25
  * @author SAP SE
26
- * @version 1.132.1
26
+ * @version 1.134.0
27
27
  *
28
28
  * @constructor
29
29
  * @private
@@ -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.132.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: "sap.ui.rta.toolbar.AdaptationRenderer",
36
+ renderer: AdaptationRenderer,
35
37
  type: "standalone"
36
38
  });
37
39
 
@@ -45,7 +45,7 @@ sap.ui.define([
45
45
  * @class
46
46
  *
47
47
  * @author SAP SE
48
- * @version 1.132.1
48
+ * @version 1.134.0
49
49
  *
50
50
  * @constructor
51
51
  * @private
@@ -53,7 +53,7 @@ sap.ui.define([
53
53
  * @class
54
54
  *
55
55
  * @author SAP SE
56
- * @version 1.132.1
56
+ * @version 1.134.0
57
57
  *
58
58
  * @constructor
59
59
  * @private
@@ -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/library",
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
- coreLibrary,
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.132.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
  }
@@ -40,4 +40,4 @@ function() {
40
40
  };
41
41
 
42
42
  return module;
43
- }, true);
43
+ });
@@ -346,4 +346,4 @@ function(
346
346
  };
347
347
 
348
348
  return BindingsExtractor;
349
- }, true);
349
+ });