@openui5/sap.ui.rta 1.115.0 → 1.116.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 (174) hide show
  1. package/.eslintrc.json +33 -2
  2. package/.reuse/dep5 +0 -5
  3. package/THIRDPARTY.txt +1 -7
  4. package/package.json +6 -6
  5. package/src/sap/ui/rta/.library +1 -1
  6. package/src/sap/ui/rta/Client.js +60 -59
  7. package/src/sap/ui/rta/RuntimeAuthoring.js +253 -248
  8. package/src/sap/ui/rta/Utils.js +42 -42
  9. package/src/sap/ui/rta/api/startAdaptation.js +2 -2
  10. package/src/sap/ui/rta/appVariant/AppVariantDialog.js +3 -3
  11. package/src/sap/ui/rta/appVariant/AppVariantManager.js +27 -27
  12. package/src/sap/ui/rta/appVariant/AppVariantUtils.js +97 -97
  13. package/src/sap/ui/rta/appVariant/Feature.js +75 -77
  14. package/src/sap/ui/rta/appVariant/S4HanaCloudBackend.js +6 -7
  15. package/src/sap/ui/rta/appVariant/Utils.js +17 -17
  16. package/src/sap/ui/rta/appVariant/manageApps/webapp/controller/ManageApps.controller.js +36 -36
  17. package/src/sap/ui/rta/command/AddIFrame.js +7 -7
  18. package/src/sap/ui/rta/command/AddProperty.js +7 -7
  19. package/src/sap/ui/rta/command/AddXML.js +1 -1
  20. package/src/sap/ui/rta/command/AddXMLAtExtensionPoint.js +7 -7
  21. package/src/sap/ui/rta/command/AppDescriptorCommand.js +18 -18
  22. package/src/sap/ui/rta/command/BaseCommand.js +1 -2
  23. package/src/sap/ui/rta/command/BindProperty.js +1 -1
  24. package/src/sap/ui/rta/command/Combine.js +1 -1
  25. package/src/sap/ui/rta/command/CommandFactory.js +11 -11
  26. package/src/sap/ui/rta/command/CompositeCommand.js +1 -1
  27. package/src/sap/ui/rta/command/ControlVariantConfigure.js +2 -2
  28. package/src/sap/ui/rta/command/ControlVariantSave.js +1 -1
  29. package/src/sap/ui/rta/command/ControlVariantSaveAs.js +22 -22
  30. package/src/sap/ui/rta/command/ControlVariantSetTitle.js +7 -7
  31. package/src/sap/ui/rta/command/ControlVariantSwitch.js +11 -11
  32. package/src/sap/ui/rta/command/CreateContainer.js +2 -2
  33. package/src/sap/ui/rta/command/CustomAdd.js +1 -1
  34. package/src/sap/ui/rta/command/FlexCommand.js +30 -30
  35. package/src/sap/ui/rta/command/LREPSerializer.js +2 -2
  36. package/src/sap/ui/rta/command/LocalReset.js +1 -1
  37. package/src/sap/ui/rta/command/Move.js +1 -1
  38. package/src/sap/ui/rta/command/Property.js +1 -1
  39. package/src/sap/ui/rta/command/Remove.js +1 -1
  40. package/src/sap/ui/rta/command/Rename.js +1 -1
  41. package/src/sap/ui/rta/command/Resize.js +1 -1
  42. package/src/sap/ui/rta/command/Reveal.js +1 -1
  43. package/src/sap/ui/rta/command/Settings.js +1 -1
  44. package/src/sap/ui/rta/command/Split.js +1 -1
  45. package/src/sap/ui/rta/command/Stack.js +4 -4
  46. package/src/sap/ui/rta/command/appDescriptor/AddLibrary.js +1 -1
  47. package/src/sap/ui/rta/command/compVariant/CompVariantContent.js +1 -1
  48. package/src/sap/ui/rta/command/compVariant/CompVariantSaveAs.js +1 -1
  49. package/src/sap/ui/rta/command/compVariant/CompVariantSwitch.js +1 -1
  50. package/src/sap/ui/rta/command/compVariant/CompVariantUpdate.js +1 -1
  51. package/src/sap/ui/rta/enablement/TestDelegate.js +92 -92
  52. package/src/sap/ui/rta/enablement/elementActionTest.js +230 -112
  53. package/src/sap/ui/rta/library.js +2 -2
  54. package/src/sap/ui/rta/messagebundle.properties +11 -1
  55. package/src/sap/ui/rta/messagebundle_ar.properties +5 -0
  56. package/src/sap/ui/rta/messagebundle_bg.properties +5 -0
  57. package/src/sap/ui/rta/messagebundle_ca.properties +5 -0
  58. package/src/sap/ui/rta/messagebundle_cs.properties +5 -0
  59. package/src/sap/ui/rta/messagebundle_cy.properties +5 -0
  60. package/src/sap/ui/rta/messagebundle_da.properties +5 -0
  61. package/src/sap/ui/rta/messagebundle_de.properties +5 -0
  62. package/src/sap/ui/rta/messagebundle_el.properties +5 -0
  63. package/src/sap/ui/rta/messagebundle_en.properties +5 -0
  64. package/src/sap/ui/rta/messagebundle_en_GB.properties +5 -0
  65. package/src/sap/ui/rta/messagebundle_en_US_sappsd.properties +5 -0
  66. package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +5 -0
  67. package/src/sap/ui/rta/messagebundle_en_US_saptrc.properties +6 -1
  68. package/src/sap/ui/rta/messagebundle_es.properties +5 -0
  69. package/src/sap/ui/rta/messagebundle_es_MX.properties +5 -0
  70. package/src/sap/ui/rta/messagebundle_et.properties +5 -0
  71. package/src/sap/ui/rta/messagebundle_fi.properties +5 -0
  72. package/src/sap/ui/rta/messagebundle_fr.properties +5 -0
  73. package/src/sap/ui/rta/messagebundle_fr_CA.properties +5 -0
  74. package/src/sap/ui/rta/messagebundle_hi.properties +5 -0
  75. package/src/sap/ui/rta/messagebundle_hr.properties +5 -0
  76. package/src/sap/ui/rta/messagebundle_hu.properties +5 -0
  77. package/src/sap/ui/rta/messagebundle_id.properties +5 -0
  78. package/src/sap/ui/rta/messagebundle_it.properties +5 -0
  79. package/src/sap/ui/rta/messagebundle_iw.properties +5 -0
  80. package/src/sap/ui/rta/messagebundle_ja.properties +5 -0
  81. package/src/sap/ui/rta/messagebundle_kk.properties +5 -0
  82. package/src/sap/ui/rta/messagebundle_ko.properties +5 -0
  83. package/src/sap/ui/rta/messagebundle_lt.properties +5 -0
  84. package/src/sap/ui/rta/messagebundle_lv.properties +5 -0
  85. package/src/sap/ui/rta/messagebundle_ms.properties +5 -0
  86. package/src/sap/ui/rta/messagebundle_nl.properties +5 -0
  87. package/src/sap/ui/rta/messagebundle_no.properties +5 -0
  88. package/src/sap/ui/rta/messagebundle_pl.properties +5 -0
  89. package/src/sap/ui/rta/messagebundle_pt.properties +5 -0
  90. package/src/sap/ui/rta/messagebundle_pt_PT.properties +5 -0
  91. package/src/sap/ui/rta/messagebundle_ro.properties +5 -0
  92. package/src/sap/ui/rta/messagebundle_ru.properties +5 -0
  93. package/src/sap/ui/rta/messagebundle_sh.properties +5 -0
  94. package/src/sap/ui/rta/messagebundle_sk.properties +5 -0
  95. package/src/sap/ui/rta/messagebundle_sl.properties +5 -0
  96. package/src/sap/ui/rta/messagebundle_sv.properties +5 -0
  97. package/src/sap/ui/rta/messagebundle_th.properties +5 -0
  98. package/src/sap/ui/rta/messagebundle_tr.properties +5 -0
  99. package/src/sap/ui/rta/messagebundle_uk.properties +5 -0
  100. package/src/sap/ui/rta/messagebundle_vi.properties +5 -0
  101. package/src/sap/ui/rta/messagebundle_zh_CN.properties +5 -0
  102. package/src/sap/ui/rta/messagebundle_zh_TW.properties +5 -0
  103. package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +44 -44
  104. package/src/sap/ui/rta/plugin/BaseCreate.js +29 -29
  105. package/src/sap/ui/rta/plugin/Combine.js +9 -9
  106. package/src/sap/ui/rta/plugin/ControlVariant.js +21 -21
  107. package/src/sap/ui/rta/plugin/CreateContainer.js +6 -6
  108. package/src/sap/ui/rta/plugin/CutPaste.js +46 -46
  109. package/src/sap/ui/rta/plugin/DragDrop.js +2 -2
  110. package/src/sap/ui/rta/plugin/EasyAdd.js +4 -4
  111. package/src/sap/ui/rta/plugin/EasyRemove.js +5 -5
  112. package/src/sap/ui/rta/plugin/LocalReset.js +25 -25
  113. package/src/sap/ui/rta/plugin/Plugin.js +20 -20
  114. package/src/sap/ui/rta/plugin/RTAElementMover.js +42 -42
  115. package/src/sap/ui/rta/plugin/Remove.js +11 -11
  116. package/src/sap/ui/rta/plugin/Rename.js +7 -7
  117. package/src/sap/ui/rta/plugin/RenameHandler.js +17 -17
  118. package/src/sap/ui/rta/plugin/Resize.js +62 -62
  119. package/src/sap/ui/rta/plugin/Selection.js +14 -14
  120. package/src/sap/ui/rta/plugin/Settings.js +20 -20
  121. package/src/sap/ui/rta/plugin/Split.js +7 -7
  122. package/src/sap/ui/rta/plugin/Stretch.js +4 -4
  123. package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +94 -87
  124. package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +18 -18
  125. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js +98 -99
  126. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +144 -144
  127. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +3 -4
  128. package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +67 -67
  129. package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +38 -39
  130. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.fragment.xml +1 -0
  131. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +29 -29
  132. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialogController.js +5 -5
  133. package/src/sap/ui/rta/plugin/iframe/urlCleaner.js +1 -1
  134. package/src/sap/ui/rta/service/Action.js +36 -37
  135. package/src/sap/ui/rta/service/ControllerExtension.js +4 -4
  136. package/src/sap/ui/rta/service/Outline.js +59 -59
  137. package/src/sap/ui/rta/service/Property.js +125 -125
  138. package/src/sap/ui/rta/service/Receiver.js +78 -77
  139. package/src/sap/ui/rta/service/Selection.js +6 -6
  140. package/src/sap/ui/rta/service/SupportTools.js +30 -30
  141. package/src/sap/ui/rta/service/index.js +1 -1
  142. package/src/sap/ui/rta/toolbar/Adaptation.js +74 -26
  143. package/src/sap/ui/rta/toolbar/AdaptationRenderer.js +1 -1
  144. package/src/sap/ui/rta/toolbar/Base.js +17 -15
  145. package/src/sap/ui/rta/toolbar/BaseRenderer.js +1 -2
  146. package/src/sap/ui/rta/toolbar/Fiori.js +8 -8
  147. package/src/sap/ui/rta/toolbar/FioriLike.js +1 -1
  148. package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +4 -4
  149. package/src/sap/ui/rta/toolbar/Personalization.js +2 -2
  150. package/src/sap/ui/rta/toolbar/Standalone.js +1 -1
  151. package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptations.js +13 -6
  152. package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptationsDialog.fragment.xml +2 -8
  153. package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptation.js +2 -3
  154. package/src/sap/ui/rta/toolbar/translation/Translation.js +41 -41
  155. package/src/sap/ui/rta/toolbar/versioning/Versioning.js +9 -9
  156. package/src/sap/ui/rta/util/Animation.js +5 -5
  157. package/src/sap/ui/rta/util/BindingsExtractor.js +33 -33
  158. package/src/sap/ui/rta/util/PluginManager.js +25 -25
  159. package/src/sap/ui/rta/util/PopupManager.js +27 -27
  160. package/src/sap/ui/rta/util/ReloadManager.js +1 -1
  161. package/src/sap/ui/rta/util/ServiceEventBus.js +3 -4
  162. package/src/sap/ui/rta/util/StylesLoader.js +9 -9
  163. package/src/sap/ui/rta/util/UrlParser.js +19 -19
  164. package/src/sap/ui/rta/util/adaptationStarter.js +34 -31
  165. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +21 -19
  166. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +61 -61
  167. package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +73 -60
  168. package/src/sap/ui/rta/util/changeVisualization/commands/CombineVisualization.js +6 -6
  169. package/src/sap/ui/rta/util/changeVisualization/commands/CreateContainerVisualization.js +1 -1
  170. package/src/sap/ui/rta/util/changeVisualization/commands/SplitVisualization.js +1 -1
  171. package/src/sap/ui/rta/util/hasStableId.js +2 -2
  172. package/src/sap/ui/rta/util/showMessageBox.js +4 -5
  173. package/src/sap/ui/rta/util/validateFlexEnabled.js +5 -5
  174. package/src/sap/ui/rta/util/validateStableIds.js +8 -8
