@openui5/sap.ui.rta 1.133.1 → 1.135.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 (165) hide show
  1. package/.reuse/dep5 +0 -7
  2. package/THIRDPARTY.txt +2 -23
  3. package/package.json +6 -6
  4. package/src/sap/ui/rta/.library +1 -1
  5. package/src/sap/ui/rta/Client.js +1 -1
  6. package/src/sap/ui/rta/RuntimeAuthoring.js +38 -17
  7. package/src/sap/ui/rta/Utils.js +11 -1
  8. package/src/sap/ui/rta/appVariant/AppVariantManager.js +26 -26
  9. package/src/sap/ui/rta/appVariant/AppVariantUtils.js +0 -4
  10. package/src/sap/ui/rta/appVariant/Feature.js +85 -91
  11. package/src/sap/ui/rta/appVariant/Utils.js +50 -56
  12. package/src/sap/ui/rta/appVariant/manageApps/webapp/controller/ManageApps.controller.js +30 -30
  13. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_fr_CA.properties +2 -2
  14. package/src/sap/ui/rta/command/AddIFrame.js +1 -1
  15. package/src/sap/ui/rta/command/AddProperty.js +1 -1
  16. package/src/sap/ui/rta/command/AddXML.js +1 -1
  17. package/src/sap/ui/rta/command/AddXMLAtExtensionPoint.js +1 -1
  18. package/src/sap/ui/rta/command/AnnotationCommand.js +65 -5
  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 +71 -47
  23. package/src/sap/ui/rta/command/CompositeCommand.js +12 -12
  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/ExtendControllerCommand.js +92 -0
  32. package/src/sap/ui/rta/command/FlexCommand.js +54 -43
  33. package/src/sap/ui/rta/command/LREPSerializer.js +23 -23
  34. package/src/sap/ui/rta/command/LocalReset.js +1 -1
  35. package/src/sap/ui/rta/command/ManifestCommand.js +112 -0
  36. package/src/sap/ui/rta/command/Move.js +1 -1
  37. package/src/sap/ui/rta/command/Property.js +1 -1
  38. package/src/sap/ui/rta/command/Remove.js +1 -1
  39. package/src/sap/ui/rta/command/Rename.js +1 -1
  40. package/src/sap/ui/rta/command/Resize.js +1 -1
  41. package/src/sap/ui/rta/command/Reveal.js +1 -1
  42. package/src/sap/ui/rta/command/Settings.js +1 -1
  43. package/src/sap/ui/rta/command/Split.js +1 -1
  44. package/src/sap/ui/rta/command/Stack.js +1 -1
  45. package/src/sap/ui/rta/command/compVariant/CompVariantContent.js +1 -1
  46. package/src/sap/ui/rta/command/compVariant/CompVariantSaveAs.js +1 -1
  47. package/src/sap/ui/rta/command/compVariant/CompVariantSwitch.js +1 -1
  48. package/src/sap/ui/rta/command/compVariant/CompVariantUpdate.js +1 -1
  49. package/src/sap/ui/rta/command/{appDescriptor → manifest}/AddLibrary.js +10 -10
  50. package/src/sap/ui/rta/enablement/elementActionTest.js +1 -7
  51. package/src/sap/ui/rta/library.js +2 -2
  52. package/src/sap/ui/rta/messagebundle.properties +22 -7
  53. package/src/sap/ui/rta/messagebundle_ar.properties +3 -1
  54. package/src/sap/ui/rta/messagebundle_bg.properties +4 -2
  55. package/src/sap/ui/rta/messagebundle_ca.properties +3 -1
  56. package/src/sap/ui/rta/messagebundle_cnr.properties +4 -2
  57. package/src/sap/ui/rta/messagebundle_cs.properties +3 -1
  58. package/src/sap/ui/rta/messagebundle_cy.properties +3 -1
  59. package/src/sap/ui/rta/messagebundle_da.properties +4 -2
  60. package/src/sap/ui/rta/messagebundle_de.properties +3 -1
  61. package/src/sap/ui/rta/messagebundle_el.properties +3 -1
  62. package/src/sap/ui/rta/messagebundle_en.properties +3 -1
  63. package/src/sap/ui/rta/messagebundle_en_GB.properties +3 -1
  64. package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +10 -2
  65. package/src/sap/ui/rta/messagebundle_es.properties +3 -1
  66. package/src/sap/ui/rta/messagebundle_es_MX.properties +4 -2
  67. package/src/sap/ui/rta/messagebundle_et.properties +3 -1
  68. package/src/sap/ui/rta/messagebundle_fi.properties +4 -2
  69. package/src/sap/ui/rta/messagebundle_fr.properties +12 -10
  70. package/src/sap/ui/rta/messagebundle_fr_CA.properties +7 -5
  71. package/src/sap/ui/rta/messagebundle_hi.properties +3 -1
  72. package/src/sap/ui/rta/messagebundle_hr.properties +34 -32
  73. package/src/sap/ui/rta/messagebundle_hu.properties +3 -1
  74. package/src/sap/ui/rta/messagebundle_id.properties +3 -1
  75. package/src/sap/ui/rta/messagebundle_it.properties +48 -46
  76. package/src/sap/ui/rta/messagebundle_iw.properties +3 -1
  77. package/src/sap/ui/rta/messagebundle_ja.properties +3 -1
  78. package/src/sap/ui/rta/messagebundle_kk.properties +3 -1
  79. package/src/sap/ui/rta/messagebundle_ko.properties +3 -1
  80. package/src/sap/ui/rta/messagebundle_lt.properties +3 -1
  81. package/src/sap/ui/rta/messagebundle_lv.properties +3 -1
  82. package/src/sap/ui/rta/messagebundle_mk.properties +3 -1
  83. package/src/sap/ui/rta/messagebundle_ms.properties +3 -1
  84. package/src/sap/ui/rta/messagebundle_nl.properties +3 -1
  85. package/src/sap/ui/rta/messagebundle_no.properties +3 -1
  86. package/src/sap/ui/rta/messagebundle_pl.properties +3 -1
  87. package/src/sap/ui/rta/messagebundle_pt.properties +3 -1
  88. package/src/sap/ui/rta/messagebundle_pt_PT.properties +3 -1
  89. package/src/sap/ui/rta/messagebundle_ro.properties +3 -1
  90. package/src/sap/ui/rta/messagebundle_ru.properties +3 -1
  91. package/src/sap/ui/rta/messagebundle_sh.properties +4 -2
  92. package/src/sap/ui/rta/messagebundle_sk.properties +3 -1
  93. package/src/sap/ui/rta/messagebundle_sl.properties +3 -1
  94. package/src/sap/ui/rta/messagebundle_sr.properties +4 -2
  95. package/src/sap/ui/rta/messagebundle_sv.properties +3 -1
  96. package/src/sap/ui/rta/messagebundle_th.properties +3 -1
  97. package/src/sap/ui/rta/messagebundle_tr.properties +3 -1
  98. package/src/sap/ui/rta/messagebundle_uk.properties +3 -1
  99. package/src/sap/ui/rta/messagebundle_vi.properties +3 -1
  100. package/src/sap/ui/rta/messagebundle_zh_CN.properties +3 -1
  101. package/src/sap/ui/rta/messagebundle_zh_TW.properties +3 -1
  102. package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +41 -35
  103. package/src/sap/ui/rta/plugin/AddXMLPlugin.js +168 -0
  104. package/src/sap/ui/rta/plugin/BaseCreate.js +1 -1
  105. package/src/sap/ui/rta/plugin/Combine.js +1 -1
  106. package/src/sap/ui/rta/plugin/ControlVariant.js +1 -1
  107. package/src/sap/ui/rta/plugin/CreateContainer.js +1 -1
  108. package/src/sap/ui/rta/plugin/CutPaste.js +1 -1
  109. package/src/sap/ui/rta/plugin/DragDrop.js +1 -1
  110. package/src/sap/ui/rta/plugin/ExtendControllerPlugin.js +161 -0
  111. package/src/sap/ui/rta/plugin/LocalReset.js +1 -1
  112. package/src/sap/ui/rta/plugin/Plugin.js +7 -4
  113. package/src/sap/ui/rta/plugin/RTAElementMover.js +1 -1
  114. package/src/sap/ui/rta/plugin/Remove.js +1 -1
  115. package/src/sap/ui/rta/plugin/Rename.js +1 -1
  116. package/src/sap/ui/rta/plugin/RenameHandler.js +2 -2
  117. package/src/sap/ui/rta/plugin/Resize.js +1 -1
  118. package/src/sap/ui/rta/plugin/Selection.js +1 -1
  119. package/src/sap/ui/rta/plugin/Settings.js +71 -61
  120. package/src/sap/ui/rta/plugin/Split.js +1 -1
  121. package/src/sap/ui/rta/plugin/Stretch.js +1 -1
  122. package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +1 -1
  123. package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +1 -1
  124. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +1 -1
  125. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +1 -1
  126. package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +1 -1
  127. package/src/sap/ui/rta/plugin/annotations/AnnotationChangeDialog.fragment.xml +38 -51
  128. package/src/sap/ui/rta/plugin/annotations/AnnotationChangeDialog.js +85 -47
  129. package/src/sap/ui/rta/plugin/annotations/AnnotationChangeDialogController.js +97 -33
  130. package/src/sap/ui/rta/plugin/annotations/AnnotationPlugin.js +72 -17
  131. package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +1 -1
  132. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +1 -1
  133. package/src/sap/ui/rta/service/Action.js +1 -1
  134. package/src/sap/ui/rta/service/ControllerExtension.js +10 -4
  135. package/src/sap/ui/rta/service/Outline.js +1 -1
  136. package/src/sap/ui/rta/service/Property.js +1 -1
  137. package/src/sap/ui/rta/service/Selection.js +1 -1
  138. package/src/sap/ui/rta/service/SupportTools.js +1 -1
  139. package/src/sap/ui/rta/themes/base/Toolbar.adaptation.less +5 -0
  140. package/src/sap/ui/rta/toolbar/Adaptation.fragment.xml +21 -3
  141. package/src/sap/ui/rta/toolbar/Adaptation.js +33 -7
  142. package/src/sap/ui/rta/toolbar/Base.js +1 -1
  143. package/src/sap/ui/rta/toolbar/Fiori.js +4 -3
  144. package/src/sap/ui/rta/toolbar/FioriLike.js +1 -1
  145. package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +1 -1
  146. package/src/sap/ui/rta/toolbar/Standalone.js +1 -1
  147. package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptation.js +1 -1
  148. package/src/sap/ui/rta/toolbar/translation/Translation.js +1 -1
  149. package/src/sap/ui/rta/toolbar/versioning/Versioning.js +1 -1
  150. package/src/sap/ui/rta/util/Animation.js +1 -1
  151. package/src/sap/ui/rta/util/BindingsExtractor.js +1 -1
  152. package/src/sap/ui/rta/util/PluginManager.js +5 -7
  153. package/src/sap/ui/rta/util/PopupManager.js +1 -1
  154. package/src/sap/ui/rta/util/ReloadManager.js +1 -1
  155. package/src/sap/ui/rta/util/ServiceEventBus.js +1 -1
  156. package/src/sap/ui/rta/util/ServiceManager.js +1 -1
  157. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +1 -1
  158. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +1 -1
  159. package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +2 -2
  160. package/src/sap/ui/rta/util/isReuseComponent.js +44 -0
  161. package/src/sap/ui/rta/util/validateText.js +1 -1
  162. package/src/sap/ui/rta/util/whatsNew/WhatsNew.js +1 -1
  163. package/src/sap/ui/rta/util/whatsNew/WhatsNewUtils.js +12 -7
  164. package/LICENSES/LicenseRef-tzdata-PublicDomain.txt +0 -5
  165. package/src/sap/ui/rta/command/AppDescriptorCommand.js +0 -114
