@openui5/sap.ui.rta 1.124.2 → 1.126.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 (161) hide show
  1. package/.reuse/dep5 +9 -4
  2. package/THIRDPARTY.txt +13 -6
  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 +1 -1
  7. package/src/sap/ui/rta/Utils.js +1 -1
  8. package/src/sap/ui/rta/appVariant/AppVariantManager.js +1 -1
  9. package/src/sap/ui/rta/appVariant/Utils.js +1 -1
  10. package/src/sap/ui/rta/appVariant/manageApps/webapp/controller/ManageApps.controller.js +3 -0
  11. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_sh.properties +3 -3
  12. package/src/sap/ui/rta/command/AddIFrame.js +1 -1
  13. package/src/sap/ui/rta/command/AddProperty.js +1 -1
  14. package/src/sap/ui/rta/command/AddXML.js +1 -1
  15. package/src/sap/ui/rta/command/AddXMLAtExtensionPoint.js +1 -1
  16. package/src/sap/ui/rta/command/AppDescriptorCommand.js +1 -1
  17. package/src/sap/ui/rta/command/BaseCommand.js +1 -1
  18. package/src/sap/ui/rta/command/BindProperty.js +1 -1
  19. package/src/sap/ui/rta/command/Combine.js +1 -1
  20. package/src/sap/ui/rta/command/CommandFactory.js +1 -1
  21. package/src/sap/ui/rta/command/CompositeCommand.js +1 -1
  22. package/src/sap/ui/rta/command/ControlVariantConfigure.js +1 -1
  23. package/src/sap/ui/rta/command/ControlVariantSave.js +1 -1
  24. package/src/sap/ui/rta/command/ControlVariantSaveAs.js +1 -1
  25. package/src/sap/ui/rta/command/ControlVariantSetTitle.js +1 -1
  26. package/src/sap/ui/rta/command/ControlVariantSwitch.js +1 -1
  27. package/src/sap/ui/rta/command/CreateContainer.js +1 -1
  28. package/src/sap/ui/rta/command/CustomAdd.js +1 -1
  29. package/src/sap/ui/rta/command/FlexCommand.js +1 -1
  30. package/src/sap/ui/rta/command/LREPSerializer.js +1 -1
  31. package/src/sap/ui/rta/command/LocalReset.js +1 -1
  32. package/src/sap/ui/rta/command/Move.js +1 -1
  33. package/src/sap/ui/rta/command/Property.js +1 -1
  34. package/src/sap/ui/rta/command/Remove.js +1 -1
  35. package/src/sap/ui/rta/command/Rename.js +1 -1
  36. package/src/sap/ui/rta/command/Resize.js +1 -1
  37. package/src/sap/ui/rta/command/Reveal.js +1 -1
  38. package/src/sap/ui/rta/command/Settings.js +1 -1
  39. package/src/sap/ui/rta/command/Split.js +1 -1
  40. package/src/sap/ui/rta/command/Stack.js +1 -1
  41. package/src/sap/ui/rta/command/appDescriptor/AddLibrary.js +1 -1
  42. package/src/sap/ui/rta/command/compVariant/CompVariantContent.js +1 -1
  43. package/src/sap/ui/rta/command/compVariant/CompVariantSaveAs.js +1 -1
  44. package/src/sap/ui/rta/command/compVariant/CompVariantSwitch.js +1 -1
  45. package/src/sap/ui/rta/command/compVariant/CompVariantUpdate.js +1 -1
  46. package/src/sap/ui/rta/enablement/elementActionTest.js +1 -1
  47. package/src/sap/ui/rta/library.js +2 -2
  48. package/src/sap/ui/rta/messagebundle_ar.properties +1 -0
  49. package/src/sap/ui/rta/messagebundle_bg.properties +1 -0
  50. package/src/sap/ui/rta/messagebundle_ca.properties +1 -0
  51. package/src/sap/ui/rta/messagebundle_cnr.properties +1 -0
  52. package/src/sap/ui/rta/messagebundle_cs.properties +1 -0
  53. package/src/sap/ui/rta/messagebundle_cy.properties +2 -1
  54. package/src/sap/ui/rta/messagebundle_da.properties +1 -0
  55. package/src/sap/ui/rta/messagebundle_de.properties +1 -0
  56. package/src/sap/ui/rta/messagebundle_el.properties +1 -0
  57. package/src/sap/ui/rta/messagebundle_en.properties +329 -2
  58. package/src/sap/ui/rta/messagebundle_en_GB.properties +1 -0
  59. package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +3 -2
  60. package/src/sap/ui/rta/messagebundle_es.properties +1 -0
  61. package/src/sap/ui/rta/messagebundle_es_MX.properties +1 -0
  62. package/src/sap/ui/rta/messagebundle_et.properties +1 -0
  63. package/src/sap/ui/rta/messagebundle_fi.properties +1 -0
  64. package/src/sap/ui/rta/messagebundle_fr.properties +1 -0
  65. package/src/sap/ui/rta/messagebundle_fr_CA.properties +1 -0
  66. package/src/sap/ui/rta/messagebundle_hi.properties +1 -0
  67. package/src/sap/ui/rta/messagebundle_hr.properties +1 -0
  68. package/src/sap/ui/rta/messagebundle_hu.properties +2 -1
  69. package/src/sap/ui/rta/messagebundle_id.properties +1 -0
  70. package/src/sap/ui/rta/messagebundle_it.properties +2 -1
  71. package/src/sap/ui/rta/messagebundle_iw.properties +1 -0
  72. package/src/sap/ui/rta/messagebundle_ja.properties +1 -0
  73. package/src/sap/ui/rta/messagebundle_kk.properties +1 -0
  74. package/src/sap/ui/rta/messagebundle_ko.properties +7 -6
  75. package/src/sap/ui/rta/messagebundle_lt.properties +1 -0
  76. package/src/sap/ui/rta/messagebundle_lv.properties +1 -0
  77. package/src/sap/ui/rta/messagebundle_mk.properties +1 -0
  78. package/src/sap/ui/rta/messagebundle_ms.properties +1 -0
  79. package/src/sap/ui/rta/messagebundle_nl.properties +1 -0
  80. package/src/sap/ui/rta/messagebundle_no.properties +1 -0
  81. package/src/sap/ui/rta/messagebundle_pl.properties +1 -0
  82. package/src/sap/ui/rta/messagebundle_pt.properties +1 -0
  83. package/src/sap/ui/rta/messagebundle_pt_PT.properties +1 -0
  84. package/src/sap/ui/rta/messagebundle_ro.properties +1 -0
  85. package/src/sap/ui/rta/messagebundle_ru.properties +1 -0
  86. package/src/sap/ui/rta/messagebundle_sh.properties +1 -0
  87. package/src/sap/ui/rta/messagebundle_sk.properties +1 -0
  88. package/src/sap/ui/rta/messagebundle_sl.properties +1 -0
  89. package/src/sap/ui/rta/messagebundle_sr.properties +1 -0
  90. package/src/sap/ui/rta/messagebundle_sv.properties +1 -0
  91. package/src/sap/ui/rta/messagebundle_th.properties +1 -0
  92. package/src/sap/ui/rta/messagebundle_tr.properties +1 -0
  93. package/src/sap/ui/rta/messagebundle_uk.properties +1 -0
  94. package/src/sap/ui/rta/messagebundle_vi.properties +1 -0
  95. package/src/sap/ui/rta/messagebundle_zh_CN.properties +1 -0
  96. package/src/sap/ui/rta/messagebundle_zh_TW.properties +1 -0
  97. package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +1 -1
  98. package/src/sap/ui/rta/plugin/BaseCreate.js +1 -1
  99. package/src/sap/ui/rta/plugin/Combine.js +1 -1
  100. package/src/sap/ui/rta/plugin/ControlVariant.js +16 -2
  101. package/src/sap/ui/rta/plugin/CreateContainer.js +1 -1
  102. package/src/sap/ui/rta/plugin/CutPaste.js +1 -1
  103. package/src/sap/ui/rta/plugin/DragDrop.js +1 -1
  104. package/src/sap/ui/rta/plugin/LocalReset.js +1 -1
  105. package/src/sap/ui/rta/plugin/Plugin.js +1 -1
  106. package/src/sap/ui/rta/plugin/RTAElementMover.js +1 -1
  107. package/src/sap/ui/rta/plugin/Remove.js +1 -1
  108. package/src/sap/ui/rta/plugin/Rename.js +1 -2
  109. package/src/sap/ui/rta/plugin/RenameHandler.js +19 -18
  110. package/src/sap/ui/rta/plugin/Resize.js +1 -1
  111. package/src/sap/ui/rta/plugin/Selection.js +1 -1
  112. package/src/sap/ui/rta/plugin/Settings.js +1 -1
  113. package/src/sap/ui/rta/plugin/Split.js +1 -1
  114. package/src/sap/ui/rta/plugin/Stretch.js +1 -1
  115. package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +1 -1
  116. package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +1 -1
  117. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +21 -5
  118. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +1 -1
  119. package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +1 -1
  120. package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +1 -1
  121. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.fragment.xml +12 -12
  122. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +1 -3
  123. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialogController.js +4 -0
  124. package/src/sap/ui/rta/service/Action.js +1 -1
  125. package/src/sap/ui/rta/service/ControllerExtension.js +1 -1
  126. package/src/sap/ui/rta/service/Outline.js +1 -1
  127. package/src/sap/ui/rta/service/Property.js +1 -1
  128. package/src/sap/ui/rta/service/Selection.js +1 -1
  129. package/src/sap/ui/rta/service/SupportTools.js +1 -1
  130. package/src/sap/ui/rta/themes/sap_hcb/base_AddIFrame.less +154 -0
  131. package/src/sap/ui/rta/themes/sap_hcb/base_ChangeVisualization.less +98 -0
  132. package/src/sap/ui/rta/themes/sap_hcb/base_ContextMenu.less +25 -0
  133. package/src/sap/ui/rta/themes/sap_hcb/base_Dialogs.less +79 -0
  134. package/src/sap/ui/rta/themes/sap_hcb/base_FieldRepository.less +48 -0
  135. package/src/sap/ui/rta/themes/sap_hcb/base_FlexSupportExtension.less +14 -0
  136. package/src/sap/ui/rta/themes/sap_hcb/base_MessageBox.less +10 -0
  137. package/src/sap/ui/rta/themes/sap_hcb/base_Overlay.less +271 -0
  138. package/src/sap/ui/rta/themes/sap_hcb/base_OverlayWithScrollbar.less +61 -0
  139. package/src/sap/ui/rta/themes/sap_hcb/base_Toolbar.adaptation.less +299 -0
  140. package/src/sap/ui/rta/themes/sap_hcb/base_Toolbar.base.less +42 -0
  141. package/src/sap/ui/rta/themes/sap_hcb/base_Toolbar.fiori.less +21 -0
  142. package/src/sap/ui/rta/themes/sap_hcb/base_Toolbar.standalone.less +12 -0
  143. package/src/sap/ui/rta/themes/sap_hcb/library.source.less +25 -1
  144. package/src/sap/ui/rta/toolbar/Adaptation.js +1 -1
  145. package/src/sap/ui/rta/toolbar/Base.js +1 -1
  146. package/src/sap/ui/rta/toolbar/Fiori.js +1 -1
  147. package/src/sap/ui/rta/toolbar/FioriLike.js +1 -1
  148. package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +1 -1
  149. package/src/sap/ui/rta/toolbar/Standalone.js +1 -1
  150. package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptation.js +1 -1
  151. package/src/sap/ui/rta/toolbar/translation/Translation.js +1 -1
  152. package/src/sap/ui/rta/toolbar/versioning/Versioning.js +1 -2
  153. package/src/sap/ui/rta/util/PluginManager.js +1 -1
  154. package/src/sap/ui/rta/util/PopupManager.js +1 -1
  155. package/src/sap/ui/rta/util/ReloadManager.js +1 -1
  156. package/src/sap/ui/rta/util/ServiceEventBus.js +1 -1
  157. package/src/sap/ui/rta/util/ServiceManager.js +1 -1
  158. package/src/sap/ui/rta/util/adaptationStarter.js +16 -6
  159. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +1 -1
  160. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +1 -1
  161. package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +1 -1