@@ -39,7 +39,7 @@ sap.ui.define([
39
39
  * @alias sap.ui.rta.util.changeVisualization.ChangeIndicatorRegistry
40
40
  * @author SAP SE
41
41
  * @since 1.86.0
42
- * @version 1.115.0
42
+ * @version 1.116.0
43
43
  * @private
44
44
  */
45
45
  var ChangeIndicatorRegistry = ManagedObject.extend("sap.ui.rta.util.changeVisualization.ChangeIndicatorRegistry", {
@@ -60,7 +60,7 @@ sap.ui.define([
60
60
  }
61
61
  }
62
62
  },
63
- constructor: function () {
63
+ constructor: function() {
64
64
  ManagedObject.prototype.constructor.apply(this, arguments);
65
65
 
66
66
  // List of entries with indicator data, grouped by Change ID
@@ -71,7 +71,7 @@ sap.ui.define([
71
71
  }
72
72
  });
73
73
 
74
- ChangeIndicatorRegistry.prototype.exit = function () {
74
+ ChangeIndicatorRegistry.prototype.exit = function() {
75
75
  this.reset();
76
76
  };
77
77
 
@@ -80,8 +80,8 @@ sap.ui.define([
80
80
  *
81
81
  * @returns {object[]} Change indicator data for all registered changes
82
82
  */
83
- ChangeIndicatorRegistry.prototype.getAllRegisteredChanges = function () {
84
- return values(this._oRegisteredChanges || {}).map(function (oChange) {
83
+ ChangeIndicatorRegistry.prototype.getAllRegisteredChanges = function() {
84
+ return values(this._oRegisteredChanges || {}).map(function(oChange) {
85
85
  return Object.assign({}, oChange);
86
86
  });
87
87
  };
@@ -91,7 +91,7 @@ sap.ui.define([
91
91
  *
92
92
  * @returns {string[]} Array with both design time and runtime registered changes
93
93
  */
94
- ChangeIndicatorRegistry.prototype.getRegisteredChangeIds = function () {
94
+ ChangeIndicatorRegistry.prototype.getRegisteredChangeIds = function() {
95
95
  return Object.keys(this._oRegisteredChanges || {});
96
96
  };
97
97
 
@@ -101,7 +101,7 @@ sap.ui.define([
101
101
  * @param {string} sChangeId - ID of the registered change
102
102
  * @returns {object} Registered change
103
103
  */
104
- ChangeIndicatorRegistry.prototype.getRegisteredChange = function (sChangeId) {
104
+ ChangeIndicatorRegistry.prototype.getRegisteredChange = function(sChangeId) {
105
105
  return this._oRegisteredChanges[sChangeId] && Object.assign({}, this._oRegisteredChanges[sChangeId]);
106
106
  };
107
107
 
@@ -111,11 +111,11 @@ sap.ui.define([
111
111
  *
112
112
  * @returns {object} List of selectors with change indicator data.
113
113
  */
114
- ChangeIndicatorRegistry.prototype.getSelectorsWithRegisteredChanges = function () {
114
+ ChangeIndicatorRegistry.prototype.getSelectorsWithRegisteredChanges = function() {
115
115
  var oChangeIndicators = {};
116
116
  var sPreviousAffectedElementId;
117
117
 
118
- function addSelector (sSelectorId, sAffectedElementId, oChangeIndicatorData, bDependent) {
118
+ function addSelector(sSelectorId, sAffectedElementId, oChangeIndicatorData, bDependent) {
119
119
  if (oChangeIndicators[sSelectorId] === undefined) {
120
120
  oChangeIndicators[sSelectorId] = [];
121
121
  }
@@ -133,21 +133,21 @@ sap.ui.define([
133
133
  }
134
134
 
135
135
  values(this._oRegisteredChanges)
136
- .forEach(function (oChangeIndicatorData) {
137
- oChangeIndicatorData.visualizationInfo.displayElementIds
138
- .forEach(function (sId, iIndex) {
139
- addSelector(sId, oChangeIndicatorData.visualizationInfo.affectedElementIds[iIndex], oChangeIndicatorData, false);
140
- });
136
+ .forEach(function(oChangeIndicatorData) {
137
+ oChangeIndicatorData.visualizationInfo.displayElementIds
138
+ .forEach(function(sId, iIndex) {
139
+ addSelector(sId, oChangeIndicatorData.visualizationInfo.affectedElementIds[iIndex], oChangeIndicatorData, false);
141
140
  });
141
+ });
142
142
 
143
143
  return oChangeIndicators;
144
144
  };
145
145
 
146
- ChangeIndicatorRegistry.prototype.getRelevantChangesWithSelector = function () {
146
+ ChangeIndicatorRegistry.prototype.getRelevantChangesWithSelector = function() {
147
147
  var oSelectors = this.getSelectorsWithRegisteredChanges();
148
148
  var aRelevantChanges = [];
149
149
  Object.keys(oSelectors).forEach(function(sSelectorId) {
150
- var aRelevantChangesForSelector = oSelectors[sSelectorId].filter(function (oChange) {
150
+ var aRelevantChangesForSelector = oSelectors[sSelectorId].filter(function(oChange) {
151
151
  return !oChange.dependent;
152
152
  });
153
153
  aRelevantChanges = aRelevantChanges.concat(aRelevantChangesForSelector);
@@ -161,7 +161,7 @@ sap.ui.define([
161
161
  * @param {string} sSelectorId - ID of the indicator
162
162
  * @returns {object} Registered change indicator
163
163
  */
164
- ChangeIndicatorRegistry.prototype.getChangeIndicator = function (sSelectorId) {
164
+ ChangeIndicatorRegistry.prototype.getChangeIndicator = function(sSelectorId) {
165
165
  return this._oChangeIndicators[sSelectorId];
166
166
  };
167
167
 
@@ -170,7 +170,7 @@ sap.ui.define([
170
170
  *
171
171
  * @returns {object[]} Registered change indicators
172
172
  */
173
- ChangeIndicatorRegistry.prototype.getChangeIndicators = function () {
173
+ ChangeIndicatorRegistry.prototype.getChangeIndicators = function() {
174
174
  return values(this._oChangeIndicators || {});
175
175
  };
176
176
 
@@ -191,7 +191,7 @@ sap.ui.define([
191
191
  if (sCommandName === "settings" && includes(Object.keys(aCategories), mChangeVisualizationInfo.descriptionPayload.category)) {
192
192
  sChangeCategory = mChangeVisualizationInfo.descriptionPayload.category;
193
193
  } else {
194
- sChangeCategory = Object.keys(aCategories).find(function (sChangeCategoryName) {
194
+ sChangeCategory = Object.keys(aCategories).find(function(sChangeCategoryName) {
195
195
  return includes(aCategories[sChangeCategoryName], sCommandName);
196
196
  });
197
197
  if (!sChangeCategory) {
@@ -228,33 +228,33 @@ sap.ui.define([
228
228
  return undefined;
229
229
  }
230
230
  return aSelectorList
231
- .map(function(vSelector) {
232
- var oElement = typeof vSelector.getId === "function"
233
- ? vSelector
234
- : JsControlTreeModifier.bySelector(vSelector, oAppComponent);
235
- return oElement && oElement.getId();
236
- })
237
- .filter(Boolean);
231
+ .map(function(vSelector) {
232
+ var oElement = typeof vSelector.getId === "function"
233
+ ? vSelector
234
+ : JsControlTreeModifier.bySelector(vSelector, oAppComponent);
235
+ return oElement && oElement.getId();
236
+ })
237
+ .filter(Boolean);
238
238
  }
239
239
 
240
240
  return getInfoFromChangeHandler(oAppComponent, oChange)
241
- .then(function(oInfoFromChangeHandler) {
242
- var mVisualizationInfo = oInfoFromChangeHandler || {};
243
- var aChangeSelectors = oChange.getSelector && oChange.getSelector() && [oChange.getSelector()];
244
- var aAffectedElementSelectors = mVisualizationInfo.affectedControls || aChangeSelectors || [];
245
- // If there is an original selector (e.g. control is inside a template),
246
- // the indicator should be displayed on the host control (change selector)
247
- var oChangeOriginalSelector = oChange.getOriginalSelector && oChange.getOriginalSelector();
248
- var aDisplayElementSelectors = oChangeOriginalSelector ? aChangeSelectors : aAffectedElementSelectors;
241
+ .then(function(oInfoFromChangeHandler) {
242
+ var mVisualizationInfo = oInfoFromChangeHandler || {};
243
+ var aChangeSelectors = oChange.getSelector && oChange.getSelector() && [oChange.getSelector()];
244
+ var aAffectedElementSelectors = mVisualizationInfo.affectedControls || aChangeSelectors || [];
245
+ // If there is an original selector (e.g. control is inside a template),
246
+ // the indicator should be displayed on the host control (change selector)
247
+ var oChangeOriginalSelector = oChange.getOriginalSelector && oChange.getOriginalSelector();
248
+ var aDisplayElementSelectors = oChangeOriginalSelector ? aChangeSelectors : aAffectedElementSelectors;
249
249
 
250
- return {
251
- affectedElementIds: getSelectorIds(aAffectedElementSelectors),
252
- dependentElementIds: getSelectorIds(mVisualizationInfo.dependentControls) || [],
253
- displayElementIds: getSelectorIds(mVisualizationInfo.displayControls || getSelectorIds(aDisplayElementSelectors)),
254
- updateRequired: mVisualizationInfo.updateRequired,
255
- descriptionPayload: mVisualizationInfo.descriptionPayload || {}
256
- };
257
- });
250
+ return {
251
+ affectedElementIds: getSelectorIds(aAffectedElementSelectors),
252
+ dependentElementIds: getSelectorIds(mVisualizationInfo.dependentControls) || [],
253
+ displayElementIds: getSelectorIds(mVisualizationInfo.displayControls || getSelectorIds(aDisplayElementSelectors)),
254
+ updateRequired: mVisualizationInfo.updateRequired,
255
+ descriptionPayload: mVisualizationInfo.descriptionPayload || {}
256
+ };
257
+ });
258
258
  }
259
259
 
260
260
  function getInfoFromChangeHandler(oAppComponent, oChange) {
@@ -270,19 +270,19 @@ sap.ui.define([
270
270
  modifier: JsControlTreeModifier,
271
271
  layer: oChange.getLayer()
272
272
  })
273
- .then(function(oChangeHandler) {
274
- if (
275
- oChangeHandler && typeof oChangeHandler.getChangeVisualizationInfo === "function"
273
+ .then(function(oChangeHandler) {
274
+ if (
275
+ oChangeHandler && typeof oChangeHandler.getChangeVisualizationInfo === "function"
276
276
  && oChange.isSuccessfullyApplied && oChange.isSuccessfullyApplied()
277
- ) {
278
- return oChangeHandler.getChangeVisualizationInfo(oChange, oAppComponent);
279
- }
280
- return undefined;
281
- })
282
- .catch(function(vErr) {
283
- Log.error(vErr);
284
- return undefined;
285
- });
277
+ ) {
278
+ return oChangeHandler.getChangeVisualizationInfo(oChange, oAppComponent);
279
+ }
280
+ return undefined;
281
+ })
282
+ .catch(function(vErr) {
283
+ Log.error(vErr);
284
+ return undefined;
285
+ });
286
286
  }
287
287
 
288
288
  return Promise.resolve();
@@ -294,19 +294,19 @@ sap.ui.define([
294
294
  * @param {string} sSelectorId - The ID of the selector for which the change indicator is registered
295
295
  * @param {object} oChangeIndicator - The change indicator to register
296
296
  */
297
- ChangeIndicatorRegistry.prototype.registerChangeIndicator = function (sSelectorId, oChangeIndicator) {
297
+ ChangeIndicatorRegistry.prototype.registerChangeIndicator = function(sSelectorId, oChangeIndicator) {
298
298
  this._oChangeIndicators[sSelectorId] = oChangeIndicator;
299
299
  };
300
300
 
301
301
  /**
302
302
  * Resets the change and change indicator registries.
303
303
  */
304
- ChangeIndicatorRegistry.prototype.reset = function () {
305
- Object.keys(this._oRegisteredChanges).forEach(function (sKeyToRemove) {
304
+ ChangeIndicatorRegistry.prototype.reset = function() {
305
+ Object.keys(this._oRegisteredChanges).forEach(function(sKeyToRemove) {
306
306
  this.removeRegisteredChange(sKeyToRemove);
307
307
  }.bind(this));
308
308
 
309
- values(this._oChangeIndicators).forEach(function (oIndicator) {
309
+ values(this._oChangeIndicators).forEach(function(oIndicator) {
310
310
  oIndicator.destroy();
311
311
  });
312
312
  this._oChangeIndicators = {};
@@ -317,7 +317,7 @@ sap.ui.define([
317
317
  *
318
318
  * @param {string} sChangeId - ID of the registered change
319
319
  */
320
- ChangeIndicatorRegistry.prototype.removeRegisteredChange = function (sChangeId) {
320
+ ChangeIndicatorRegistry.prototype.removeRegisteredChange = function(sChangeId) {
321
321
  delete this._oRegisteredChanges[sChangeId];
322
322
  };
323
323
 
@@ -325,7 +325,7 @@ sap.ui.define([
325
325
  * Removes changes with the updateRequired flag from the registry so the change can be re-registered and
326
326
  * the visualizationInfo is updated => if an element has an unstable id this updates the id information in the registry (e.g simple forms)
327
327
  */
328
- ChangeIndicatorRegistry.prototype.removeOutdatedRegisteredChanges = function () {
328
+ ChangeIndicatorRegistry.prototype.removeOutdatedRegisteredChanges = function() {
329
329
  this.getAllRegisteredChanges().forEach(function(oChange) {
330
330
  if (oChange.visualizationInfo && oChange.visualizationInfo.updateRequired) {
331
331
  this.removeRegisteredChange(oChange.change.getId());
@@ -337,7 +337,7 @@ sap.ui.define([
337
337
  * Removes changes without any displayElementIds from the registry so the change can be re-registered and
338
338
  * the visualizationInfo is updated => if an element is inside a dialog which hasn't been opened yet
339
339
  */
340
- ChangeIndicatorRegistry.prototype.removeRegisteredChangesWithoutVizInfo = function () {
340
+ ChangeIndicatorRegistry.prototype.removeRegisteredChangesWithoutVizInfo = function() {
341
341
  this.getAllRegisteredChanges().forEach(function(oChange) {
342
342
  if (oChange.visualizationInfo && oChange.visualizationInfo.displayElementIds.length === 0) {
343
343
  this.removeRegisteredChange(oChange.change.getId());
@@ -59,6 +59,21 @@ sap.ui.define([
59
59
  return !oOverlay || !oOverlay.getDomRef() || !oOverlay.isVisible();
60
60
  }
61
61
 
62
+ function _determineElementOverlay(oElementId, oAffectedElementId) {
63
+ var oOverlay = OverlayRegistry.getOverlay(oElementId);
64
+ if (!oOverlay) {
65
+ // When the element has no Overlay, check if there is a relevant container Overlay
66
+ // e.g. change on a SmartForm group (Element: parent Form; Relevant Container: SmartForm)
67
+ var oElementOverlay = OverlayRegistry.getOverlay(oAffectedElementId);
68
+ var oRelevantContainer = oElementOverlay && oElementOverlay.getRelevantContainer();
69
+ if (oRelevantContainer) {
70
+ oOverlay = OverlayRegistry.getOverlay(oRelevantContainer);
71
+ }
72
+ }
73
+
74
+ return oOverlay;
75
+ }
76
+
62
77
  /**
63
78
  * @class
64
79
  * Root control for RTA change visualization.
@@ -67,7 +82,7 @@ sap.ui.define([
67
82
  * @alias sap.ui.rta.util.changeVisualization.ChangeVisualization
68
83
  * @author SAP SE
69
84
  * @since 1.84.0
70
- * @version 1.115.0
85
+ * @version 1.116.0
71
86
  * @private
72
87
  */
73
88
  var ChangeVisualization = Control.extend("sap.ui.rta.util.changeVisualization.ChangeVisualization", {
@@ -163,12 +178,12 @@ sap.ui.define([
163
178
  if (this.getProperty("rootControlId")) {
164
179
  this._oChangeIndicatorRegistry.reset();
165
180
  this._updateChangeRegistry()
166
- .then(function() {
167
- this._selectChangeCategory(this._sSelectedChangeCategory);
168
- this._selectChangeState(ChangeStates.ALL);
169
- this._updateVisualizationModelMenuData();
170
- oToolbar.setModel(this._oChangeVisualizationModel, "visualizationModel");
171
- }.bind(this));
181
+ .then(function() {
182
+ this._selectChangeCategory(this._sSelectedChangeCategory);
183
+ this._selectChangeState(ChangeStates.ALL);
184
+ this._updateVisualizationModelMenuData();
185
+ oToolbar.setModel(this._oChangeVisualizationModel, "visualizationModel");
186
+ }.bind(this));
172
187
  }
173
188
  };
174
189
 
@@ -176,7 +191,11 @@ sap.ui.define([
176
191
  this._oChangeIndicatorRegistry.reset();
177
192
  };
178
193
 
179
- ChangeVisualization.prototype._determineChangeVisibility = function(aRegisteredIndependentChanges, aAllRelevantChanges, sVisualizedChangeState) {
194
+ ChangeVisualization.prototype._determineChangeVisibility = function(
195
+ aRegisteredIndependentChanges,
196
+ aAllRelevantChanges,
197
+ sVisualizedChangeState
198
+ ) {
180
199
  function filterRelevantChanges(aChanges) {
181
200
  return aChanges.filter(function(oChange) {
182
201
  if (
@@ -201,7 +220,7 @@ sap.ui.define([
201
220
  return oChange.id;
202
221
  });
203
222
 
204
- aRegisteredIndependentChanges.forEach(function (oChange) {
223
+ aRegisteredIndependentChanges.forEach(function(oChange) {
205
224
  if (oChange.changeStates.includes(ChangeStates.DIRTY)) {
206
225
  bHasDraftChanges = true;
207
226
  bHasDirtyChanges = true;
@@ -209,7 +228,10 @@ sap.ui.define([
209
228
  bHasDraftChanges = true;
210
229
  }
211
230
 
212
- var oOverlay = OverlayRegistry.getOverlay(oChange.visualizationInfo.displayElementIds[0]);
231
+ var oOverlay = _determineElementOverlay(
232
+ oChange.visualizationInfo.displayElementIds[0],
233
+ oChange.visualizationInfo.affectedElementIds[0]
234
+ );
213
235
 
214
236
  if (!aAllRelevantChangeIds.includes(oChange.change.getId())) {
215
237
  aHiddenChanges.push(oChange);
@@ -266,7 +288,10 @@ sap.ui.define([
266
288
  aCommandData.unshift({
267
289
  key: ChangeCategories.ALL,
268
290
  count: this._getChangesForChangeCategory(ChangeCategories.ALL, oSortedChanges.relevantVisualizedChanges).length,
269
- title: this._getChangeCategoryLabel(ChangeCategories.ALL, this._getChangesForChangeCategory(ChangeCategories.ALL, oSortedChanges.relevantVisualizedChanges).length),
291
+ title: this._getChangeCategoryLabel(ChangeCategories.ALL, this._getChangesForChangeCategory(
292
+ ChangeCategories.ALL,
293
+ oSortedChanges.relevantVisualizedChanges
294
+ ).length),
270
295
  icon: ChangeCategories.getIconForCategory(ChangeCategories.ALL)
271
296
  });
272
297
 
@@ -313,18 +338,18 @@ sap.ui.define([
313
338
  id: this._getComponent().createId("changeVisualization_changesList"),
314
339
  controller: this
315
340
  })
316
- .then(function(oPopover) {
317
- this._oToolbarButton.addDependent(oPopover);
318
- oPopover.setModel(this._oChangeVisualizationModel, "visualizationModel");
319
- oPopover.openBy(this._oToolbarButton);
320
- this.setPopover(oPopover);
321
- //Currently required because of an binding issue from the control
322
- //At the first opening of the popover the controls don't get updated when the bound
323
- //model changes. With the reopening this Problem gets fixed
324
- //TODO Remove once control owners have fixed the issue
325
- oPopover.close();
326
- oPopover.openBy(this._oToolbarButton);
327
- }.bind(this));
341
+ .then(function(oPopover) {
342
+ this._oToolbarButton.addDependent(oPopover);
343
+ oPopover.setModel(this._oChangeVisualizationModel, "visualizationModel");
344
+ oPopover.openBy(this._oToolbarButton);
345
+ this.setPopover(oPopover);
346
+ // Currently required because of an binding issue from the control
347
+ // At the first opening of the popover the controls don't get updated when the bound
348
+ // model changes. With the reopening this Problem gets fixed
349
+ // TODO Remove once control owners have fixed the issue
350
+ oPopover.close();
351
+ oPopover.openBy(this._oToolbarButton);
352
+ }.bind(this));
328
353
  return;
329
354
  }
330
355
 
@@ -448,10 +473,10 @@ sap.ui.define([
448
473
  }
449
474
  var aRegisteredChangeIds = this._oChangeIndicatorRegistry.getRegisteredChangeIds();
450
475
  var oCurrentChanges = aChanges
451
- .reduce(function(oChanges, oChange) {
452
- oChanges[oChange.getId()] = oChange;
453
- return oChanges;
454
- }, {});
476
+ .reduce(function(oChanges, oChange) {
477
+ oChanges[oChange.getId()] = oChange;
478
+ return oChanges;
479
+ }, {});
455
480
  var aCurrentChangeIds = Object.keys(oCurrentChanges);
456
481
 
457
482
  // Remove registered changes which no longer exist
@@ -503,20 +528,8 @@ sap.ui.define([
503
528
  Object.keys(oSelectors).forEach(function(sSelectorId) {
504
529
  var aChangesOnIndicator = oSelectors[sSelectorId];
505
530
  var aRelevantChanges = this._filterRelevantChanges(oSelectors[sSelectorId]);
506
- var oOverlay = OverlayRegistry.getOverlay(sSelectorId);
507
- if (!oOverlay) {
508
- // When the selector has no Overlay, check if there is a relevant container Overlay
509
- // e.g. change on a SmartForm group (Selector: parent Form; Relevant Container: SmartForm)
510
- aChangesOnIndicator.some(function(oChange) {
511
- var oElementOverlay = OverlayRegistry.getOverlay(oChange.affectedElementId);
512
- var oRelevantContainer = oElementOverlay && oElementOverlay.getRelevantContainer();
513
- if (oRelevantContainer) {
514
- oOverlay = OverlayRegistry.getOverlay(oRelevantContainer);
515
- return true;
516
- }
517
- return false;
518
- });
519
- }
531
+ var oOverlay = _determineElementOverlay(sSelectorId, aChangesOnIndicator[0].affectedElementId);
532
+
520
533
  if (_isOverlayInvisible(oOverlay)) {
521
534
  // Change is not visible
522
535
  return undefined;
@@ -647,15 +660,15 @@ sap.ui.define([
647
660
  Core.applyChanges();
648
661
 
649
662
  var aVisibleIndicators = this._oChangeIndicatorRegistry.getChangeIndicators()
650
- .filter(function(oIndicator) {
651
- return oIndicator.getVisible();
652
- })
653
- .sort(function(oIndicator1, oIndicator2) {
654
- var iDeltaY = oIndicator1.getPosY() - oIndicator2.getPosY();
655
- var iDeltaX = oIndicator1.getPosX() - oIndicator2.getPosX();
656
- // Only consider x value if y is the same
657
- return iDeltaY || iDeltaX;
658
- });
663
+ .filter(function(oIndicator) {
664
+ return oIndicator.getVisible();
665
+ })
666
+ .sort(function(oIndicator1, oIndicator2) {
667
+ var iDeltaY = oIndicator1.getPosY() - oIndicator2.getPosY();
668
+ var iDeltaX = oIndicator1.getPosX() - oIndicator2.getPosX();
669
+ // Only consider x value if y is the same
670
+ return iDeltaY || iDeltaX;
671
+ });
659
672
 
660
673
  if (aVisibleIndicators.length === 0) {
661
674
  return;
@@ -678,7 +691,7 @@ sap.ui.define([
678
691
  }
679
692
  };
680
693
 
681
- ChangeVisualization.prototype._toggleRootOverlayClickHandler = function (bEnable) {
694
+ ChangeVisualization.prototype._toggleRootOverlayClickHandler = function(bEnable) {
682
695
  var oRootOverlayDomRef = this.oRootOverlay && this.oRootOverlay.getDomRef();
683
696
  if (oRootOverlayDomRef) {
684
697
  if (bEnable) {
@@ -732,15 +745,15 @@ sap.ui.define([
732
745
  this.setIsActive(true);
733
746
  // show all change visualizations at startup
734
747
  this._updateChangeRegistry()
735
- .then(function() {
736
- this._selectChangeCategory(this._sSelectedChangeCategory);
737
- // This is required to avoid flickering of the toolbar when switching
738
- // to visualization mode when the mode switcher is displayed as icons
739
- oToolbar.adjustToolbarSectionWidths();
740
-
741
- this._updateVisualizationModelMenuData();
742
- oToolbar.setModel(this._oChangeVisualizationModel, "visualizationModel");
743
- }.bind(this));
748
+ .then(function() {
749
+ this._selectChangeCategory(this._sSelectedChangeCategory);
750
+ // This is required to avoid flickering of the toolbar when switching
751
+ // to visualization mode when the mode switcher is displayed as icons
752
+ oToolbar.adjustToolbarSectionWidths();
753
+
754
+ this._updateVisualizationModelMenuData();
755
+ oToolbar.setModel(this._oChangeVisualizationModel, "visualizationModel");
756
+ }.bind(this));
744
757
  };
745
758
 
746
759
  return ChangeVisualization;
@@ -32,7 +32,7 @@ sap.ui.define([
32
32
  * @param {sap.ui.core.Component} mPropertyBag.appComponent - Application component
33
33
  * @returns {object} Map containing localized description text and tooltip
34
34
  */
35
- CombineVisualization.getDescription = function (mPayload, sLabel, mPropertyBag) {
35
+ CombineVisualization.getDescription = function(mPayload, sLabel, mPropertyBag) {
36
36
  var iOriginalSelectorCount = (mPayload.originalSelectors || []).length;
37
37
  if (iOriginalSelectorCount < 2) {
38
38
  // Fallback if no payload was provided
@@ -50,7 +50,7 @@ sap.ui.define([
50
50
 
51
51
  var oAppComponent = mPropertyBag.appComponent;
52
52
  var aOriginalSelectors = mPayload.originalSelectors;
53
- var aLabels = aOriginalSelectors.map(function (oSelector) {
53
+ var aLabels = aOriginalSelectors.map(function(oSelector) {
54
54
  var sId = JsControlTreeModifier.getControlIdBySelector(oSelector, oAppComponent);
55
55
  var oControl = Core.byId(sId);
56
56
  return oControl ? ElementUtil.getLabelForElement(oControl) : sId;
@@ -76,10 +76,10 @@ sap.ui.define([
76
76
  [aLabels.length]
77
77
  ),
78
78
  descriptionTooltip: aLabels
79
- .map(function(sLabel) {
80
- return "\"" + sLabel + "\"";
81
- })
82
- .join(",\n")
79
+ .map(function(sLabel) {
80
+ return "\"" + sLabel + "\"";
81
+ })
82
+ .join(",\n")
83
83
  };
84
84
  };
85
85
 
@@ -24,7 +24,7 @@ sap.ui.define([
24
24
  * @param {string} sLabel - Current element label
25
25
  * @returns {object} Map containing localized description text and tooltip
26
26
  */
27
- CreateContainerVisualization.getDescription = function (mPayload, sLabel) {
27
+ CreateContainerVisualization.getDescription = function(mPayload, sLabel) {
28
28
  var oRtaResourceBundle = Core.getLibraryResourceBundle("sap.ui.rta");
29
29
  var sElementLabel = mPayload.originalLabel || sLabel;
30
30
  var sShortenedElementLabel = ChangeVisualizationUtils.shortenString(sElementLabel);
@@ -23,7 +23,7 @@ sap.ui.define([
23
23
  * @param {string} sLabel - Current element label
24
24
  * @returns {object} Localized description text and button text
25
25
  */
26
- SplitVisualization.getDescription = function (mPayload, sLabel) {
26
+ SplitVisualization.getDescription = function(mPayload, sLabel) {
27
27
  var oRtaResourceBundle = Core.getLibraryResourceBundle("sap.ui.rta");
28
28
  var sDescriptionText = oRtaResourceBundle.getText("TXT_CHANGEVISUALIZATION_CHANGE_SPLIT", ChangeVisualizationUtils.shortenString(sLabel));
29
29
  var sDescriptionTooltip = oRtaResourceBundle.getText("TXT_CHANGEVISUALIZATION_CHANGE_SPLIT", sLabel);
@@ -8,7 +8,7 @@ sap.ui.define([
8
8
  "sap/ui/fl/Utils",
9
9
  "sap/ui/dt/ElementUtil",
10
10
  "sap/base/util/isPlainObject"
11
- ], function (
11
+ ], function(
12
12
  FlUtils,
13
13
  ElementUtil,
14
14
  isPlainObject
@@ -52,7 +52,7 @@ sap.ui.define([
52
52
 
53
53
  if (aStableElements.length > 0) {
54
54
  if (isCloneFromAggregationBinding(oElementOverlay.getElement())) {
55
- bUnstable = aStableElements.some(function (vStableElement) {
55
+ bUnstable = aStableElements.some(function(vStableElement) {
56
56
  var vControl;
57
57
  var oAppComponent;
58
58
  var bUnstable = false;
@@ -9,7 +9,7 @@ sap.ui.define([
9
9
  "sap/ui/layout/HorizontalLayout",
10
10
  "sap/m/Link",
11
11
  "sap/m/Text"
12
- ], function (
12
+ ], function(
13
13
  MessageBox,
14
14
  HorizontalLayout,
15
15
  Link,
@@ -45,7 +45,7 @@ sap.ui.define([
45
45
  function convertIntoControls(aSymbols) {
46
46
  var oLayout = new HorizontalLayout({
47
47
  allowWrapping: true,
48
- content: aSymbols.map(function (sSymbol) {
48
+ content: aSymbols.map(function(sSymbol) {
49
49
  if (isLink(sSymbol)) {
50
50
  var mLink = extractLink(sSymbol);
51
51
  return new Link({
@@ -72,7 +72,7 @@ sap.ui.define([
72
72
  var aSymbols = [sMessage];
73
73
  var aLinks = getLinks(sMessage);
74
74
 
75
- aLinks.forEach(function (sLink) {
75
+ aLinks.forEach(function(sLink) {
76
76
  var i = 0;
77
77
  while (i < aSymbols.length) {
78
78
  var sSymbol = aSymbols[i];
@@ -83,7 +83,7 @@ sap.ui.define([
83
83
  var aParts = sSymbol.split(sLink);
84
84
  var aInsert = [];
85
85
 
86
- aParts.forEach(function (sPart, iIndex, aOriginal) { // eslint-disable-line no-loop-func
86
+ aParts.forEach(function(sPart, iIndex, aOriginal) { // eslint-disable-line no-loop-func
87
87
  aInsert.push(sPart);
88
88
  if (iIndex !== aOriginal.length - 1) {
89
89
  aInsert.push(sLink);
@@ -99,7 +99,6 @@ sap.ui.define([
99
99
  return aSymbols;
100
100
  }
101
101
 
102
-
103
102
  /**
104
103
  * Displays sap.m.MessageBox and interprets markdown links in the messages.
105
104
  *
@@ -13,7 +13,7 @@ sap.ui.define([
13
13
  "sap/base/Log",
14
14
  "sap/ui/rta/Utils",
15
15
  "sap/ui/dt/Util"
16
- ], function (
16
+ ], function(
17
17
  FlUtils,
18
18
  MessageBox,
19
19
  ObjectPath,
@@ -24,7 +24,7 @@ sap.ui.define([
24
24
  DtUtil
25
25
  ) {
26
26
  "use strict";
27
- return function (oRta) {
27
+ return function(oRta) {
28
28
  var mMessageBoxShow = {};
29
29
  var aPendingOverlaysToValidate = [];
30
30
  var oComponent = FlUtils.getAppComponentForControl(oRta.getRootControlInstance());
@@ -88,7 +88,7 @@ sap.ui.define([
88
88
  var oElementOverlayCreated = oEvent.getParameters().elementOverlay;
89
89
  if (oRta.getMode() === "adaptation") {
90
90
  var oComponent = FlUtils.getAppComponentForControl(oRta.getRootControlInstance());
91
- DtUtil.waitForSynced(oRta._oDesignTime, function (oOverlay) {
91
+ DtUtil.waitForSynced(oRta._oDesignTime, function(oOverlay) {
92
92
  if (_isControlAvailable(oOverlay)) {
93
93
  _handleUnstableIds(oRta, oComponent, [oOverlay]);
94
94
  }
@@ -102,14 +102,14 @@ sap.ui.define([
102
102
  var aUnstableOverlays = validateStableIds(aElementOverlays, oComponent);
103
103
 
104
104
  if (aUnstableOverlays.length) {
105
- aUnstableOverlays.forEach(function (oElementOverlay) {
105
+ aUnstableOverlays.forEach(function(oElementOverlay) {
106
106
  Log.error("Control ID was generated dynamically by SAPUI5. To support SAPUI5 flexibility, a stable control ID is needed to assign the changes to.", oElementOverlay.getElement().getId());
107
107
  });
108
108
  _displayMessage(oRta, oComponent, "MSG_UNSTABLE_ID_FOUND", "ERROR", "HEADER_ERROR");
109
109
  }
110
110
  }
111
111
 
112
- oRta.attachEventOnce("stop", function () {
112
+ oRta.attachEventOnce("stop", function() {
113
113
  _setMessageBoxShow(oComponent.getId(), false);
114
114
  });
115
115