@openui5/sap.ui.rta 1.103.1 → 1.106.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 (167) hide show
  1. package/.reuse/dep5 +35 -15
  2. package/LICENSES/LicenseRef-tzdata-PublicDomain.txt +5 -0
  3. package/THIRDPARTY.txt +64 -21
  4. package/package.json +6 -6
  5. package/src/sap/ui/rta/.library +1 -1
  6. package/src/sap/ui/rta/Client.js +1 -1
  7. package/src/sap/ui/rta/RuntimeAuthoring.js +107 -418
  8. package/src/sap/ui/rta/Utils.js +2 -2
  9. package/src/sap/ui/rta/api/startAdaptation.js +2 -2
  10. package/src/sap/ui/rta/api/startKeyUserAdaptation.js +2 -2
  11. package/src/sap/ui/rta/appVariant/AppVariantManager.js +1 -1
  12. package/src/sap/ui/rta/appVariant/AppVariantUtils.js +6 -22
  13. package/src/sap/ui/rta/appVariant/Feature.js +4 -12
  14. package/src/sap/ui/rta/appVariant/manageApps/webapp/controller/ManageApps.controller.js +5 -3
  15. package/src/sap/ui/rta/command/AddIFrame.js +1 -1
  16. package/src/sap/ui/rta/command/AddProperty.js +1 -1
  17. package/src/sap/ui/rta/command/AddXML.js +1 -1
  18. package/src/sap/ui/rta/command/AddXMLAtExtensionPoint.js +1 -1
  19. package/src/sap/ui/rta/command/AppDescriptorCommand.js +8 -3
  20. package/src/sap/ui/rta/command/BaseCommand.js +1 -1
  21. package/src/sap/ui/rta/command/BindProperty.js +1 -1
  22. package/src/sap/ui/rta/command/Combine.js +1 -1
  23. package/src/sap/ui/rta/command/CommandFactory.js +1 -1
  24. package/src/sap/ui/rta/command/CompositeCommand.js +7 -5
  25. package/src/sap/ui/rta/command/ControlVariantConfigure.js +4 -2
  26. package/src/sap/ui/rta/command/ControlVariantSave.js +1 -1
  27. package/src/sap/ui/rta/command/ControlVariantSaveAs.js +5 -3
  28. package/src/sap/ui/rta/command/ControlVariantSetTitle.js +5 -4
  29. package/src/sap/ui/rta/command/ControlVariantSwitch.js +1 -1
  30. package/src/sap/ui/rta/command/CreateContainer.js +1 -1
  31. package/src/sap/ui/rta/command/CustomAdd.js +1 -1
  32. package/src/sap/ui/rta/command/FlexCommand.js +5 -3
  33. package/src/sap/ui/rta/command/LREPSerializer.js +11 -8
  34. package/src/sap/ui/rta/command/LocalReset.js +1 -1
  35. package/src/sap/ui/rta/command/Move.js +1 -1
  36. package/src/sap/ui/rta/command/Property.js +1 -1
  37. package/src/sap/ui/rta/command/Remove.js +1 -1
  38. package/src/sap/ui/rta/command/Rename.js +1 -1
  39. package/src/sap/ui/rta/command/Resize.js +1 -1
  40. package/src/sap/ui/rta/command/Reveal.js +1 -1
  41. package/src/sap/ui/rta/command/Settings.js +1 -1
  42. package/src/sap/ui/rta/command/Split.js +1 -1
  43. package/src/sap/ui/rta/command/Stack.js +17 -7
  44. package/src/sap/ui/rta/command/appDescriptor/AddLibrary.js +1 -1
  45. package/src/sap/ui/rta/command/compVariant/CompVariantContent.js +1 -1
  46. package/src/sap/ui/rta/command/compVariant/CompVariantSaveAs.js +6 -4
  47. package/src/sap/ui/rta/command/compVariant/CompVariantSwitch.js +1 -1
  48. package/src/sap/ui/rta/command/compVariant/CompVariantUpdate.js +6 -4
  49. package/src/sap/ui/rta/enablement/elementActionTest.js +89 -15
  50. package/src/sap/ui/rta/library.js +2 -2
  51. package/src/sap/ui/rta/messagebundle.properties +46 -11
  52. package/src/sap/ui/rta/messagebundle_ar.properties +24 -8
  53. package/src/sap/ui/rta/messagebundle_bg.properties +25 -9
  54. package/src/sap/ui/rta/messagebundle_ca.properties +25 -9
  55. package/src/sap/ui/rta/messagebundle_cs.properties +24 -8
  56. package/src/sap/ui/rta/messagebundle_cy.properties +22 -6
  57. package/src/sap/ui/rta/messagebundle_da.properties +26 -10
  58. package/src/sap/ui/rta/messagebundle_de.properties +27 -11
  59. package/src/sap/ui/rta/messagebundle_el.properties +25 -9
  60. package/src/sap/ui/rta/messagebundle_en.properties +26 -10
  61. package/src/sap/ui/rta/messagebundle_en_GB.properties +26 -10
  62. package/src/sap/ui/rta/messagebundle_en_US_sappsd.properties +30 -11
  63. package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +18 -1
  64. package/src/sap/ui/rta/messagebundle_en_US_saptrc.properties +27 -11
  65. package/src/sap/ui/rta/messagebundle_es.properties +22 -6
  66. package/src/sap/ui/rta/messagebundle_es_MX.properties +20 -4
  67. package/src/sap/ui/rta/messagebundle_et.properties +22 -6
  68. package/src/sap/ui/rta/messagebundle_fi.properties +26 -10
  69. package/src/sap/ui/rta/messagebundle_fr.properties +23 -7
  70. package/src/sap/ui/rta/messagebundle_fr_CA.properties +25 -9
  71. package/src/sap/ui/rta/messagebundle_hi.properties +25 -9
  72. package/src/sap/ui/rta/messagebundle_hr.properties +25 -9
  73. package/src/sap/ui/rta/messagebundle_hu.properties +18 -2
  74. package/src/sap/ui/rta/messagebundle_id.properties +24 -8
  75. package/src/sap/ui/rta/messagebundle_it.properties +25 -9
  76. package/src/sap/ui/rta/messagebundle_iw.properties +25 -9
  77. package/src/sap/ui/rta/messagebundle_ja.properties +25 -9
  78. package/src/sap/ui/rta/messagebundle_kk.properties +25 -9
  79. package/src/sap/ui/rta/messagebundle_ko.properties +25 -9
  80. package/src/sap/ui/rta/messagebundle_lt.properties +24 -8
  81. package/src/sap/ui/rta/messagebundle_lv.properties +22 -6
  82. package/src/sap/ui/rta/messagebundle_ms.properties +26 -10
  83. package/src/sap/ui/rta/messagebundle_nl.properties +26 -10
  84. package/src/sap/ui/rta/messagebundle_no.properties +25 -9
  85. package/src/sap/ui/rta/messagebundle_pl.properties +24 -8
  86. package/src/sap/ui/rta/messagebundle_pt.properties +25 -9
  87. package/src/sap/ui/rta/messagebundle_pt_PT.properties +24 -8
  88. package/src/sap/ui/rta/messagebundle_ro.properties +24 -8
  89. package/src/sap/ui/rta/messagebundle_ru.properties +25 -9
  90. package/src/sap/ui/rta/messagebundle_sh.properties +26 -10
  91. package/src/sap/ui/rta/messagebundle_sk.properties +24 -8
  92. package/src/sap/ui/rta/messagebundle_sl.properties +22 -6
  93. package/src/sap/ui/rta/messagebundle_sv.properties +26 -10
  94. package/src/sap/ui/rta/messagebundle_th.properties +28 -12
  95. package/src/sap/ui/rta/messagebundle_tr.properties +25 -9
  96. package/src/sap/ui/rta/messagebundle_uk.properties +26 -10
  97. package/src/sap/ui/rta/messagebundle_vi.properties +25 -9
  98. package/src/sap/ui/rta/messagebundle_zh_CN.properties +25 -9
  99. package/src/sap/ui/rta/messagebundle_zh_TW.properties +24 -8
  100. package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +2 -2
  101. package/src/sap/ui/rta/plugin/BaseCreate.js +2 -2
  102. package/src/sap/ui/rta/plugin/Combine.js +1 -1
  103. package/src/sap/ui/rta/plugin/CompVariant.js +10 -8
  104. package/src/sap/ui/rta/plugin/ControlVariant.js +21 -15
  105. package/src/sap/ui/rta/plugin/CreateContainer.js +9 -4
  106. package/src/sap/ui/rta/plugin/CutPaste.js +1 -1
  107. package/src/sap/ui/rta/plugin/DragDrop.js +1 -1
  108. package/src/sap/ui/rta/plugin/EasyAdd.js +3 -1
  109. package/src/sap/ui/rta/plugin/EasyRemove.js +3 -1
  110. package/src/sap/ui/rta/plugin/LocalReset.js +2 -2
  111. package/src/sap/ui/rta/plugin/Plugin.js +1 -1
  112. package/src/sap/ui/rta/plugin/RTAElementMover.js +1 -1
  113. package/src/sap/ui/rta/plugin/Remove.js +1 -1
  114. package/src/sap/ui/rta/plugin/Rename.js +3 -3
  115. package/src/sap/ui/rta/plugin/RenameHandler.js +23 -5
  116. package/src/sap/ui/rta/plugin/Resize.js +3 -3
  117. package/src/sap/ui/rta/plugin/Selection.js +12 -1
  118. package/src/sap/ui/rta/plugin/Settings.js +2 -2
  119. package/src/sap/ui/rta/plugin/Split.js +2 -2
  120. package/src/sap/ui/rta/plugin/Stretch.js +7 -3
  121. package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +1 -1
  122. package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +1 -1
  123. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js +14 -11
  124. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +9 -9
  125. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +1 -1
  126. package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +2 -2
  127. package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +3 -3
  128. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +1 -1
  129. package/src/sap/ui/rta/service/Action.js +1 -1
  130. package/src/sap/ui/rta/service/ControllerExtension.js +8 -9
  131. package/src/sap/ui/rta/service/Outline.js +1 -1
  132. package/src/sap/ui/rta/service/Property.js +1 -1
  133. package/src/sap/ui/rta/service/Selection.js +1 -1
  134. package/src/sap/ui/rta/service/SupportTools.js +189 -0
  135. package/src/sap/ui/rta/service/index.js +7 -6
  136. package/src/sap/ui/rta/themes/base/Toolbar.adaptation.less +19 -4
  137. package/src/sap/ui/rta/toolbar/Adaptation.fragment.xml +11 -1
  138. package/src/sap/ui/rta/toolbar/Adaptation.js +13 -4
  139. package/src/sap/ui/rta/toolbar/Base.js +8 -4
  140. package/src/sap/ui/rta/toolbar/Fiori.js +1 -1
  141. package/src/sap/ui/rta/toolbar/FioriLike.js +1 -1
  142. package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +1 -1
  143. package/src/sap/ui/rta/toolbar/Personalization.js +1 -1
  144. package/src/sap/ui/rta/toolbar/Standalone.js +1 -1
  145. package/src/sap/ui/rta/toolbar/contextBased/SaveAsContextBasedAdaptation.js +132 -0
  146. package/src/sap/ui/rta/toolbar/contextBased/SaveAsContextBasedAdaptationDialog.fragment.xml +79 -0
  147. package/src/sap/ui/rta/toolbar/translation/Translation.js +1 -5
  148. package/src/sap/ui/rta/toolbar/versioning/Versioning.js +1 -1
  149. package/src/sap/ui/rta/util/BindingsExtractor.js +89 -42
  150. package/src/sap/ui/rta/util/PluginManager.js +1 -1
  151. package/src/sap/ui/rta/util/PopupManager.js +1 -1
  152. package/src/sap/ui/rta/util/ReloadManager.js +331 -0
  153. package/src/sap/ui/rta/util/ServiceEventBus.js +1 -1
  154. package/src/sap/ui/rta/util/adaptationStarter.js +27 -12
  155. package/src/sap/ui/rta/util/changeVisualization/ChangeCategories.js +50 -0
  156. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +115 -63
  157. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorCategorySelection.fragment.xml +2 -2
  158. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorPopover.fragment.xml +2 -1
  159. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +143 -79
  160. package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +86 -180
  161. package/src/sap/ui/rta/util/changeVisualization/ChangeVisualizationUtils.js +2 -2
  162. package/src/sap/ui/rta/util/changeVisualization/commands/CombineVisualization.js +87 -0
  163. package/src/sap/ui/rta/util/changeVisualization/{categories → commands}/MoveVisualization.js +6 -4
  164. package/src/sap/ui/rta/util/changeVisualization/{categories → commands}/RenameVisualization.js +2 -2
  165. package/src/sap/ui/rta/util/changeVisualization/{categories → commands}/SplitVisualization.js +6 -4
  166. package/src/sap/ui/rta/util/changeVisualization/commands/getCommandVisualization.js +37 -0
  167. package/src/sap/ui/rta/util/changeVisualization/categories/getVisualizationCategory.js +0 -27
