@openui5/sap.ui.rta 1.115.1 → 1.117.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 (178) 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 +256 -254
  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 +100 -103
  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 +28 -3
  28. package/src/sap/ui/rta/command/ControlVariantSave.js +1 -1
  29. package/src/sap/ui/rta/command/ControlVariantSaveAs.js +26 -24
  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 +20 -10
  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 +6 -1
  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 +188 -37
  141. package/src/sap/ui/rta/service/index.js +1 -1
  142. package/src/sap/ui/rta/themes/base/FlexSupportExtension.less +14 -0
  143. package/src/sap/ui/rta/themes/base/library.source.less +2 -1
  144. package/src/sap/ui/rta/toolbar/Adaptation.js +81 -26
  145. package/src/sap/ui/rta/toolbar/AdaptationRenderer.js +1 -1
  146. package/src/sap/ui/rta/toolbar/Base.js +17 -15
  147. package/src/sap/ui/rta/toolbar/BaseRenderer.js +1 -2
  148. package/src/sap/ui/rta/toolbar/Fiori.js +8 -8
  149. package/src/sap/ui/rta/toolbar/FioriLike.js +1 -1
  150. package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +4 -4
  151. package/src/sap/ui/rta/toolbar/Personalization.js +2 -2
  152. package/src/sap/ui/rta/toolbar/Standalone.js +1 -1
  153. package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptations.js +13 -6
  154. package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptationsDialog.fragment.xml +2 -8
  155. package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptation.js +2 -3
  156. package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptationDialog.fragment.xml +0 -2
  157. package/src/sap/ui/rta/toolbar/translation/Translation.js +41 -41
  158. package/src/sap/ui/rta/toolbar/versioning/Versioning.js +9 -9
  159. package/src/sap/ui/rta/util/Animation.js +5 -5
  160. package/src/sap/ui/rta/util/BindingsExtractor.js +33 -33
  161. package/src/sap/ui/rta/util/PluginManager.js +25 -25
  162. package/src/sap/ui/rta/util/PopupManager.js +27 -27
  163. package/src/sap/ui/rta/util/ReloadManager.js +1 -1
  164. package/src/sap/ui/rta/util/ServiceEventBus.js +3 -4
  165. package/src/sap/ui/rta/util/StylesLoader.js +9 -9
  166. package/src/sap/ui/rta/util/UrlParser.js +19 -19
  167. package/src/sap/ui/rta/util/adaptationStarter.js +34 -31
  168. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +23 -19
  169. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +61 -61
  170. package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +76 -63
  171. package/src/sap/ui/rta/util/changeVisualization/commands/CombineVisualization.js +6 -6
  172. package/src/sap/ui/rta/util/changeVisualization/commands/CreateContainerVisualization.js +1 -1
  173. package/src/sap/ui/rta/util/changeVisualization/commands/SplitVisualization.js +1 -1
  174. package/src/sap/ui/rta/util/hasStableId.js +2 -2
  175. package/src/sap/ui/rta/util/showMessageBox.js +4 -5
  176. package/src/sap/ui/rta/util/validateFlexEnabled.js +5 -5
  177. package/src/sap/ui/rta/util/validateStableIds.js +8 -8
  178. package/ui5.yaml +1 -1