@@ -49,7 +49,7 @@ sap.ui.define([
49
49
  * @class
50
50
  * @extends sap.ui.rta.plugin.Plugin
51
51
  * @author SAP SE
52
- * @version 1.124.2
52
+ * @version 1.126.0
53
53
  * @constructor
54
54
  * @private
55
55
  * @since 1.78
@@ -25,7 +25,7 @@ sap.ui.define([
25
25
  * @class The BaseCreate allows trigger BaseCreate operations on the overlay.
26
26
  * @extends sap.ui.rta.plugin.Plugin
27
27
  * @author SAP SE
28
- * @version 1.124.2
28
+ * @version 1.126.0
29
29
  * @constructor
30
30
  * @private
31
31
  * @since 1.75
@@ -25,7 +25,7 @@ sap.ui.define([
25
25
  * @class
26
26
  * @extends sap.ui.rta.plugin.Plugin
27
27
  * @author SAP SE
28
- * @version 1.124.2
28
+ * @version 1.126.0
29
29
  * @constructor
30
30
  * @private
31
31
  * @since 1.46
@@ -51,7 +51,7 @@ sap.ui.define([
51
51
  * @class The ControlVariant allows propagation of variantManagement key
52
52
  * @extends sap.ui.rta.plugin.Plugin
53
53
  * @author SAP SE
54
- * @version 1.124.2
54
+ * @version 1.126.0
55
55
  * @constructor
56
56
  * @private
57
57
  * @since 1.50
@@ -140,7 +140,21 @@ sap.ui.define([
140
140
  var oVariantManagementTargetElement = sVariantManagementTargetElement instanceof ManagedObject
141
141
  ? sVariantManagementTargetElement : Element.getElementById(sVariantManagementTargetElement);
142
142
  var oVariantManagementTargetOverlay = OverlayRegistry.getOverlay(oVariantManagementTargetElement);
143
- this._propagateVariantManagement(oVariantManagementTargetOverlay, sVariantManagementReference);
143
+
144
+ // the control or overlay might not be available on rta start (e.g. dialog or view hidden by navigation)
145
+ if (!oVariantManagementTargetOverlay) {
146
+ const fnEventHandler = (oEvent, sVMTargetElementId) => {
147
+ const oCreatedOverlay = oEvent.getParameter("elementOverlay");
148
+ if (oCreatedOverlay.getElement().getId() === sVMTargetElementId) {
149
+ this._propagateVariantManagement(oCreatedOverlay, sVariantManagementReference);
150
+ this.getDesignTime().detachEvent("elementOverlayCreated", fnEventHandler);
151
+ }
152
+ };
153
+
154
+ this.getDesignTime().attachEvent("elementOverlayCreated", sVariantManagementTargetElement, fnEventHandler, this);
155
+ } else {
156
+ this._propagateVariantManagement(oVariantManagementTargetOverlay, sVariantManagementReference);
157
+ }
144
158
  }.bind(this));
145
159
  oOverlay.attachEvent("editableChange", RenameHandler._manageClickEvent, this);
146
160
  destroyManageDialog(oOverlay);
@@ -25,7 +25,7 @@ sap.ui.define([
25
25
  * @class The CreateContainer allows trigger CreateContainer operations on the overlay
26
26
  * @extends sap.ui.rta.plugin.BaseCreate
27
27
  * @author SAP SE
28
- * @version 1.124.2
28
+ * @version 1.126.0
29
29
  * @constructor
30
30
  * @private
31
31
  * @since 1.34
@@ -32,7 +32,7 @@ sap.ui.define([
32
32
  * @extends sap.ui.dt.plugin.CutPaste
33
33
  *
34
34
  * @author SAP SE
35
- * @version 1.124.2
35
+ * @version 1.126.0
36
36
  *
37
37
  * @constructor
38
38
  * @private
@@ -33,7 +33,7 @@ function(
33
33
  * @extends sap.ui.dt.plugin.ControlDragDrop
34
34
  *
35
35
  * @author SAP SE
36
- * @version 1.124.2
36
+ * @version 1.126.0
37
37
  *
38
38
  * @constructor
39
39
  * @private
@@ -41,7 +41,7 @@ sap.ui.define([
41
41
  * @class
42
42
  * @extends sap.ui.rta.plugin.Plugin
43
43
  * @author SAP SE
44
- * @version 1.124.2
44
+ * @version 1.126.0
45
45
  * @constructor
46
46
  * @private
47
47
  * @since 1.90
@@ -70,7 +70,7 @@ sap.ui.define([
70
70
  * @extends sap.ui.dt.Plugin
71
71
  *
72
72
  * @author SAP SE
73
- * @version 1.124.2
73
+ * @version 1.126.0
74
74
  *
75
75
  * @constructor
76
76
  * @private
@@ -35,7 +35,7 @@ function(
35
35
  * The RTAElementMover is responsible for the RTA specific adaptation of element movements.
36
36
  *
37
37
  * @author SAP SE
38
- * @version 1.124.2
38
+ * @version 1.126.0
39
39
  *
40
40
  * @constructor
41
41
  * @private
@@ -29,7 +29,7 @@ sap.ui.define([
29
29
  * @class The Remove allows trigger remove operations on the overlay
30
30
  * @extends sap.ui.rta.plugin.Plugin
31
31
  * @author SAP SE
32
- * @version 1.124.2
32
+ * @version 1.126.0
33
33
  * @constructor
34
34
  * @private
35
35
  * @since 1.34
@@ -28,7 +28,7 @@ sap.ui.define([
28
28
  * @extends sap.ui.rta.plugin.Plugin
29
29
  *
30
30
  * @author SAP SE
31
- * @version 1.124.2
31
+ * @version 1.126.0
32
32
  *
33
33
  * @constructor
34
34
  * @private
@@ -204,7 +204,6 @@ sap.ui.define([
204
204
  Rename.prototype._emitLabelChangeEvent = function() {
205
205
  var sText = RenameHandler._getCurrentEditableFieldText.call(this);
206
206
  this._fnSetControlText(sText);
207
-
208
207
  return this.createRenameCommand(this._oEditedOverlay, sText);
209
208
  };
210
209
 
@@ -43,7 +43,7 @@ sap.ui.define([
43
43
  * Provides Rename handling functionality
44
44
  *
45
45
  * @author SAP SE
46
- * @version 1.124.2
46
+ * @version 1.126.0
47
47
  *
48
48
  * @constructor
49
49
  * @private
@@ -368,10 +368,15 @@ sap.ui.define([
368
368
  },
369
369
 
370
370
  _onEditableFieldBlur(oEvent) {
371
- return RenameHandler._handlePostRename.call(this, false, oEvent);
371
+ // Destroying the overlay (or removing it from a parent) also triggers a "blur" event
372
+ // coming from the remove() call, but we should not react on it
373
+ if (!this._oEditedOverlay.isDestroyStarted() && this._oEditedOverlay.getParentElementOverlay()) {
374
+ RenameHandler._handlePostRename.call(this, false, oEvent);
375
+ }
372
376
  },
373
377
 
374
- _handlePostRename(bRestoreFocus, oEvent) {
378
+ async _handlePostRename(bRestoreFocus, oEvent) {
379
+ let fnErrorHandler;
375
380
  if (!this._bBlurOrKeyDownStarted) {
376
381
  this._oEditedOverlay.removeStyleClass(RenameHandler.errorStyleClass);
377
382
  this._bBlurOrKeyDownStarted = true;
@@ -379,27 +384,24 @@ sap.ui.define([
379
384
  RenameHandler._preventDefault.call(this, oEvent);
380
385
  RenameHandler._stopPropagation.call(this, oEvent);
381
386
  }
382
- return Promise.resolve()
383
- .then(RenameHandler._validateNewText.bind(this))
384
- .then(this._emitLabelChangeEvent.bind(this))
385
- .catch(function(oError) {
386
- if (oError.message === "sameTextError") {
387
- return;
387
+ try {
388
+ try {
389
+ RenameHandler._validateNewText.call(this);
390
+ fnErrorHandler = await this._emitLabelChangeEvent();
391
+ } catch (oError) {
392
+ if (oError.message !== "sameTextError") {
393
+ throw oError;
394
+ }
388
395
  }
389
- throw oError;
390
- })
391
- .then(function(fnErrorHandler) {
392
396
  this.stopEdit(bRestoreFocus);
393
397
  // ControlVariant rename handles the validation itself
394
398
  if (typeof fnErrorHandler === "function") {
395
399
  fnErrorHandler(); // contains startEdit()
396
400
  }
397
- }.bind(this))
398
- .catch(function(oError) {
399
- return RenameHandler._handleInvalidRename.call(this, oError.message, bRestoreFocus);
400
- }.bind(this));
401
+ } catch (oError) {
402
+ await RenameHandler._handleInvalidRename.call(this, oError.message, bRestoreFocus);
403
+ }
401
404
  }
402
- return Promise.resolve();
403
405
  },
404
406
 
405
407
  _handleInvalidRename(sErrorMessage, bRestoreFocus) {
@@ -419,7 +421,6 @@ sap.ui.define([
419
421
  var oResponsibleOverlay = this.getResponsibleElementOverlay(this._oEditedOverlay);
420
422
  var oRenameAction = this.getAction(oResponsibleOverlay);
421
423
  var sNewText = RenameHandler._getCurrentEditableFieldText.call(this);
422
-
423
424
  validateText(sNewText, this.getOldValue(), oRenameAction);
424
425
  },
425
426
 
@@ -27,7 +27,7 @@ sap.ui.define([
27
27
  * @class
28
28
  * @extends sap.ui.rta.plugin.Plugin
29
29
  * @author SAP SE
30
- * @version 1.124.2
30
+ * @version 1.126.0
31
31
  * @constructor
32
32
  * @private
33
33
  * @since 1.101
@@ -31,7 +31,7 @@ sap.ui.define([
31
31
  * @class The Selection plugin allows you to select or focus overlays with mouse or keyboard and navigate to others.
32
32
  * @extends sap.ui.rta.plugin.Plugin
33
33
  * @author SAP SE
34
- * @version 1.124.2
34
+ * @version 1.126.0
35
35
  * @constructor
36
36
  * @private
37
37
  * @since 1.34
@@ -25,7 +25,7 @@ sap.ui.define([
25
25
  * @class The Settings allows trigger change of settings operations on the overlay
26
26
  * @extends sap.ui.rta.plugin.Plugin
27
27
  * @author SAP SE
28
- * @version 1.124.2
28
+ * @version 1.126.0
29
29
  * @constructor
30
30
  * @private
31
31
  * @since 1.44
@@ -23,7 +23,7 @@ sap.ui.define([
23
23
  * @class
24
24
  * @extends sap.ui.rta.plugin.Plugin
25
25
  * @author SAP SE
26
- * @version 1.124.2
26
+ * @version 1.126.0
27
27
  * @constructor
28
28
  * @private
29
29
  * @since 1.46
@@ -29,7 +29,7 @@ sap.ui.define([
29
29
  * @extends sap.ui.rta.plugin.Plugin
30
30
  *
31
31
  * @author SAP SE
32
- * @version 1.124.2
32
+ * @version 1.126.0
33
33
  *
34
34
  * @constructor
35
35
  * @private
@@ -34,7 +34,7 @@ sap.ui.define([
34
34
  * handled by the AdditionalElements Plugin (Reveal, Add Via Delegate, Add Custom)
35
35
  *
36
36
  * @author SAP SE
37
- * @version 1.124.2
37
+ * @version 1.126.0
38
38
  * @private
39
39
  * @since 1.94
40
40
  */
@@ -34,7 +34,7 @@ sap.ui.define([
34
34
  * @class Context - Dialog for available Fields in Runtime Authoring
35
35
  * @extends sap.ui.base.ManagedObject
36
36
  * @author SAP SE
37
- * @version 1.124.2
37
+ * @version 1.126.0
38
38
  * @constructor
39
39
  * @private
40
40
  * @since 1.44
@@ -119,7 +119,7 @@ sap.ui.define([
119
119
  * @class The plugin allows to add additional elements that exist either hidden in the UI or in the OData service
120
120
  * @extends sap.ui.rta.plugin.Plugin
121
121
  * @author SAP SE
122
- * @version 1.124.2
122
+ * @version 1.126.0
123
123
  * @constructor
124
124
  * @private
125
125
  * @since 1.44
@@ -508,7 +508,10 @@ sap.ui.define([
508
508
  var bHasSiblings = aElementsWithAggregations[1].length > 0;
509
509
  var bIsAvailableForChildren = this.isAvailable(aElementOverlays, false);
510
510
  var bIsAvailableForSibling = this.isAvailable(aElementOverlays, true);
511
- if (bIsAvailableForSibling && (!bIsAvailableForChildren || !bHasChildren)) {
511
+ if (
512
+ bIsAvailableForSibling
513
+ && (!bIsAvailableForChildren || !bHasChildren)
514
+ ) {
512
515
  // Case 1: Only siblings -> No submenu required
513
516
  oMenuItem = this._buildMenuItem(
514
517
  "CTX_ADD_ELEMENTS_AS_SIBLING",
@@ -517,7 +520,11 @@ sap.ui.define([
517
520
  aElementsWithAggregations,
518
521
  false
519
522
  );
520
- } else if (!bIsAvailableForSibling && bIsAvailableForChildren && !bHasMultipleAggregations) {
523
+ } else if (
524
+ bIsAvailableForChildren
525
+ && (!bIsAvailableForSibling || !bHasSiblings)
526
+ && !bHasMultipleAggregations
527
+ ) {
521
528
  // Case 2: Only children, one aggregation -> No submenu required
522
529
  oMenuItem = this._buildMenuItem(
523
530
  "CTX_ADD_ELEMENTS_AS_CHILD",
@@ -526,7 +533,11 @@ sap.ui.define([
526
533
  aElementsWithAggregations,
527
534
  false
528
535
  );
529
- } else if (!bIsAvailableForSibling && bIsAvailableForChildren && bHasMultipleAggregations) {
536
+ } else if (
537
+ bIsAvailableForChildren
538
+ && (!bIsAvailableForSibling || !bHasSiblings)
539
+ && bHasMultipleAggregations
540
+ ) {
530
541
  // Case 3: Only children, multiple aggregations -> Submenu required
531
542
  oMenuItem = this._buildMenuItem(
532
543
  "CTX_ADD_ELEMENTS_AS_CHILD",
@@ -535,7 +546,12 @@ sap.ui.define([
535
546
  aElementsWithAggregations,
536
547
  true
537
548
  );
538
- } else if (bIsAvailableForChildren && bIsAvailableForSibling && bHasChildren && bHasSiblings) {
549
+ } else if (
550
+ bIsAvailableForChildren
551
+ && bIsAvailableForSibling
552
+ && bHasChildren
553
+ && bHasSiblings
554
+ ) {
539
555
  // Case 4: Children and siblings -> Submenu required
540
556
  oMenuItem = this._buildMenuItem(
541
557
  "CTX_ADD_ELEMENTS_CHILD_AND_SIBLING",
@@ -17,7 +17,7 @@ sap.ui.define([
17
17
  * Helper object containing methods for the AdditionalElements plugin
18
18
  *
19
19
  * @author SAP SE
20
- * @version 1.124.2
20
+ * @version 1.126.0
21
21
  * @private
22
22
  * @since 1.94
23
23
  */
@@ -25,7 +25,7 @@ sap.ui.define([
25
25
  * Helper object to build the RTA commands resulting from the AdditionalElements Plugin
26
26
  *
27
27
  * @author SAP SE
28
- * @version 1.124.2
28
+ * @version 1.126.0
29
29
  * @private
30
30
  * @since 1.94
31
31
  */
@@ -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.124.2
122
+ * @version 1.126.0
123
123
  * @constructor
124
124
  * @private
125
125
  * @since 1.75
@@ -308,37 +308,37 @@
308
308
  customTextOff=" "
309
309
  state="{dialogInfo>/advancedSettings/value/allowForms}" />
310
310
  </form:FormElement>
311
- <form:FormElement label="allow-popups">
311
+ <form:FormElement label="allow-scripts">
312
312
  <Switch
313
313
  change="onSwitchChange"
314
- id="sapUiRtaAddIFrameDialog_allowPopupsSwitch"
314
+ id="sapUiRtaAddIFrameDialog_allowScriptsSwitch"
315
315
  customTextOn=" "
316
316
  customTextOff=" "
317
- state="{dialogInfo>/advancedSettings/value/allowPopups}" />
317
+ state="{dialogInfo>/advancedSettings/value/allowScripts}" />
318
318
  </form:FormElement>
319
- <form:FormElement label="allow-scripts">
319
+ <form:FormElement label="allow-same-origin">
320
320
  <Switch
321
321
  change="onSwitchChange"
322
- id="sapUiRtaAddIFrameDialog_allowScriptsSwitch"
322
+ id="sapUiRtaAddIFrameDialog_allowSameOriginSwitch"
323
323
  customTextOn=" "
324
324
  customTextOff=" "
325
- state="{dialogInfo>/advancedSettings/value/allowScripts}" />
325
+ state="{dialogInfo>/advancedSettings/value/allowSameOrigin}" />
326
326
  </form:FormElement>
327
- <form:FormElement label="allow-modals">
327
+ <form:FormElement label="allow-popups">
328
328
  <Switch
329
329
  change="onSwitchChange"
330
- id="sapUiRtaAddIFrameDialog_allowModalsSwitch"
330
+ id="sapUiRtaAddIFrameDialog_allowPopupsSwitch"
331
331
  customTextOn=" "
332
332
  customTextOff=" "
333
- state="{dialogInfo>/advancedSettings/value/allowModals}" />
333
+ state="{dialogInfo>/advancedSettings/value/allowPopups}" />
334
334
  </form:FormElement>
335
- <form:FormElement label="allow-same-origin">
335
+ <form:FormElement label="allow-modals">
336
336
  <Switch
337
337
  change="onSwitchChange"
338
- id="sapUiRtaAddIFrameDialog_allowSameOriginSwitch"
338
+ id="sapUiRtaAddIFrameDialog_allowModalsSwitch"
339
339
  customTextOn=" "
340
340
  customTextOff=" "
341
- state="{dialogInfo>/advancedSettings/value/allowSameOrigin}" />
341
+ state="{dialogInfo>/advancedSettings/value/allowModals}" />
342
342
  </form:FormElement>
343
343
  </form:FormContainer>
344
344
  <form:FormContainer>
@@ -140,9 +140,7 @@ sap.ui.define([
140
140
  advancedSettings: {
141
141
  value: {
142
142
  allowForms: true,
143
- allowPopups: true,
144
143
  allowScripts: true,
145
- allowModals: true,
146
144
  allowSameOrigin: true,
147
145
  additionalSandboxParameters: [],
148
146
  ...oAdvancedSettings
@@ -160,7 +158,7 @@ sap.ui.define([
160
158
  * @class Context - Dialog for IFrame settings in Runtime Authoring
161
159
  * @extends sap.ui.base.ManagedObject
162
160
  * @author SAP SE
163
- * @version 1.124.2
161
+ * @version 1.126.0
164
162
  * @constructor
165
163
  * @private
166
164
  * @since 1.78
@@ -345,6 +345,10 @@ sap.ui.define([
345
345
  Object.keys(mSettings).forEach(function(sFieldName) {
346
346
  if (sFieldName === "frameWidth" || sFieldName === "frameHeight") {
347
347
  this._importIFrameSize(sFieldName, mSettings[sFieldName]);
348
+ // legacy iframes do not have advancedSettings properties so we need to skip the setProperty
349
+ // on the json model to not overwrite the default values with undefined
350
+ } else if (sFieldName === "advancedSettings" && !mSettings[sFieldName]) {
351
+ return;
348
352
  } else {
349
353
  this._oJSONModel.setProperty(`/${sFieldName}/value`, mSettings[sFieldName]);
350
354
  }
@@ -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.124.2
27
+ * @version 1.126.0
28
28
  * @private
29
29
  * @ui5-restricted
30
30
  *
@@ -32,7 +32,7 @@ sap.ui.define([
32
32
  * @name sap.ui.rta.service.ControllerExtension
33
33
  * @author SAP SE
34
34
  * @since 1.58
35
- * @version 1.124.2
35
+ * @version 1.126.0
36
36
  * @private
37
37
  * @ui5-restricted
38
38
  */
@@ -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.124.2
46
+ * @version 1.126.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.124.2
30
+ * @version 1.126.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.124.2
17
+ * @version 1.126.0
18
18
  * @private
19
19
  * @ui5-restricted
20
20
  */
@@ -28,7 +28,7 @@ sap.ui.define([
28
28
  * @name sap.ui.rta.service.SupportTools
29
29
  * @author SAP SE
30
30
  * @since 1.106
31
- * @version 1.124.2
31
+ * @version 1.126.0
32
32
  * @private
33
33
  * @ui5-restricted
34
34
  */