@@ -1,5 +1,5 @@
1
- /*
2
- * ! OpenUI5
1
+ /*!
2
+ * OpenUI5
3
3
  * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
4
4
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
5
  */
@@ -167,12 +167,14 @@ sap.ui.define([
167
167
  function changeContent(aOverlays) {
168
168
  var oControl = aOverlays[0].getElementInstance();
169
169
  var oAction = this.getAction(aOverlays[0]);
170
- oAction.handler(oControl, {styleClass: Utils.getRtaStyleClassName()}).then(function(aData) {
171
- createCommandAndFireEvent.call(this, aOverlays[0], "compVariantContent", {
172
- variantId: aData[0].changeSpecificData.content.key,
173
- newContent: aData[0].changeSpecificData.content.content,
174
- persistencyKey: aData[0].changeSpecificData.content.persistencyKey
175
- }, oControl.getVariantManagement());
170
+ return oAction.handler(oControl, {styleClass: Utils.getRtaStyleClassName()}).then(function(aData) {
171
+ if (aData && aData.length) {
172
+ createCommandAndFireEvent.call(this, aOverlays[0], "compVariantContent", {
173
+ variantId: aData[0].changeSpecificData.content.key,
174
+ newContent: aData[0].changeSpecificData.content.content,
175
+ persistencyKey: aData[0].changeSpecificData.content.persistencyKey
176
+ }, oControl.getVariantManagement());
177
+ }
176
178
  }.bind(this));
177
179
  }
178
180
 
@@ -43,7 +43,7 @@ sap.ui.define([
43
43
  * @class The ControlVariant allows propagation of variantManagement key
44
44
  * @extends sap.ui.rta.plugin.Plugin
45
45
  * @author SAP SE
46
- * @version 1.103.1
46
+ * @version 1.106.0
47
47
  * @constructor
48
48
  * @private
49
49
  * @since 1.50
@@ -484,6 +484,7 @@ sap.ui.define([
484
484
  /**
485
485
  * Opens a dialog for Variant configuration.
486
486
  * @param {sap.ui.dt.ElementOverlay[]} aElementOverlays - Target overlays
487
+ * @returns {Promise} Resolving when the dialog is closed and the command is created
487
488
  * @public
488
489
  */
489
490
  ControlVariant.prototype.configureVariants = function (aElementOverlays) {
@@ -494,7 +495,7 @@ sap.ui.define([
494
495
  var oDesignTimeMetadata = oElementOverlay.getDesignTimeMetadata();
495
496
  var mFlexSettings = this.getCommandFactory().getFlexSettings();
496
497
 
497
- oModel.manageVariants(
498
+ return oModel.manageVariants(
498
499
  oVariantManagementControl,
499
500
  sVariantManagementReference,
500
501
  mFlexSettings.layer,
@@ -502,22 +503,27 @@ sap.ui.define([
502
503
  ContextSharingAPI.createComponent(mFlexSettings)
503
504
  )
504
505
  .then(function(aConfiguredChanges) {
505
- return this.getCommandFactory().getCommandFor(
506
- oVariantManagementControl,
507
- "configure",
508
- {
509
- control: oVariantManagementControl,
510
- changes: aConfiguredChanges
511
- },
512
- oDesignTimeMetadata,
513
- sVariantManagementReference
514
- );
506
+ if (aConfiguredChanges.length > 0) {
507
+ return this.getCommandFactory().getCommandFor(
508
+ oVariantManagementControl,
509
+ "configure",
510
+ {
511
+ control: oVariantManagementControl,
512
+ changes: aConfiguredChanges
513
+ },
514
+ oDesignTimeMetadata,
515
+ sVariantManagementReference
516
+ );
517
+ }
518
+ return undefined;
515
519
  }.bind(this))
516
520
 
517
521
  .then(function(oConfigureCommand) {
518
- this.fireElementModified({
519
- command: oConfigureCommand
520
- });
522
+ if (oConfigureCommand) {
523
+ this.fireElementModified({
524
+ command: oConfigureCommand
525
+ });
526
+ }
521
527
  }.bind(this))
522
528
 
523
529
  .catch(function(oMessage) {
@@ -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.103.1
28
+ * @version 1.106.0
29
29
  * @constructor
30
30
  * @private
31
31
  * @since 1.34
@@ -48,7 +48,7 @@ sap.ui.define([
48
48
  * @return {boolean} Indicates if action is enabled
49
49
  * @override
50
50
  */
51
- CreateContainer.prototype.isEnabled = function(bSibling, aElementOverlays) {
51
+ CreateContainer.prototype.isEnabled = function(aElementOverlays, bSibling) {
52
52
  var oElementOverlay = aElementOverlays[0];
53
53
  var oAction = this.getCreateAction(bSibling, oElementOverlay);
54
54
  return this.isActionEnabled(oAction, bSibling, oElementOverlay);
@@ -118,13 +118,18 @@ sap.ui.define([
118
118
  var sPluginId = "CTX_CREATE_SIBLING_CONTAINER";
119
119
  var iRank = 40;
120
120
  var aMenuItems = [];
121
+
122
+ var isMenuItemEnabled = function (bOverlayIsSibling, aOverlays) {
123
+ return this.isEnabled(aOverlays, bOverlayIsSibling);
124
+ }.bind(this);
125
+
121
126
  for (var i = 0; i < 2; i++) {
122
- if (this.isAvailable(bOverlayIsSibling, aElementOverlays)) {
127
+ if (this.isAvailable(aElementOverlays, bOverlayIsSibling)) {
123
128
  aMenuItems.push({
124
129
  id: sPluginId,
125
130
  text: this.getCreateContainerText.bind(this, bOverlayIsSibling),
126
131
  handler: this.handleCreate.bind(this, bOverlayIsSibling, aElementOverlays[0]),
127
- enabled: this.isEnabled.bind(this, bOverlayIsSibling),
132
+ enabled: isMenuItemEnabled.bind(this, bOverlayIsSibling),
128
133
  icon: "sap-icon://add-folder",
129
134
  rank: iRank
130
135
  });
@@ -31,7 +31,7 @@ function(
31
31
  * @extends sap.ui.dt.plugin.CutPaste
32
32
  *
33
33
  * @author SAP SE
34
- * @version 1.103.1
34
+ * @version 1.106.0
35
35
  *
36
36
  * @constructor
37
37
  * @private
@@ -33,7 +33,7 @@ function(
33
33
  * @extends sap.ui.dt.plugin.ControlDragDrop
34
34
  *
35
35
  * @author SAP SE
36
- * @version 1.103.1
36
+ * @version 1.106.0
37
37
  *
38
38
  * @constructor
39
39
  * @private
@@ -25,7 +25,7 @@ sap.ui.define([
25
25
  * @class The EasyAdd Plugin adds an Icon to an Overlay, which allows to trigger add operations directly
26
26
  * @extends sap.ui.rta.plugin.additionalElements.AdditionalElementsPlugin
27
27
  * @author SAP SE
28
- * @version 1.103.1
28
+ * @version 1.106.0
29
29
  * @constructor
30
30
  * @private
31
31
  * @since 1.48
@@ -114,6 +114,8 @@ sap.ui.define([
114
114
  oOverlay.removeStyleClass("sapUiRtaPersAddTop");
115
115
  oControl.$("sectionsContainer").removeClass("sapUiRtaPaddingTop");
116
116
  }
117
+
118
+ AdditionalElementsPlugin.prototype.deregisterElementOverlay.apply(this, arguments);
117
119
  };
118
120
 
119
121
  /**
@@ -23,7 +23,7 @@ sap.ui.define([
23
23
  * @class The EasyRemove Plugin adds an Icon to an Overlay, which allows to trigger remove operations directly
24
24
  * @extends sap.ui.rta.plugin.Remove
25
25
  * @author SAP SE
26
- * @version 1.103.1
26
+ * @version 1.106.0
27
27
  * @constructor
28
28
  * @private
29
29
  * @since 1.48
@@ -125,6 +125,8 @@ sap.ui.define([
125
125
  oOverlay._oDeleteButton.destroy();
126
126
  }
127
127
  }
128
+
129
+ Remove.prototype.deregisterElementOverlay.apply(this, arguments);
128
130
  };
129
131
 
130
132
  return EasyRemove;
@@ -35,7 +35,7 @@ sap.ui.define([
35
35
  * @class
36
36
  * @extends sap.ui.rta.plugin.Plugin
37
37
  * @author SAP SE
38
- * @version 1.103.1
38
+ * @version 1.106.0
39
39
  * @constructor
40
40
  * @private
41
41
  * @since 1.90
@@ -170,7 +170,7 @@ sap.ui.define([
170
170
  throw DtUtil.propagateError(
171
171
  vError,
172
172
  "LocalReset#handler",
173
- "Error occured during handler execution",
173
+ "Error occurred during handler execution",
174
174
  "sap.ui.rta.plugin"
175
175
  );
176
176
  });
@@ -69,7 +69,7 @@ function(
69
69
  * @extends sap.ui.dt.Plugin
70
70
  *
71
71
  * @author SAP SE
72
- * @version 1.103.1
72
+ * @version 1.106.0
73
73
  *
74
74
  * @constructor
75
75
  * @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.103.1
38
+ * @version 1.106.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.103.1
32
+ * @version 1.106.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.103.1
31
+ * @version 1.106.0
32
32
  *
33
33
  * @constructor
34
34
  * @private
@@ -172,7 +172,7 @@ sap.ui.define([
172
172
  oOverlay.detachEvent("editableChange", RenameHandler._manageClickEvent, this);
173
173
  oOverlay.detachBrowserEvent("click", RenameHandler._onClick, this);
174
174
 
175
- this.removeFromPluginsList(oOverlay);
175
+ Plugin.prototype.deregisterElementOverlay.apply(this, arguments);
176
176
  };
177
177
 
178
178
  /**
@@ -200,7 +200,7 @@ sap.ui.define([
200
200
  }.bind(this))
201
201
 
202
202
  .catch(function(oError) {
203
- Log.error("Error during rename : ", oError);
203
+ Log.error("Error during rename: ", oError);
204
204
  });
205
205
  };
206
206
 
@@ -15,7 +15,8 @@ sap.ui.define([
15
15
  "sap/ui/dt/OverlayRegistry",
16
16
  "sap/ui/rta/Utils",
17
17
  "sap/ui/dt/DOMUtil",
18
- "sap/ui/events/KeyCodes"
18
+ "sap/ui/events/KeyCodes",
19
+ "sap/ui/dt/OverlayUtil"
19
20
  ], function(
20
21
  BindingParser,
21
22
  jQuery,
@@ -26,7 +27,8 @@ sap.ui.define([
26
27
  OverlayRegistry,
27
28
  Utils,
28
29
  DOMUtil,
29
- KeyCodes
30
+ KeyCodes,
31
+ OverlayUtil
30
32
  ) {
31
33
  "use strict";
32
34
 
@@ -55,7 +57,7 @@ sap.ui.define([
55
57
  * Provides Rename handling functionality
56
58
  *
57
59
  * @author SAP SE
58
- * @version 1.103.1
60
+ * @version 1.106.0
59
61
  *
60
62
  * @constructor
61
63
  * @private
@@ -89,6 +91,13 @@ sap.ui.define([
89
91
  }
90
92
  },
91
93
 
94
+ _setEditableFieldPosition: function() {
95
+ if (this._$editableField) {
96
+ this._$editableField.offset({left: this._$oEditableControlDomRef.offset().left});
97
+ this._$editableField.offset({top: this._$oEditableControlDomRef.offset().top});
98
+ }
99
+ },
100
+
92
101
  /**
93
102
  * @param {map} mPropertyBag - (required) contains required properties
94
103
  * @public
@@ -218,11 +227,17 @@ sap.ui.define([
218
227
 
219
228
  this._$oEditableControlDomRef.css("visibility", "hidden");
220
229
  _$oWrapper.offset({left: this._$oEditableControlDomRef.offset().left});
221
- this._$editableField.offset({left: this._$oEditableControlDomRef.offset().left});
222
- this._$editableField.offset({top: this._$oEditableControlDomRef.offset().top});
230
+ RenameHandler._setEditableFieldPosition.apply(this);
223
231
  this._$editableField.css("visibility", "");
224
232
  this._$editableField.trigger("focus");
225
233
 
234
+ // If scrolling happens during startEdit, the position of the editable field can be wrong
235
+ // To avoid this, the position is recalculated after the scrollbar synchronization is ready
236
+ this._aOverlaysWithScrollbar = OverlayUtil.findParentOverlaysWithScrollbar(oOverlayForWrapper);
237
+ this._aOverlaysWithScrollbar.forEach(function(oOverlayWithScrollbar) {
238
+ oOverlayWithScrollbar.attachScrollSynced(RenameHandler._setEditableFieldPosition, this);
239
+ }.bind(this));
240
+
226
241
  // keep Overlay selected while renaming
227
242
  mPropertyBag.overlay.setSelected(true);
228
243
  sap.ui.getCore().getEventBus().publish("sap.ui.rta", mPropertyBag.pluginMethodName, {
@@ -316,6 +331,9 @@ sap.ui.define([
316
331
  oOverlay.focus();
317
332
  }
318
333
 
334
+ this._aOverlaysWithScrollbar.forEach(function(oOverlayWithScrollbar) {
335
+ oOverlayWithScrollbar.detachScrollSynced(RenameHandler._setEditableFieldPosition, this);
336
+ }.bind(this));
319
337
  delete this._$editableField;
320
338
  delete this._$oEditableControlDomRef;
321
339
  delete this._oEditedOverlay;
@@ -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.103.1
30
+ * @version 1.106.0
31
31
  * @constructor
32
32
  * @private
33
33
  * @since 1.101
@@ -143,7 +143,7 @@ sap.ui.define([
143
143
  throw DtUtil.propagateError(
144
144
  vError,
145
145
  "Resize#handler",
146
- "Error occured during handler execution",
146
+ "Error occurred during handler execution",
147
147
  "sap.ui.rta.plugin"
148
148
  );
149
149
  });
@@ -265,7 +265,7 @@ sap.ui.define([
265
265
  throw DtUtil.propagateError(
266
266
  vError,
267
267
  "Resize",
268
- "Error occured during resize command creation",
268
+ "Error occurred during resize command creation",
269
269
  "sap.ui.rta.plugin"
270
270
  );
271
271
  }.bind(this));
@@ -30,7 +30,7 @@ function (
30
30
  * @class The Selection plugin allows you to select or focus overlays with mouse or keyboard and navigate to others.
31
31
  * @extends sap.ui.rta.plugin.Plugin
32
32
  * @author SAP SE
33
- * @version 1.103.1
33
+ * @version 1.106.0
34
34
  * @constructor
35
35
  * @private
36
36
  * @since 1.34
@@ -133,6 +133,17 @@ function (
133
133
  }
134
134
  };
135
135
 
136
+ /**
137
+ * Gets the value of the isActive property.
138
+ * When set to <code>true</code>, then additional check for busy plugnis is triggered.
139
+ * @return {boolean} bValue - <code>false</code> if inactive or some busy plugins available.
140
+ */
141
+ Selection.prototype.getIsActive = function() {
142
+ return this.getProperty("isActive")
143
+ && this.getDesignTime()
144
+ && !this.getDesignTime().getBusyPlugins().length;
145
+ };
146
+
136
147
  /**
137
148
  * Register an overlay
138
149
  *
@@ -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.103.1
28
+ * @version 1.106.0
29
29
  * @constructor
30
30
  * @private
31
31
  * @since 1.44
@@ -236,7 +236,7 @@ sap.ui.define([
236
236
  throw DtUtil.propagateError(
237
237
  vError,
238
238
  "Settings#handler",
239
- "Error occured during handler execution",
239
+ "Error occurred during handler execution",
240
240
  "sap.ui.rta.plugin"
241
241
  );
242
242
  });
@@ -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.103.1
26
+ * @version 1.106.0
27
27
  * @constructor
28
28
  * @private
29
29
  * @since 1.46
@@ -143,7 +143,7 @@ sap.ui.define([
143
143
  throw DtUtil.propagateError(
144
144
  vError,
145
145
  "Split#handleSplit",
146
- "Error occured during handleSplit execution",
146
+ "Error occurred during handleSplit execution",
147
147
  "sap.ui.rta.plugin"
148
148
  );
149
149
  });
@@ -10,13 +10,15 @@ sap.ui.define([
10
10
  "sap/ui/dt/OverlayRegistry",
11
11
  "sap/ui/dt/OverlayUtil",
12
12
  "sap/base/util/includes",
13
- "sap/base/util/restricted/_debounce"
13
+ "sap/base/util/restricted/_debounce",
14
+ "sap/ui/thirdparty/jquery"
14
15
  ], function(
15
16
  Plugin,
16
17
  OverlayRegistry,
17
18
  OverlayUtil,
18
19
  includes,
19
- _debounce
20
+ _debounce,
21
+ jQuery
20
22
  ) {
21
23
  "use strict";
22
24
 
@@ -31,7 +33,7 @@ sap.ui.define([
31
33
  * @extends sap.ui.rta.plugin.Plugin
32
34
  *
33
35
  * @author SAP SE
34
- * @version 1.103.1
36
+ * @version 1.106.0
35
37
  *
36
38
  * @constructor
37
39
  * @private
@@ -211,6 +213,8 @@ sap.ui.define([
211
213
  */
212
214
  Stretch.prototype.deregisterElementOverlay = function(oOverlay) {
213
215
  toggleStyleClass(oOverlay, false);
216
+
217
+ Plugin.prototype.deregisterElementOverlay.apply(this, arguments);
214
218
  };
215
219
 
216
220
  /**
@@ -32,7 +32,7 @@ sap.ui.define([
32
32
  * handled by the AdditionalElements Plugin (Reveal, Add Via Delegate, Add Custom)
33
33
  *
34
34
  * @author SAP SE
35
- * @version 1.103.1
35
+ * @version 1.106.0
36
36
  * @private
37
37
  * @since 1.94
38
38
  * @experimental Since 1.94. This class is experimental and provides only limited functionality. Also the API might be changed in future.
@@ -32,7 +32,7 @@ sap.ui.define([
32
32
  * @class Context - Dialog for available Fields in Runtime Authoring
33
33
  * @extends sap.ui.base.ManagedObject
34
34
  * @author SAP SE
35
- * @version 1.103.1
35
+ * @version 1.106.0
36
36
  * @constructor
37
37
  * @private
38
38
  * @since 1.44
@@ -5,21 +5,19 @@
5
5
  */
6
6
 
7
7
  sap.ui.define([
8
+ "sap/base/util/isPlainObject",
8
9
  "sap/base/util/ObjectPath",
9
- "sap/base/Log",
10
10
  "sap/ui/core/util/reflection/JsControlTreeModifier",
11
11
  "sap/ui/dt/ElementUtil",
12
12
  "sap/ui/fl/apply/api/DelegateMediatorAPI",
13
- "sap/ui/rta/util/BindingsExtractor",
14
- "sap/ui/thirdparty/jquery"
13
+ "sap/ui/rta/util/BindingsExtractor"
15
14
  ], function(
15
+ isPlainObject,
16
16
  ObjectPath,
17
- Log,
18
17
  JsControlTreeModifier,
19
18
  ElementUtil,
20
19
  DelegateMediatorAPI,
21
- BindingsExtractor,
22
- jQuery
20
+ BindingsExtractor
23
21
  ) {
24
22
  "use strict";
25
23
 
@@ -252,7 +250,7 @@ sap.ui.define([
252
250
 
253
251
  function _vBindingToPath(vBinding) {
254
252
  return (
255
- jQuery.isPlainObject(vBinding)
253
+ isPlainObject(vBinding)
256
254
  ? vBinding.parts[0].path //TODO what about complex bindings with multiple paths, this was not covered so far?
257
255
  : !!vBinding.getPath && vBinding.getPath()
258
256
  );
@@ -264,9 +262,11 @@ sap.ui.define([
264
262
  var aBindingPaths = [];
265
263
 
266
264
  aRelevantElements.forEach(function(oElement) {
267
- aBindingPaths = aBindingPaths.concat(BindingsExtractor.getBindings(oElement, oModel)
268
- .map(_vBindingToPath)
269
- );
265
+ aBindingPaths = aBindingPaths.concat(BindingsExtractor.getBindings({
266
+ element: oElement,
267
+ model: oModel,
268
+ parent: oElement.getParent()
269
+ }).map(_vBindingToPath));
270
270
  });
271
271
  return aBindingPaths;
272
272
  }
@@ -399,7 +399,10 @@ sap.ui.define([
399
399
  // BCP: 1880498671
400
400
  } else if (_getBindingContextPath(oElement, sAggregationName, sModelName) === _getBindingContextPath(oInvisibleElement, sAggregationName, sModelName)) {
401
401
  aBindingPaths = BindingsExtractor.collectBindingPaths(oInvisibleElement, oModel).bindingPaths;
402
- } else if (mAddViaDelegate && BindingsExtractor.getBindings(oInvisibleElement, oModel).length > 0) {
402
+ } else if (mAddViaDelegate && BindingsExtractor.getBindings({
403
+ element: oInvisibleElement,
404
+ model: oModel
405
+ }).length > 0) {
403
406
  bIncludeElement = false;
404
407
  }
405
408
 
@@ -75,7 +75,7 @@ sap.ui.define([
75
75
  * @class The plugin allows to add additional elements that exist either hidden in the UI or in the OData service
76
76
  * @extends sap.ui.rta.plugin.Plugin
77
77
  * @author SAP SE
78
- * @version 1.103.1
78
+ * @version 1.106.0
79
79
  * @constructor
80
80
  * @private
81
81
  * @since 1.44
@@ -144,13 +144,13 @@ sap.ui.define([
144
144
  return AdditionalElementsUtils.getText("CTX_ADD_ELEMENTS", mActions, mParents.parent, SINGULAR);
145
145
  },
146
146
 
147
- isAvailable: function (bOverlayIsSibling, aElementOverlays) {
147
+ isAvailable: function(aElementOverlays, bOverlayIsSibling) {
148
148
  return aElementOverlays.every(function (oElementOverlay) {
149
149
  return this._isEditableByPlugin(oElementOverlay, bOverlayIsSibling);
150
150
  }, this);
151
151
  },
152
152
 
153
- isEnabled: function(bOverlayIsSibling, aElementOverlays, sAggregationName) {
153
+ isEnabled: function(aElementOverlays, bOverlayIsSibling, sAggregationName) {
154
154
  if (aElementOverlays.length > 1) {
155
155
  return false;
156
156
  }
@@ -452,8 +452,8 @@ sap.ui.define([
452
452
  var bHasChildren = aElementsWithAggregations[0].length > 0;
453
453
  var bHasMultipleAggregations = aElementsWithAggregations[0].length > 1;
454
454
  var bHasSiblings = aElementsWithAggregations[1].length > 0;
455
- var bIsAvailableForChildren = this.isAvailable(false, aElementOverlays);
456
- var bIsAvailableForSibling = this.isAvailable(true, aElementOverlays);
455
+ var bIsAvailableForChildren = this.isAvailable(aElementOverlays, false);
456
+ var bIsAvailableForSibling = this.isAvailable(aElementOverlays, true);
457
457
  if (bIsAvailableForSibling && (!bIsAvailableForChildren || !bHasChildren)) {
458
458
  // Case 1: Only siblings -> No submenu required
459
459
  oMenuItem = this._buildMenuItem("CTX_ADD_ELEMENTS_AS_SIBLING", true, aElementOverlays, aElementsWithAggregations, false);
@@ -507,7 +507,7 @@ sap.ui.define([
507
507
  id: sPluginId,
508
508
  text: this.getContextMenuText.bind(this, bOverlayIsSibling, oSelectedOverlay, sAggregationName, bHasSubMenu),
509
509
  enabled: bHasSubMenu || function(bOverlayIsSibling, aElementOverlays) {
510
- return this.isEnabled(bOverlayIsSibling, aElementOverlays, sAggregationName);
510
+ return this.isEnabled(aElementOverlays, bOverlayIsSibling, sAggregationName);
511
511
  }.bind(this, bOverlayIsSibling),
512
512
  rank: 20,
513
513
  icon: "sap-icon://add",
@@ -544,9 +544,9 @@ sap.ui.define([
544
544
  var oItem = {
545
545
  id: sPluginId + '_' + iPosition,
546
546
  text: sDisplayText,
547
- enabled: function(bOverlayIsSibling, aElementOverlays) {
548
- return this.isEnabled(bOverlayIsSibling, aElementOverlays, sAggregationName);
549
- }.bind(this, bOverlayIsSibling),
547
+ enabled: function(aElementOverlays) {
548
+ return this.isEnabled(aElementOverlays, bOverlayIsSibling, sAggregationName);
549
+ }.bind(this),
550
550
  handler: function (bOverlayIsSibling, aElementOverlays) {
551
551
  // showAvailableElements has optional parameters
552
552
  return this.showAvailableElements(bOverlayIsSibling, sAggregationName, aElementOverlays, undefined, undefined, sDisplayText);
@@ -15,7 +15,7 @@ sap.ui.define([
15
15
  * Helper object containing methods for the AdditionalElements plugin
16
16
  *
17
17
  * @author SAP SE
18
- * @version 1.103.1
18
+ * @version 1.106.0
19
19
  * @private
20
20
  * @since 1.94
21
21
  * @experimental Since 1.94. This class is experimental and provides only limited functionality. Also the API might be changed in future.
@@ -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.103.1
28
+ * @version 1.106.0
29
29
  * @private
30
30
  * @since 1.94
31
31
  * @experimental Since 1.94. This class is experimental and provides only limited functionality. Also the API might be changed in future.
@@ -295,7 +295,7 @@ sap.ui.define([
295
295
  throw DtUtils.propagateError(
296
296
  vMessage,
297
297
  "AdditionalElementsPlugin#_createCommands",
298
- "Error occured during _createCommands execution",
298
+ "Error occurred during _createCommands execution",
299
299
  "sap.ui.rta.plugin"
300
300
  );
301
301
  });
@@ -110,7 +110,7 @@ sap.ui.define([
110
110
  * @class The AddIFrame allows trigger AddIFrame operations on the overlay.
111
111
  * @extends sap.ui.rta.plugin.BaseCreate
112
112
  * @author SAP SE
113
- * @version 1.103.1
113
+ * @version 1.106.0
114
114
  * @constructor
115
115
  * @private
116
116
  * @since 1.75
@@ -172,7 +172,7 @@ sap.ui.define([
172
172
  var aMenuItems = [];
173
173
 
174
174
  var bIsSibling = true;
175
- if (this.isAvailable(bIsSibling, aElementOverlays)) {
175
+ if (this.isAvailable(aElementOverlays, bIsSibling)) {
176
176
  var oAction = this.getCreateAction(bIsSibling, aElementOverlays[0]);
177
177
  if (oAction) {
178
178
  var oSiblingMenuItem = Object.assign({
@@ -187,7 +187,7 @@ sap.ui.define([
187
187
  }
188
188
 
189
189
  bIsSibling = false;
190
- if (this.isAvailable(bIsSibling, aElementOverlays)) {
190
+ if (this.isAvailable(aElementOverlays, bIsSibling)) {
191
191
  aMenuItems = aMenuItems.concat(this.getCreateActions(bIsSibling, aElementOverlays[0])
192
192
  .map(function(oAction, iIndex) {
193
193
  var oParentMenuItem = Object.assign({