@@ -7,12 +7,12 @@
7
7
  sap.ui.define([
8
8
  "sap/ui/core/Core",
9
9
  "sap/ui/core/Fragment",
10
+ "sap/base/util/isEmptyObject",
10
11
  "sap/base/util/restricted/_difference",
11
12
  "sap/base/util/deepEqual",
12
13
  "sap/ui/core/util/reflection/JsControlTreeModifier",
13
14
  "sap/ui/core/Control",
14
15
  "sap/ui/dt/OverlayRegistry",
15
- "sap/ui/dt/OverlayUtil",
16
16
  "sap/ui/dt/ElementUtil",
17
17
  "sap/ui/fl/write/api/PersistenceWriteAPI",
18
18
  "sap/ui/fl/Layer",
@@ -26,12 +26,12 @@ sap.ui.define([
26
26
  ], function(
27
27
  Core,
28
28
  Fragment,
29
+ isEmptyObject,
29
30
  difference,
30
31
  deepEqual,
31
32
  JsControlTreeModifier,
32
33
  Control,
33
34
  OverlayRegistry,
34
- OverlayUtil,
35
35
  ElementUtil,
36
36
  PersistenceWriteAPI,
37
37
  Layer,
@@ -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.1
85
+ * @version 1.117.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
 
@@ -381,7 +406,7 @@ sap.ui.define([
381
406
  return sCommand;
382
407
  }
383
408
 
384
- if (!oChange.getSelector || !oChange.getSelector()) {
409
+ if (!oChange.getSelector || !oChange.getSelector() || isEmptyObject(oChange.getSelector())) {
385
410
  return false;
386
411
  }
387
412
 
@@ -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
 
@@ -11,7 +11,7 @@ sap.ui.define([
11
11
  "sap/ui/core/Fragment",
12
12
  "sap/ui/dt/OverlayUtil",
13
13
  "sap/base/util/isPlainObject"
14
- ], function (
14
+ ], function(
15
15
  ObjectPath,
16
16
  hasStableId,
17
17
  View,
@@ -38,11 +38,11 @@ sap.ui.define([
38
38
  var aViewExtensions = [];
39
39
 
40
40
  if (isPlainObject(mViewExtensions)) {
41
- Object.keys(mViewExtensions).forEach(function (sViewExtensionGroupName) {
41
+ Object.keys(mViewExtensions).forEach(function(sViewExtensionGroupName) {
42
42
  if (sViewExtensionGroupName.startsWith("sap.suite.ui.generic.template")) {
43
43
  var mViewExtensionGroup = mViewExtensions[sViewExtensionGroupName];
44
44
 
45
- Object.keys(mViewExtensionGroup).forEach(function (sViewExtensionName) {
45
+ Object.keys(mViewExtensionGroup).forEach(function(sViewExtensionName) {
46
46
  aViewExtensions.push(mViewExtensionGroup[sViewExtensionName]);
47
47
  });
48
48
  }
@@ -58,7 +58,7 @@ sap.ui.define([
58
58
  for (var i = 0, l = aElementOverlays.length; i < l; i++) {
59
59
  var oElementOverlay = aElementOverlays[i];
60
60
  var oElement = oElementOverlay.getElement();
61
- var bIsExtensionOverlay = aExtensionList.some(function (mViewExtension) { // eslint-disable-line no-loop-func
61
+ var bIsExtensionOverlay = aExtensionList.some(function(mViewExtension) { // eslint-disable-line no-loop-func
62
62
  var ClassDeclaration = ObjectPath.get(mViewExtension.className);
63
63
  var sExtensionName;
64
64
  var sElementName;
@@ -91,8 +91,8 @@ sap.ui.define([
91
91
 
92
92
  var aRelevantOverlays = [];
93
93
 
94
- aExtensionOverlays.forEach(function (oElementOverlay) {
95
- OverlayUtil.iterateOverlayElementTree(oElementOverlay, function (oElementOverlay) {
94
+ aExtensionOverlays.forEach(function(oElementOverlay) {
95
+ OverlayUtil.iterateOverlayElementTree(oElementOverlay, function(oElementOverlay) {
96
96
  aRelevantOverlays.push(oElementOverlay);
97
97
  });
98
98
  });
@@ -100,7 +100,7 @@ sap.ui.define([
100
100
  return aRelevantOverlays;
101
101
  }
102
102
 
103
- return function (aElementOverlays, oComponent) {
103
+ return function(aElementOverlays, oComponent) {
104
104
  var aResult = [];
105
105
 
106
106
  var aRelevantOverlays = aElementOverlays.slice(0);
@@ -115,7 +115,7 @@ sap.ui.define([
115
115
  );
116
116
  }
117
117
 
118
- aResult = aRelevantOverlays.filter(function (oElementOverlay) {
118
+ aResult = aRelevantOverlays.filter(function(oElementOverlay) {
119
119
  return (
120
120
  !oElementOverlay.getDesignTimeMetadata().markedAsNotAdaptable()
121
121
  && !hasStableId(oElementOverlay)
package/ui5.yaml CHANGED
@@ -1,5 +1,5 @@
1
1
  ---
2
- specVersion: "2.0"
2
+ specVersion: "3.0"
3
3
  type: library
4
4
  metadata:
5
5
  name: sap.ui.rta