@@ -6,27 +6,40 @@
6
6
 
7
7
  sap.ui.define([
8
8
  "sap/base/Log",
9
+ "sap/ui/base/DesignTime",
10
+ "sap/ui/core/util/reflection/JsControlTreeModifier",
9
11
  "sap/ui/dt/Util",
12
+ "sap/ui/fl/write/api/PersistenceWriteAPI",
13
+ "sap/ui/fl/Utils",
10
14
  "sap/ui/rta/plugin/annotations/AnnotationChangeDialog",
15
+ "sap/ui/rta/plugin/annotations/AnnotationTypes",
11
16
  "sap/ui/rta/plugin/Plugin"
12
17
  ], function(
13
18
  BaseLog,
19
+ DesignTime,
20
+ JsControlTreeModifier,
14
21
  DtUtil,
22
+ PersistenceWriteAPI,
23
+ Utils,
15
24
  AnnotationChangeDialog,
25
+ AnnotationTypes,
16
26
  Plugin
17
27
  ) {
18
28
  "use strict";
19
29
 
20
- async function handleCompositeCommand(oElement, oAction, aChanges) {
30
+ async function handleCompositeCommand(oElement, oAction, aAnnotationChanges, aLegacyRenameChanges) {
21
31
  const oCompositeCommand = await this.getCommandFactory().getCommandFor(oElement, "composite");
22
- for (const oChange of aChanges) {
32
+ for (const oChange of aAnnotationChanges) {
33
+ // aLegacyRenameChanges is only passed for singleRename scenarios, where there is only one annotation change to be saved
34
+ // so we can simply add it in the loop
23
35
  const oAnnotationCommand = await this.getCommandFactory().getCommandFor(
24
36
  oElement,
25
37
  "annotation",
26
38
  {
27
39
  changeType: oAction.changeType,
28
40
  serviceUrl: oChange.serviceUrl,
29
- content: oChange.content
41
+ content: {...oChange.content, objectTemplateInfo: oAction.objectTemplateInfo},
42
+ changesToDelete: aLegacyRenameChanges
30
43
  }
31
44
  );
32
45
  oCompositeCommand.addCommand(oAnnotationCommand);
@@ -34,8 +47,7 @@ sap.ui.define([
34
47
 
35
48
  if (oCompositeCommand.getCommands().length > 0) {
36
49
  this.fireElementModified({
37
- command: oCompositeCommand,
38
- hasAnnotationCommand: true
50
+ command: oCompositeCommand
39
51
  });
40
52
  }
41
53
  }
@@ -57,7 +69,7 @@ sap.ui.define([
57
69
  }
58
70
 
59
71
  function getActionIcon(oAnnotationAction) {
60
- const sDefaultIcon = "sap-icon://request";
72
+ const sDefaultIcon = oAnnotationAction.type === AnnotationTypes.StringType ? "sap-icon://edit" : "sap-icon://request";
61
73
  const sActionIcon = oAnnotationAction.icon;
62
74
  if (!sActionIcon) {
63
75
  return sDefaultIcon;
@@ -69,6 +81,14 @@ sap.ui.define([
69
81
  return sActionIcon;
70
82
  }
71
83
 
84
+ function checkDesigntimeActionProperties(oAction) {
85
+ if (oAction.singleRename && !oAction.controlBasedRenameChangeType) {
86
+ BaseLog.error("When using singleRename, controlBasedRenameChangeType must also be defined");
87
+ return false;
88
+ }
89
+ return true;
90
+ }
91
+
72
92
  /**
73
93
  * Constructor for a new Annotation Plugin.
74
94
  * Multiple annotation actions can be defined for the same overlay. Each action is represented by a menu item.
@@ -80,7 +100,7 @@ sap.ui.define([
80
100
  * @class
81
101
  * @extends sap.ui.rta.plugin.Plugin
82
102
  * @author SAP SE
83
- * @version 1.133.1
103
+ * @version 1.135.0
84
104
  * @constructor
85
105
  * @private
86
106
  * @since 1.132
@@ -95,7 +115,8 @@ sap.ui.define([
95
115
  }
96
116
  });
97
117
 
98
- const sPluginId = "CTX_ANNOTATION";
118
+ const sPluginIdDefault = "CTX_ANNOTATION";
119
+ const sPluginIdSingleLabelChange = "CTX_ANNOTATION_CHANGE_SINGLE_LABEL";
99
120
 
100
121
  AnnotationPlugin.prototype.init = function(...aArgs) {
101
122
  Plugin.prototype.init.apply(this, aArgs);
@@ -108,6 +129,12 @@ sap.ui.define([
108
129
  * @private
109
130
  */
110
131
  AnnotationPlugin.prototype._isEditable = function(oElementOverlay) {
132
+ // Currently annotation changes are not supported for developers,
133
+ // because the changes are not guaranteed to be loaded in time to be properly applied
134
+ if (DesignTime.isDesignModeEnabled()) {
135
+ return false;
136
+ }
137
+
111
138
  const oActions = this.getAction(oElementOverlay);
112
139
 
113
140
  if (oActions) {
@@ -127,6 +154,10 @@ sap.ui.define([
127
154
  * @public
128
155
  */
129
156
  AnnotationPlugin.prototype.isEnabled = function(aElementOverlays) {
157
+ if (aElementOverlays.length !== 1) {
158
+ return false;
159
+ }
160
+
130
161
  const oElementOverlay = aElementOverlays[0];
131
162
  const oResponsibleElementOverlay = this.getResponsibleElementOverlay(oElementOverlay);
132
163
  const oActions = this.getAction(oResponsibleElementOverlay);
@@ -157,17 +188,32 @@ sap.ui.define([
157
188
  const oElement = oElementOverlay.getElement();
158
189
 
159
190
  try {
160
- const aChanges = await this._oDialog.openDialogAndHandleChanges({
191
+ const aAnnotationChanges = await this._oDialog.openDialogAndHandleChanges({
161
192
  title: getActionText(oElementOverlay, oAction),
162
193
  type: oAction.type,
163
194
  control: oElement,
164
195
  delegate: oAction.delegate,
165
196
  annotation: oAction.annotation,
166
- description: oAction.description
197
+ description: oAction.description,
198
+ singleRename: oAction.singleRename,
199
+ controlBasedRenameChangeType: oAction.controlBasedRenameChangeType
167
200
  });
168
201
 
169
- if (aChanges.length > 0) {
170
- return handleCompositeCommand.call(this, oElement, oAction, aChanges);
202
+ if (aAnnotationChanges.length) {
203
+ const aLegacyRenameChanges = [];
204
+ // for single rename scenarios we are able to remove any existing control based rename change in the context of
205
+ // the given control and change type
206
+ if (oAction.singleRename) {
207
+ const aUIChanges = await PersistenceWriteAPI._getUIChanges({
208
+ selector: oElement
209
+ });
210
+ const oAppComponent = Utils.getAppComponentForControl(oElement);
211
+ aLegacyRenameChanges.push(...aUIChanges.filter((oChange) =>
212
+ oChange.getChangeType() === oAction.controlBasedRenameChangeType
213
+ && JsControlTreeModifier.getControlIdBySelector(oChange.getSelector(), oAppComponent) === oElement.getId()
214
+ ));
215
+ }
216
+ return handleCompositeCommand.call(this, oElement, oAction, aAnnotationChanges, aLegacyRenameChanges);
171
217
  }
172
218
  return undefined;
173
219
  } catch (vError) {
@@ -175,7 +221,7 @@ sap.ui.define([
175
221
  vError,
176
222
  "AnnotationPlugin#handler",
177
223
  "Error occurred during handler execution",
178
- "sap.ui.rta.plugin.annotations.annotationplugin"
224
+ "sap.ui.rta.plugin.annotations.AnnotationPlugin"
179
225
  );
180
226
  }
181
227
  };
@@ -193,16 +239,19 @@ sap.ui.define([
193
239
 
194
240
  const aMenuItems = [];
195
241
  if (oAnnotationActionMap) {
196
- const iRank = this.getRank(sPluginId);
197
-
198
242
  if (this._isEditableByPlugin(oResponsibleElementOverlay) === undefined) {
199
243
  // The responsibleElement editableByPlugin state was not evaluated yet e.g. because it
200
244
  // has no visible geometry, thus evaluateEditable now
201
245
  await this.evaluateEditable([oResponsibleElementOverlay], { onRegistration: false });
202
246
  }
203
- Object.values(oAnnotationActionMap).forEach(function(oAction, iIndex) {
247
+ Object.entries(oAnnotationActionMap).forEach(function([sKey, oAction], iIndex) {
248
+ const sPluginId = oAction.type === AnnotationTypes.StringType && oAction.singleRename
249
+ ? sPluginIdSingleLabelChange
250
+ : sPluginIdDefault;
251
+ const iRank = this.getRank(sPluginId);
204
252
  if (
205
253
  this.isAvailable([oResponsibleElementOverlay])
254
+ && checkDesigntimeActionProperties(oAction)
206
255
  ) {
207
256
  const sActionText = getActionText(oResponsibleElementOverlay, oAction);
208
257
  if (!sActionText) {
@@ -210,7 +259,7 @@ sap.ui.define([
210
259
  }
211
260
 
212
261
  aMenuItems.push({
213
- id: sPluginId + iIndex,
262
+ id: `${sPluginId}_${sKey}`,
214
263
  rank: iRank + iIndex,
215
264
  text: sActionText,
216
265
  icon: getActionIcon(oAction),
@@ -235,5 +284,11 @@ sap.ui.define([
235
284
  return "annotation";
236
285
  };
237
286
 
287
+ AnnotationPlugin.prototype.destroy = function(...args) {
288
+ Plugin.prototype.destroy.apply(this, args);
289
+ this._oDialog.destroy();
290
+ delete this._oDialog;
291
+ };
292
+
238
293
  return AnnotationPlugin;
239
294
  });
@@ -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.133.1
122
+ * @version 1.135.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.133.1
162
+ * @version 1.135.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.133.1
27
+ * @version 1.135.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.133.1
33
+ * @version 1.135.0
34
34
  * @private
35
35
  * @ui5-restricted
36
36
  */
@@ -62,11 +62,17 @@ sap.ui.define([
62
62
  add(sCodeRef, sViewId) {
63
63
  var oFlexSettings = oRta.getFlexSettings();
64
64
  if (!oFlexSettings.developerMode) {
65
- throw DtUtil.createError("service.ControllerExtension#add", "code extensions can only be created in developer mode", "sap.ui.rta");
65
+ throw DtUtil.createError(
66
+ "service.ControllerExtension#add", "code extensions can only be created in developer mode",
67
+ "sap.ui.rta"
68
+ );
66
69
  }
67
70
 
68
71
  if (!sCodeRef) {
69
- throw DtUtil.createError("service.ControllerExtension#add", "can't create controller extension without codeRef", "sap.ui.rta");
72
+ throw DtUtil.createError(
73
+ "service.ControllerExtension#add", "can't create controller extension without codeRef",
74
+ "sap.ui.rta"
75
+ );
70
76
  }
71
77
 
72
78
  if (!sCodeRef.endsWith(".js")) {
@@ -75,7 +81,7 @@ sap.ui.define([
75
81
 
76
82
  var oView = Element.getElementById(sViewId);
77
83
  var oAppComponent = FlexUtils.getAppComponentForControl(oView);
78
- var sControllerName = oView.getControllerName && oView.getControllerName() || oView.getController() && oView.getController().getMetadata().getName();
84
+ var sControllerName = oView.getControllerModuleName() ? `module:${oView.getControllerModuleName()}` : oView.getController()?.getMetadata().getName();
79
85
  // Calculate moduleName for code extension
80
86
  var sReference = FlexRuntimeInfoAPI.getFlexReference({element: oAppComponent});
81
87
  var sModuleName = sReference.replace(/\.Component/g, "").replace(/\./g, "/");
@@ -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.133.1
46
+ * @version 1.135.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.133.1
30
+ * @version 1.135.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.133.1
17
+ * @version 1.135.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.133.1
33
+ * @version 1.135.0
34
34
  * @private
35
35
  * @ui5-restricted
36
36
  */
@@ -25,6 +25,11 @@
25
25
  }
26
26
  }
27
27
 
28
+ .sapUiRtaHardReloadInfoButton .sapMBtnAttention {
29
+ background-color: transparent;
30
+ border-color: transparent;
31
+ }
32
+
28
33
  .sapMFlexBox {
29
34
  margin-left: 0;
30
35
  height: 2.5rem; //40px
@@ -20,14 +20,32 @@
20
20
  class="sapUiRtaVersionButton"
21
21
  icon="sap-icon://megamenu"
22
22
  iconFirst="false"
23
- visible="{= (${versions>/versioningEnabled} && ${controls>/modeSwitcher} === 'adaptation')}"
23
+ visible="{= (${versions>/versioningEnabled} && ${controls>/modeSwitcher} === 'adaptation' && ${controls>/changesNeedHardReload} === false)}"
24
24
  text="{parts: [{path: 'versions>/versions'}, {path: 'versions>/displayedVersion'}], formatter: '.formatVersionButtonText'}"
25
- tooltip="{parts: [{path: 'versions>/versions'}, {path: 'versions>/displayedVersion'}], formatter: '.formatVersionButtonText'}"
25
+ tooltip="{i18n>TOL_SHOW_VERSION_HISTORY}"
26
26
  press=".showVersionHistory">
27
27
  <layoutData>
28
28
  <OverflowToolbarLayoutData priority="NeverOverflow"/>
29
29
  </layoutData>
30
30
  </Button>
31
+ <Button
32
+ id="sapUiRta_hardReloadButton"
33
+ type="Attention"
34
+ visible="{= ${controls>/changesNeedHardReload} === true}"
35
+ text="{i18n>SAVE_AND_RELOAD}"
36
+ iconFirst="true"
37
+ icon="sap-icon://refresh"
38
+ press=".saveAndReloadApp"
39
+ />
40
+ <Button
41
+ id="sapUiRta_hardReloadInfoButton"
42
+ type="Attention"
43
+ visible="{= ${controls>/changesNeedHardReload} === true}"
44
+ press=".showHardReloadInfoPopover"
45
+ icon="sap-icon://question-mark"
46
+ class="sapUiNoMarginBeginEnd sapUiRtaHardReloadInfoButton"
47
+ tooltip="{i18n>TOL_SHOW_HARD_RELOAD_INFO}"
48
+ />
31
49
  <toolbar:OverflowToolbarButton
32
50
  id="sapUiRta_activate"
33
51
  icon="sap-icon://activate"
@@ -65,7 +83,7 @@
65
83
  id="sapUiRta_modeSwitcher"
66
84
  selectionChange=".modeChange"
67
85
  selectedKey="{controls>/modeSwitcher}"
68
- width="auto" >
86
+ width="100%" >
69
87
  <items>
70
88
  <SegmentedButtonItem
71
89
  id="sapUiRta_adaptationSwitcherButton"
@@ -5,9 +5,11 @@
5
5
  */
6
6
 
7
7
  sap.ui.define([
8
- "./AdaptationRenderer",
9
8
  "sap/base/Log",
10
9
  "sap/m/MessageBox",
10
+ "sap/m/MessageStrip",
11
+ "sap/m/Popover",
12
+ "sap/ui/core/message/MessageType",
11
13
  "sap/ui/core/BusyIndicator",
12
14
  "sap/ui/core/Element",
13
15
  "sap/ui/core/Fragment",
@@ -18,17 +20,20 @@ sap.ui.define([
18
20
  "sap/ui/model/json/JSONModel",
19
21
  "sap/ui/performance/Measurement",
20
22
  "sap/ui/rta/appVariant/Feature",
21
- "sap/ui/rta/toolbar/Base",
22
23
  "sap/ui/rta/toolbar/contextBased/ManageAdaptations",
23
24
  "sap/ui/rta/toolbar/contextBased/SaveAsAdaptation",
24
25
  "sap/ui/rta/toolbar/translation/Translation",
25
26
  "sap/ui/rta/toolbar/versioning/Versioning",
27
+ "sap/ui/rta/toolbar/AdaptationRenderer",
28
+ "sap/ui/rta/toolbar/Base",
26
29
  "sap/ui/rta/util/whatsNew/WhatsNewOverview",
27
30
  "sap/ui/rta/Utils"
28
31
  ], function(
29
- AdaptationRenderer,
30
32
  Log,
31
33
  MessageBox,
34
+ MessageStrip,
35
+ Popover,
36
+ MessageType,
32
37
  BusyIndicator,
33
38
  Element,
34
39
  Fragment,
@@ -39,11 +44,12 @@ sap.ui.define([
39
44
  JSONModel,
40
45
  Measurement,
41
46
  AppVariantFeature,
42
- Base,
43
47
  ManageAdaptations,
44
48
  SaveAsAdaptation,
45
49
  Translation,
46
50
  Versioning,
51
+ AdaptationRenderer,
52
+ Base,
47
53
  WhatsNewOverview,
48
54
  Utils
49
55
  ) {
@@ -57,7 +63,7 @@ sap.ui.define([
57
63
  * @extends sap.ui.rta.toolbar.Base
58
64
  *
59
65
  * @author SAP SE
60
- * @version 1.133.1
66
+ * @version 1.135.0
61
67
  *
62
68
  * @constructor
63
69
  * @private
@@ -85,7 +91,8 @@ sap.ui.define([
85
91
  switchVersion: {},
86
92
  switchAdaptation: {},
87
93
  deleteAdaptation: {},
88
- openChangeCategorySelectionPopover: {}
94
+ openChangeCategorySelectionPopover: {},
95
+ saveAndReload: {}
89
96
  }
90
97
  }
91
98
  });
@@ -242,6 +249,23 @@ sap.ui.define([
242
249
  return this.getExtension("versioning", Versioning).openActivateVersionDialog(sDisplayedVersion);
243
250
  };
244
251
 
252
+ Adaptation.prototype.showHardReloadInfoPopover = function(oEvent) {
253
+ this._oHardReloadInfoPopover ||= new Popover({
254
+ placement: "Bottom",
255
+ content: [
256
+ new MessageStrip({
257
+ text: this.getTextResources().getText("MSG_HARD_RELOAD_INFO"),
258
+ type: MessageType.Warning,
259
+ showIcon: true
260
+ })
261
+ ],
262
+ showHeader: false,
263
+ contentWidth: "18rem"
264
+ });
265
+ this.addDependent(this._oHardReloadInfoPopover);
266
+ this._oHardReloadInfoPopover.openBy(oEvent.getSource());
267
+ };
268
+
245
269
  Adaptation.prototype.showActionsMenu = function(oEvent) {
246
270
  var oButton = oEvent.getSource();
247
271
  if (!this._oActionsMenuFragment) {
@@ -326,7 +350,9 @@ sap.ui.define([
326
350
  formatVersionButtonText: this.formatVersionButtonText.bind(this),
327
351
  showVersionHistory: this.showVersionHistory.bind(this),
328
352
  showActionsMenu: this.showActionsMenu.bind(this),
329
- showFeedbackForm: this.showFeedbackForm.bind(this)
353
+ showFeedbackForm: this.showFeedbackForm.bind(this),
354
+ showHardReloadInfoPopover: this.showHardReloadInfoPopover.bind(this),
355
+ saveAndReloadApp: this.eventHandler.bind(this, "SaveAndReload")
330
356
  }
331
357
  });
332
358
  };
@@ -33,7 +33,7 @@ sap.ui.define([
33
33
  * @extends sap.m.HBox
34
34
  *
35
35
  * @author SAP SE
36
- * @version 1.133.1
36
+ * @version 1.135.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.133.1
35
+ * @version 1.135.0
36
36
  *
37
37
  * @constructor
38
38
  * @private
@@ -81,8 +81,9 @@ function(
81
81
  this.getControl("iconBox").addItem(
82
82
  new Image(`${this.getId()}_fragment--sapUiRta_icon`, {
83
83
  src: sLogoPath,
84
- width: iWidth ? `${iWidth}px` : iWidth,
85
- height: iHeight ? `${iHeight}px` : iHeight
84
+ // type check required cause of image could have zero width and height
85
+ width: typeof iWidth === "number" ? `${iWidth}px` : iWidth,
86
+ height: typeof iHeight === "number" ? `${iHeight}px` : iHeight
86
87
  })
87
88
  );
88
89
  }
@@ -20,7 +20,7 @@ function(
20
20
  * @extends sap.ui.rta.toolbar.Adaptation
21
21
  *
22
22
  * @author SAP SE
23
- * @version 1.133.1
23
+ * @version 1.135.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.133.1
26
+ * @version 1.135.0
27
27
  *
28
28
  * @constructor
29
29
  * @private
@@ -22,7 +22,7 @@ function(
22
22
  * @extends sap.ui.rta.toolbar.Adaptation
23
23
  *
24
24
  * @author SAP SE
25
- * @version 1.133.1
25
+ * @version 1.135.0
26
26
  *
27
27
  * @constructor
28
28
  * @private
@@ -45,7 +45,7 @@ sap.ui.define([
45
45
  * @class
46
46
  *
47
47
  * @author SAP SE
48
- * @version 1.133.1
48
+ * @version 1.135.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.133.1
56
+ * @version 1.135.0
57
57
  *
58
58
  * @constructor
59
59
  * @private
@@ -38,7 +38,7 @@ sap.ui.define([
38
38
  * @class
39
39
  *
40
40
  * @author SAP SE
41
- * @version 1.133.1
41
+ * @version 1.135.0
42
42
  *
43
43
  * @constructor
44
44
  * @private
@@ -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
+ });
@@ -9,7 +9,7 @@ sap.ui.define([
9
9
  "sap/ui/base/ManagedObject",
10
10
  "sap/ui/dt/plugin/ContextMenu",
11
11
  "sap/ui/dt/plugin/ToolHooks",
12
- "sap/ui/fl/registry/Settings",
12
+ "sap/ui/fl/write/api/FeaturesAPI",
13
13
  "sap/ui/fl/Layer",
14
14
  "sap/ui/rta/command/CommandFactory",
15
15
  "sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin",
@@ -36,7 +36,7 @@ sap.ui.define([
36
36
  ManagedObject,
37
37
  ContextMenuPlugin,
38
38
  ToolHooksPlugin,
39
- Settings,
39
+ FeaturesAPI,
40
40
  Layer,
41
41
  CommandFactory,
42
42
  AdditionalElementsPlugin,
@@ -64,7 +64,7 @@ sap.ui.define([
64
64
  * Constructor for a new sap.ui.rta.util.PluginManager
65
65
  * @extends sap.ui.base.ManagedObject
66
66
  * @author SAP SE
67
- * @version 1.133.1
67
+ * @version 1.135.0
68
68
  * @constructor
69
69
  * @private
70
70
  * @since 1.86
@@ -185,8 +185,7 @@ sap.ui.define([
185
185
 
186
186
  this._mDefaultPlugins.stretch = new StretchPlugin();
187
187
 
188
- var oSettings = Settings.getInstanceOrUndef();
189
- if (oSettings && oSettings.isVariantAdaptationEnabled()) {
188
+ if (FeaturesAPI.isVariantAdaptationEnabled()) {
190
189
  this._mDefaultPlugins.compVariant = new CompVariantPlugin({
191
190
  commandFactory: this._oCommandFactory
192
191
  });
@@ -204,8 +203,7 @@ sap.ui.define([
204
203
 
205
204
  if (
206
205
  oFlexSettings.layer === Layer.CUSTOMER
207
- && oSettings
208
- && oSettings.isLocalResetEnabled()
206
+ && FeaturesAPI.isLocalResetEnabled()
209
207
  ) {
210
208
  this._mDefaultPlugins.localReset = new LocalResetPlugin({
211
209
  commandFactory: this._oCommandFactory
@@ -42,7 +42,7 @@ sap.ui.define([
42
42
  * Constructor for a new sap.ui.rta.util.PopupManager
43
43
  * @extends sap.ui.base.ManagedObject
44
44
  * @author SAP SE
45
- * @version 1.133.1
45
+ * @version 1.135.0
46
46
  * @constructor
47
47
  * @private
48
48
  * @since 1.48
@@ -30,7 +30,7 @@ sap.ui.define([
30
30
  * @namespace sap.ui.rta.util.ReloadManager
31
31
  * @alias sap.ui.rta.util.ReloadManager
32
32
  * @since 1.104
33
- * @version 1.133.1
33
+ * @version 1.135.0
34
34
  * @private
35
35
  * @ui5-restricted
36
36
  */
@@ -19,7 +19,7 @@ function(
19
19
  *
20
20
  * @extends sap.ui.core.EventBus
21
21
  * @author SAP SE
22
- * @version 1.133.1
22
+ * @version 1.135.0
23
23
  * @private
24
24
  * @since 1.56.0
25
25
  * @alias sap.ui.rta.util.ServiceEventBus
@@ -27,7 +27,7 @@ sap.ui.define([
27
27
  *
28
28
  * @extends sap.ui.base.ManagedObject
29
29
  * @author SAP SE
30
- * @version 1.133.1
30
+ * @version 1.135.0
31
31
  * @constructor
32
32
  * @private
33
33
  * @since 1.121