@openui5/sap.ui.rta 1.119.0 → 1.120.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 (164) hide show
  1. package/THIRDPARTY.txt +6 -6
  2. package/package.json +6 -6
  3. package/src/sap/ui/rta/.library +1 -1
  4. package/src/sap/ui/rta/Client.js +4 -2
  5. package/src/sap/ui/rta/RuntimeAuthoring.js +14 -13
  6. package/src/sap/ui/rta/Utils.js +58 -56
  7. package/src/sap/ui/rta/appVariant/AppVariantDialog.js +7 -4
  8. package/src/sap/ui/rta/appVariant/AppVariantManager.js +1 -1
  9. package/src/sap/ui/rta/appVariant/AppVariantOverviewDialog.js +3 -1
  10. package/src/sap/ui/rta/appVariant/AppVariantUtils.js +6 -2
  11. package/src/sap/ui/rta/appVariant/Feature.js +4 -4
  12. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_bg.properties +1 -1
  13. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_ca.properties +1 -1
  14. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_cs.properties +1 -1
  15. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_es_MX.properties +1 -1
  16. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_hr.properties +1 -1
  17. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_hu.properties +1 -1
  18. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_ja.properties +1 -1
  19. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_mk.properties +28 -0
  20. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_ms.properties +1 -1
  21. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_pl.properties +1 -1
  22. package/src/sap/ui/rta/appVariant/manageApps/webapp/i18n/i18n_sl.properties +1 -1
  23. package/src/sap/ui/rta/appVariant/manageApps/webapp/index.js +5 -3
  24. package/src/sap/ui/rta/command/AddIFrame.js +1 -1
  25. package/src/sap/ui/rta/command/AddProperty.js +1 -1
  26. package/src/sap/ui/rta/command/AddXML.js +1 -1
  27. package/src/sap/ui/rta/command/AddXMLAtExtensionPoint.js +1 -1
  28. package/src/sap/ui/rta/command/AppDescriptorCommand.js +1 -1
  29. package/src/sap/ui/rta/command/BaseCommand.js +6 -3
  30. package/src/sap/ui/rta/command/BindProperty.js +1 -1
  31. package/src/sap/ui/rta/command/Combine.js +1 -1
  32. package/src/sap/ui/rta/command/CommandFactory.js +25 -23
  33. package/src/sap/ui/rta/command/CompositeCommand.js +1 -1
  34. package/src/sap/ui/rta/command/ControlVariantConfigure.js +1 -1
  35. package/src/sap/ui/rta/command/ControlVariantSave.js +1 -1
  36. package/src/sap/ui/rta/command/ControlVariantSaveAs.js +1 -1
  37. package/src/sap/ui/rta/command/ControlVariantSetTitle.js +1 -1
  38. package/src/sap/ui/rta/command/ControlVariantSwitch.js +1 -1
  39. package/src/sap/ui/rta/command/CreateContainer.js +1 -1
  40. package/src/sap/ui/rta/command/CustomAdd.js +1 -1
  41. package/src/sap/ui/rta/command/FlexCommand.js +5 -3
  42. package/src/sap/ui/rta/command/LREPSerializer.js +1 -1
  43. package/src/sap/ui/rta/command/LocalReset.js +1 -1
  44. package/src/sap/ui/rta/command/Move.js +1 -1
  45. package/src/sap/ui/rta/command/Property.js +1 -1
  46. package/src/sap/ui/rta/command/Remove.js +1 -1
  47. package/src/sap/ui/rta/command/Rename.js +1 -1
  48. package/src/sap/ui/rta/command/Resize.js +1 -1
  49. package/src/sap/ui/rta/command/Reveal.js +1 -1
  50. package/src/sap/ui/rta/command/Settings.js +1 -1
  51. package/src/sap/ui/rta/command/Split.js +1 -1
  52. package/src/sap/ui/rta/command/Stack.js +4 -4
  53. package/src/sap/ui/rta/command/appDescriptor/AddLibrary.js +4 -2
  54. package/src/sap/ui/rta/command/compVariant/CompVariantContent.js +1 -1
  55. package/src/sap/ui/rta/command/compVariant/CompVariantSaveAs.js +1 -1
  56. package/src/sap/ui/rta/command/compVariant/CompVariantSwitch.js +1 -1
  57. package/src/sap/ui/rta/command/compVariant/CompVariantUpdate.js +1 -1
  58. package/src/sap/ui/rta/enablement/elementActionTest.js +1 -1
  59. package/src/sap/ui/rta/library.js +5 -6
  60. package/src/sap/ui/rta/messagebundle_ar.properties +3 -0
  61. package/src/sap/ui/rta/messagebundle_bg.properties +3 -0
  62. package/src/sap/ui/rta/messagebundle_ca.properties +3 -0
  63. package/src/sap/ui/rta/messagebundle_cs.properties +3 -0
  64. package/src/sap/ui/rta/messagebundle_cy.properties +3 -0
  65. package/src/sap/ui/rta/messagebundle_da.properties +3 -0
  66. package/src/sap/ui/rta/messagebundle_de.properties +3 -0
  67. package/src/sap/ui/rta/messagebundle_el.properties +3 -0
  68. package/src/sap/ui/rta/messagebundle_en_GB.properties +3 -0
  69. package/src/sap/ui/rta/messagebundle_es.properties +3 -0
  70. package/src/sap/ui/rta/messagebundle_es_MX.properties +3 -0
  71. package/src/sap/ui/rta/messagebundle_et.properties +3 -0
  72. package/src/sap/ui/rta/messagebundle_fi.properties +3 -0
  73. package/src/sap/ui/rta/messagebundle_fr.properties +3 -0
  74. package/src/sap/ui/rta/messagebundle_fr_CA.properties +3 -0
  75. package/src/sap/ui/rta/messagebundle_hi.properties +3 -0
  76. package/src/sap/ui/rta/messagebundle_hr.properties +3 -0
  77. package/src/sap/ui/rta/messagebundle_hu.properties +3 -0
  78. package/src/sap/ui/rta/messagebundle_id.properties +3 -0
  79. package/src/sap/ui/rta/messagebundle_it.properties +3 -0
  80. package/src/sap/ui/rta/messagebundle_iw.properties +3 -0
  81. package/src/sap/ui/rta/messagebundle_ja.properties +3 -0
  82. package/src/sap/ui/rta/messagebundle_kk.properties +3 -0
  83. package/src/sap/ui/rta/messagebundle_ko.properties +3 -0
  84. package/src/sap/ui/rta/messagebundle_lt.properties +3 -0
  85. package/src/sap/ui/rta/messagebundle_lv.properties +3 -0
  86. package/src/sap/ui/rta/messagebundle_mk.properties +328 -0
  87. package/src/sap/ui/rta/messagebundle_ms.properties +3 -0
  88. package/src/sap/ui/rta/messagebundle_nl.properties +3 -0
  89. package/src/sap/ui/rta/messagebundle_no.properties +3 -0
  90. package/src/sap/ui/rta/messagebundle_pl.properties +3 -0
  91. package/src/sap/ui/rta/messagebundle_pt.properties +3 -0
  92. package/src/sap/ui/rta/messagebundle_pt_PT.properties +3 -0
  93. package/src/sap/ui/rta/messagebundle_ro.properties +3 -0
  94. package/src/sap/ui/rta/messagebundle_ru.properties +3 -0
  95. package/src/sap/ui/rta/messagebundle_sh.properties +59 -56
  96. package/src/sap/ui/rta/messagebundle_sk.properties +3 -0
  97. package/src/sap/ui/rta/messagebundle_sl.properties +3 -0
  98. package/src/sap/ui/rta/messagebundle_sv.properties +3 -0
  99. package/src/sap/ui/rta/messagebundle_th.properties +3 -0
  100. package/src/sap/ui/rta/messagebundle_tr.properties +3 -0
  101. package/src/sap/ui/rta/messagebundle_uk.properties +3 -0
  102. package/src/sap/ui/rta/messagebundle_vi.properties +3 -0
  103. package/src/sap/ui/rta/messagebundle_zh_CN.properties +3 -0
  104. package/src/sap/ui/rta/messagebundle_zh_TW.properties +3 -0
  105. package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +4 -4
  106. package/src/sap/ui/rta/plugin/BaseCreate.js +4 -2
  107. package/src/sap/ui/rta/plugin/Combine.js +1 -1
  108. package/src/sap/ui/rta/plugin/CompVariant.js +7 -5
  109. package/src/sap/ui/rta/plugin/ControlVariant.js +12 -8
  110. package/src/sap/ui/rta/plugin/CreateContainer.js +1 -1
  111. package/src/sap/ui/rta/plugin/CutPaste.js +6 -5
  112. package/src/sap/ui/rta/plugin/DragDrop.js +1 -1
  113. package/src/sap/ui/rta/plugin/EasyAdd.js +4 -2
  114. package/src/sap/ui/rta/plugin/EasyRemove.js +7 -3
  115. package/src/sap/ui/rta/plugin/LocalReset.js +7 -3
  116. package/src/sap/ui/rta/plugin/Plugin.js +1 -1
  117. package/src/sap/ui/rta/plugin/RTAElementMover.js +1 -1
  118. package/src/sap/ui/rta/plugin/Remove.js +1 -1
  119. package/src/sap/ui/rta/plugin/Rename.js +1 -1
  120. package/src/sap/ui/rta/plugin/RenameHandler.js +16 -4
  121. package/src/sap/ui/rta/plugin/Resize.js +6 -6
  122. package/src/sap/ui/rta/plugin/Selection.js +3 -17
  123. package/src/sap/ui/rta/plugin/Settings.js +1 -1
  124. package/src/sap/ui/rta/plugin/Split.js +1 -1
  125. package/src/sap/ui/rta/plugin/Stretch.js +1 -1
  126. package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +4 -2
  127. package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +4 -2
  128. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +6 -4
  129. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +4 -2
  130. package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +1 -1
  131. package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +4 -3
  132. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +7 -5
  133. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialogController.js +8 -6
  134. package/src/sap/ui/rta/service/Action.js +1 -1
  135. package/src/sap/ui/rta/service/ControllerExtension.js +4 -2
  136. package/src/sap/ui/rta/service/Outline.js +4 -4
  137. package/src/sap/ui/rta/service/Property.js +1 -1
  138. package/src/sap/ui/rta/service/Selection.js +1 -1
  139. package/src/sap/ui/rta/service/SupportTools.js +7 -7
  140. package/src/sap/ui/rta/toolbar/Adaptation.js +19 -14
  141. package/src/sap/ui/rta/toolbar/Base.js +8 -4
  142. package/src/sap/ui/rta/toolbar/Fiori.js +1 -1
  143. package/src/sap/ui/rta/toolbar/FioriLike.js +1 -1
  144. package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +1 -1
  145. package/src/sap/ui/rta/toolbar/Personalization.js +1 -1
  146. package/src/sap/ui/rta/toolbar/Standalone.js +1 -1
  147. package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptations.js +6 -7
  148. package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptation.js +4 -2
  149. package/src/sap/ui/rta/toolbar/translation/Translation.js +9 -5
  150. package/src/sap/ui/rta/toolbar/versioning/Versioning.js +2 -2
  151. package/src/sap/ui/rta/util/PluginManager.js +1 -1
  152. package/src/sap/ui/rta/util/PopupManager.js +1 -1
  153. package/src/sap/ui/rta/util/ReloadManager.js +1 -1
  154. package/src/sap/ui/rta/util/ServiceEventBus.js +1 -1
  155. package/src/sap/ui/rta/util/adaptationStarter.js +8 -10
  156. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +14 -12
  157. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +1 -1
  158. package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +8 -4
  159. package/src/sap/ui/rta/util/changeVisualization/commands/CombineVisualization.js +6 -4
  160. package/src/sap/ui/rta/util/changeVisualization/commands/CreateContainerVisualization.js +3 -3
  161. package/src/sap/ui/rta/util/changeVisualization/commands/MoveVisualization.js +3 -1
  162. package/src/sap/ui/rta/util/changeVisualization/commands/RenameVisualization.js +3 -1
  163. package/src/sap/ui/rta/util/changeVisualization/commands/SplitVisualization.js +3 -3
  164. package/src/sap/ui/rta/util/validateText.js +4 -4
@@ -5,6 +5,8 @@
5
5
  */
6
6
 
7
7
  sap.ui.define([
8
+ "sap/ui/core/Element",
9
+ "sap/ui/core/Lib",
8
10
  "sap/ui/rta/plugin/Plugin",
9
11
  "sap/ui/rta/plugin/RenameHandler",
10
12
  "sap/ui/rta/Utils",
@@ -21,6 +23,8 @@ sap.ui.define([
21
23
  "sap/base/Log",
22
24
  "sap/m/MessageBox"
23
25
  ], function(
26
+ Element,
27
+ Lib,
24
28
  Plugin,
25
29
  RenameHandler,
26
30
  Utils,
@@ -47,7 +51,7 @@ sap.ui.define([
47
51
  * @class The ControlVariant allows propagation of variantManagement key
48
52
  * @extends sap.ui.rta.plugin.Plugin
49
53
  * @author SAP SE
50
- * @version 1.119.0
54
+ * @version 1.120.0
51
55
  * @constructor
52
56
  * @private
53
57
  * @since 1.50
@@ -134,7 +138,7 @@ sap.ui.define([
134
138
  // Propagate variant management reference to all children overlays starting from the "for" association element as the root
135
139
  aVariantManagementTargetElements.forEach(function(sVariantManagementTargetElement) {
136
140
  var oVariantManagementTargetElement = sVariantManagementTargetElement instanceof ManagedObject
137
- ? sVariantManagementTargetElement : sap.ui.getCore().byId(sVariantManagementTargetElement);
141
+ ? sVariantManagementTargetElement : Element.getElementById(sVariantManagementTargetElement);
138
142
  var oVariantManagementTargetOverlay = OverlayRegistry.getOverlay(oVariantManagementTargetElement);
139
143
  this._propagateVariantManagement(oVariantManagementTargetOverlay, sVariantManagementReference);
140
144
  }.bind(this));
@@ -373,7 +377,7 @@ sap.ui.define([
373
377
  */
374
378
  ControlVariant.prototype.switchVariant = function(oTargetOverlay, sNewVariantReference, sCurrentVariantReference) {
375
379
  var oTargetElement = oTargetOverlay.getElement();
376
- var oLibraryBundle = sap.ui.getCore().getLibraryResourceBundle("sap.ui.rta");
380
+ var oLibraryBundle = Lib.getResourceBundleFor("sap.ui.rta");
377
381
 
378
382
  function onDirtySwitchWarningClose(sAction) {
379
383
  if (sAction === MessageBox.Action.CANCEL) {
@@ -617,7 +621,7 @@ sap.ui.define([
617
621
  if (this.isRenameAvailable(oElementOverlay)) {
618
622
  aMenuItems.push({
619
623
  id: "CTX_VARIANT_SET_TITLE",
620
- text: sap.ui.getCore().getLibraryResourceBundle("sap.ui.rta").getText("CTX_RENAME"),
624
+ text: Lib.getResourceBundleFor("sap.ui.rta").getText("CTX_RENAME"),
621
625
  handler: this.renameVariant.bind(this),
622
626
  enabled: this.isRenameEnabled.bind(this),
623
627
  rank: 210,
@@ -628,7 +632,7 @@ sap.ui.define([
628
632
  if (this.isVariantSaveAvailable(oElementOverlay)) {
629
633
  aMenuItems.push({
630
634
  id: "CTX_VARIANT_SAVE",
631
- text: sap.ui.getCore().getLibraryResourceBundle("sap.ui.rta").getText("CTX_VARIANT_SAVE"),
635
+ text: Lib.getResourceBundleFor("sap.ui.rta").getText("CTX_VARIANT_SAVE"),
632
636
  handler: this.createSaveCommand.bind(this),
633
637
  enabled: this.isVariantSaveEnabled.bind(this),
634
638
  rank: 220,
@@ -639,7 +643,7 @@ sap.ui.define([
639
643
  if (this.isVariantSaveAsAvailable(oElementOverlay)) {
640
644
  aMenuItems.push({
641
645
  id: "CTX_VARIANT_SAVEAS",
642
- text: sap.ui.getCore().getLibraryResourceBundle("sap.ui.rta").getText("CTX_VARIANT_SAVEAS"),
646
+ text: Lib.getResourceBundleFor("sap.ui.rta").getText("CTX_VARIANT_SAVEAS"),
643
647
  handler: this.createSaveAsCommand.bind(this),
644
648
  enabled: this.isVariantSaveAsEnabled.bind(this),
645
649
  rank: 225,
@@ -650,7 +654,7 @@ sap.ui.define([
650
654
  if (this.isVariantConfigureAvailable(oElementOverlay)) {
651
655
  aMenuItems.push({
652
656
  id: "CTX_VARIANT_MANAGE",
653
- text: sap.ui.getCore().getLibraryResourceBundle("sap.ui.rta").getText("CTX_VARIANT_MANAGE"),
657
+ text: Lib.getResourceBundleFor("sap.ui.rta").getText("CTX_VARIANT_MANAGE"),
654
658
  handler: this.configureVariants.bind(this),
655
659
  enabled: this.isVariantConfigureEnabled.bind(this),
656
660
  startSection: true,
@@ -679,7 +683,7 @@ sap.ui.define([
679
683
 
680
684
  aMenuItems.push({
681
685
  id: "CTX_VARIANT_SWITCH_SUBMENU",
682
- text: sap.ui.getCore().getLibraryResourceBundle("sap.ui.rta").getText("CTX_VARIANT_SWITCH"),
686
+ text: Lib.getResourceBundleFor("sap.ui.rta").getText("CTX_VARIANT_SWITCH"),
683
687
  handler: function(aElementOverlays, mPropertyBag) {
684
688
  var sNewVariantKey = mPropertyBag.eventItem.getParameters().item.getProperty("key");
685
689
  var oTargetOverlay = aElementOverlays[0];
@@ -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.119.0
28
+ * @version 1.120.0
29
29
  * @constructor
30
30
  * @private
31
31
  * @since 1.34
@@ -5,13 +5,14 @@
5
5
  */
6
6
 
7
7
  sap.ui.define([
8
+ "sap/ui/core/Lib",
8
9
  "sap/ui/dt/plugin/CutPaste",
9
10
  "sap/ui/dt/Util",
10
11
  "sap/ui/rta/plugin/Plugin",
11
12
  "sap/ui/rta/plugin/RTAElementMover",
12
13
  "sap/ui/rta/Utils"
13
- ],
14
- function(
14
+ ], function(
15
+ Lib,
15
16
  ControlCutPaste,
16
17
  DtUtil,
17
18
  Plugin,
@@ -31,7 +32,7 @@ function(
31
32
  * @extends sap.ui.dt.plugin.CutPaste
32
33
  *
33
34
  * @author SAP SE
34
- * @version 1.119.0
35
+ * @version 1.120.0
35
36
  *
36
37
  * @constructor
37
38
  * @private
@@ -174,7 +175,7 @@ function(
174
175
  var aMenuItems = [];
175
176
  var oPasteMenuItem = this.enhanceItemWithResponsibleElement({
176
177
  id: "CTX_PASTE",
177
- text: sap.ui.getCore().getLibraryResourceBundle("sap.ui.rta").getText("CTX_PASTE"),
178
+ text: Lib.getResourceBundleFor("sap.ui.rta").getText("CTX_PASTE"),
178
179
  handler: function(aElementOverlays) {
179
180
  return this.paste(aElementOverlays[0]);
180
181
  }.bind(this),
@@ -189,7 +190,7 @@ function(
189
190
  if (this.isAvailable(aResponsibleElementOverlays)) {
190
191
  var oCutMenuItem = this.enhanceItemWithResponsibleElement({
191
192
  id: "CTX_CUT",
192
- text: sap.ui.getCore().getLibraryResourceBundle("sap.ui.rta").getText("CTX_CUT"),
193
+ text: Lib.getResourceBundleFor("sap.ui.rta").getText("CTX_CUT"),
193
194
  handler: function(aElementOverlays) {
194
195
  return this.cut(aElementOverlays[0]);
195
196
  }.bind(this),
@@ -33,7 +33,7 @@ function(
33
33
  * @extends sap.ui.dt.plugin.ControlDragDrop
34
34
  *
35
35
  * @author SAP SE
36
- * @version 1.119.0
36
+ * @version 1.120.0
37
37
  *
38
38
  * @constructor
39
39
  * @private
@@ -5,10 +5,12 @@
5
5
  */
6
6
 
7
7
  sap.ui.define([
8
+ "sap/ui/core/Lib",
8
9
  "sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin",
9
10
  "sap/ui/dt/OverlayRegistry",
10
11
  "sap/m/Button"
11
12
  ], function(
13
+ Lib,
12
14
  AdditionalElementsPlugin,
13
15
  OverlayRegistry,
14
16
  Button
@@ -23,7 +25,7 @@ sap.ui.define([
23
25
  * @class The EasyAdd Plugin adds an Icon to an Overlay, which allows to trigger add operations directly
24
26
  * @extends sap.ui.rta.plugin.additionalElements.AdditionalElementsPlugin
25
27
  * @author SAP SE
26
- * @version 1.119.0
28
+ * @version 1.120.0
27
29
  * @constructor
28
30
  * @private
29
31
  * @since 1.48
@@ -159,7 +161,7 @@ sap.ui.define([
159
161
  */
160
162
  EasyAdd.prototype._addButton = function(oOverlay, fnCallback, oOverlayDom, sControlName, bOverlayIsSibling) {
161
163
  var bIsEditable = oOverlay.getEditableByPlugins().indexOf(this._retrievePluginName(bOverlayIsSibling)) > -1;
162
- var oTextResources = sap.ui.getCore().getLibraryResourceBundle("sap.ui.rta");
164
+ var oTextResources = Lib.getResourceBundleFor("sap.ui.rta");
163
165
 
164
166
  var sId = `${oOverlay.getId()}-AddButton`;
165
167
  var oHtmlButtonOuter = document.createElement("div");
@@ -5,9 +5,13 @@
5
5
  */
6
6
 
7
7
  sap.ui.define([
8
+ "sap/ui/core/Element",
9
+ "sap/ui/core/Lib",
8
10
  "sap/ui/rta/plugin/Remove",
9
11
  "sap/m/Button"
10
12
  ], function(
13
+ Element,
14
+ Lib,
11
15
  Remove,
12
16
  Button
13
17
  ) {
@@ -21,7 +25,7 @@ sap.ui.define([
21
25
  * @class The EasyRemove Plugin adds an Icon to an Overlay, which allows to trigger remove operations directly
22
26
  * @extends sap.ui.rta.plugin.Remove
23
27
  * @author SAP SE
24
- * @version 1.119.0
28
+ * @version 1.120.0
25
29
  * @constructor
26
30
  * @private
27
31
  * @since 1.48
@@ -62,7 +66,7 @@ sap.ui.define([
62
66
  });
63
67
 
64
68
  var fnOnClick = function(oEvent) {
65
- var oOverlay = sap.ui.getCore().byId(oEvent.currentTarget.id.replace("-DeleteIcon", ""));
69
+ var oOverlay = Element.getElementById(oEvent.currentTarget.id.replace("-DeleteIcon", ""));
66
70
  onDeletePressed(oOverlay);
67
71
  oEvent.stopPropagation();
68
72
  oEvent.preventDefault();
@@ -101,7 +105,7 @@ sap.ui.define([
101
105
 
102
106
  oOverlay._oDeleteButton = new Button(sId, {
103
107
  icon: "sap-icon://less",
104
- tooltip: sap.ui.getCore().getLibraryResourceBundle("sap.ui.rta").getText("CTX_REMOVE"),
108
+ tooltip: Lib.getResourceBundleFor("sap.ui.rta").getText("CTX_REMOVE"),
105
109
  enabled: bEnabled
106
110
  }).placeAt(oHtmlIconOuter);
107
111
  oHtmlIconWrapper.append(oHtmlIconOuter);
@@ -5,6 +5,8 @@
5
5
  */
6
6
 
7
7
  sap.ui.define([
8
+ "sap/ui/core/Element",
9
+ "sap/ui/core/Lib",
8
10
  "sap/ui/rta/plugin/Plugin",
9
11
  "sap/ui/dt/Util",
10
12
  "sap/ui/fl/Utils",
@@ -14,6 +16,8 @@ sap.ui.define([
14
16
  "sap/m/MessageToast",
15
17
  "sap/ui/dt/OverlayRegistry"
16
18
  ], function(
19
+ Element,
20
+ Lib,
17
21
  Plugin,
18
22
  DtUtil,
19
23
  FlUtils,
@@ -37,7 +41,7 @@ sap.ui.define([
37
41
  * @class
38
42
  * @extends sap.ui.rta.plugin.Plugin
39
43
  * @author SAP SE
40
- * @version 1.119.0
44
+ * @version 1.120.0
41
45
  * @constructor
42
46
  * @private
43
47
  * @since 1.90
@@ -130,7 +134,7 @@ sap.ui.define([
130
134
  var sCurrentVariant = getCurrentVariant(oVariantModel, sVariantManagementReference);
131
135
  var bHasVariant = !!sCurrentVariant;
132
136
  var oVariantManagementControl = bHasVariant
133
- ? oAppComponent.byId(sVariantManagementReference) || sap.ui.getCore().byId(sVariantManagementReference)
137
+ ? oAppComponent.byId(sVariantManagementReference) || Element.getElementById(sVariantManagementReference)
134
138
  : undefined;
135
139
  var oCommandFactory = this.getCommandFactory();
136
140
 
@@ -164,7 +168,7 @@ sap.ui.define([
164
168
  command: oCompositeCommand
165
169
  });
166
170
  if (bHasVariant) {
167
- var sMessage = sap.ui.getCore().getLibraryResourceBundle("sap.ui.rta").getText("MSG_LOCAL_RESET_VARIANT_SAVE");
171
+ var sMessage = Lib.getResourceBundleFor("sap.ui.rta").getText("MSG_LOCAL_RESET_VARIANT_SAVE");
168
172
  MessageToast.show(sMessage, {
169
173
  duration: 5000
170
174
  });
@@ -70,7 +70,7 @@ sap.ui.define([
70
70
  * @extends sap.ui.dt.Plugin
71
71
  *
72
72
  * @author SAP SE
73
- * @version 1.119.0
73
+ * @version 1.120.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.119.0
38
+ * @version 1.120.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.119.0
32
+ * @version 1.120.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.119.0
31
+ * @version 1.120.0
32
32
  *
33
33
  * @constructor
34
34
  * @private
@@ -8,6 +8,8 @@
8
8
  sap.ui.define([
9
9
  "sap/ui/thirdparty/jquery",
10
10
  "sap/ui/Device",
11
+ "sap/ui/core/Element",
12
+ "sap/ui/core/EventBus",
11
13
  "sap/ui/rta/plugin/Plugin",
12
14
  "sap/ui/rta/util/validateText",
13
15
  "sap/ui/dt/Overlay",
@@ -20,6 +22,8 @@ sap.ui.define([
20
22
  ], function(
21
23
  jQuery,
22
24
  Device,
25
+ Element,
26
+ EventBus,
23
27
  Plugin,
24
28
  validateText,
25
29
  Overlay,
@@ -39,13 +43,14 @@ sap.ui.define([
39
43
  * Provides Rename handling functionality
40
44
  *
41
45
  * @author SAP SE
42
- * @version 1.119.0
46
+ * @version 1.120.0
43
47
  *
44
48
  * @constructor
45
49
  * @private
46
50
  * @since 1.52
47
51
  * @alias sap.ui.rta.plugin.RenameHandler
48
52
  */
53
+
49
54
  var RenameHandler = {
50
55
 
51
56
  errorStyleClass: "sapUiRtaErrorBg",
@@ -79,6 +84,11 @@ sap.ui.define([
79
84
  this.setBusy(true);
80
85
  this._oEditedOverlay = mPropertyBag.overlay;
81
86
 
87
+ this._bPreviouslyMovable = this._oEditedOverlay.getMovable();
88
+ // This prevents a bug in firefox where the element can be dragged during rename
89
+ this._oEditedOverlay.setMovable(false);
90
+ OverlayUtil.setFirstParentMovable(this._oEditedOverlay, false);
91
+
82
92
  var oElement = mPropertyBag.overlay.getElement();
83
93
 
84
94
  var oDesignTimeMetadata = this._oEditedOverlay.getDesignTimeMetadata();
@@ -222,7 +232,7 @@ sap.ui.define([
222
232
 
223
233
  // keep Overlay selected while renaming
224
234
  mPropertyBag.overlay.setSelected(true);
225
- sap.ui.getCore().getEventBus().publish("sap.ui.rta", mPropertyBag.pluginMethodName, {
235
+ EventBus.getInstance().publish("sap.ui.rta", mPropertyBag.pluginMethodName, {
226
236
  overlay: mPropertyBag.overlay,
227
237
  editableField: this._oEditableField
228
238
  });
@@ -328,13 +338,15 @@ sap.ui.define([
328
338
  if (oEditField) {
329
339
  oEditField.remove();
330
340
  }
341
+ this._oEditedOverlay.setMovable(this._bPreviouslyMovable);
342
+ OverlayUtil.setFirstParentMovable(this._oEditedOverlay, true);
331
343
  delete this._oEditableControlDomRef;
332
344
  delete this._oEditedOverlay;
333
345
  delete this._bBlurOrKeyDownStarted;
334
346
  delete this._fnGetControlText;
335
347
  delete this._fnSetControlText;
336
348
 
337
- sap.ui.getCore().getEventBus().publish("sap.ui.rta", sPluginMethodName, {
349
+ EventBus.getInstance().publish("sap.ui.rta", sPluginMethodName, {
338
350
  overlay: oOverlay
339
351
  });
340
352
  },
@@ -432,7 +444,7 @@ sap.ui.define([
432
444
  * @private
433
445
  */
434
446
  _onClick(oEvent) {
435
- var oOverlay = sap.ui.getCore().byId(oEvent.currentTarget.id);
447
+ var oOverlay = Element.getElementById(oEvent.currentTarget.id);
436
448
  if (this.isRenameEnabled([oOverlay]) && !oEvent.metaKey && !oEvent.ctrlKey && !oEvent.shiftKey) {
437
449
  this.startEdit(oOverlay);
438
450
  RenameHandler._preventDefault.call(this, oEvent);
@@ -5,19 +5,19 @@
5
5
  */
6
6
 
7
7
  sap.ui.define([
8
+ "sap/base/i18n/Localization",
8
9
  "sap/ui/rta/plugin/Plugin",
9
10
  "sap/ui/dt/Overlay",
10
11
  "sap/ui/dt/OverlayRegistry",
11
12
  "sap/ui/dt/util/ZIndexManager",
12
- "sap/ui/dt/Util",
13
- "sap/ui/core/Core"
13
+ "sap/ui/dt/Util"
14
14
  ], function(
15
+ Localization,
15
16
  Plugin,
16
17
  Overlay,
17
18
  OverlayRegistry,
18
19
  ZIndexManager,
19
- DtUtil,
20
- Core
20
+ DtUtil
21
21
  ) {
22
22
  "use strict";
23
23
 
@@ -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.119.0
30
+ * @version 1.120.0
31
31
  * @constructor
32
32
  * @private
33
33
  * @since 1.101
@@ -52,7 +52,7 @@ sap.ui.define([
52
52
  var FULL_SCREEN_DIV_CLASS_NAME = "sapUiRtaFullScreenDiv";
53
53
  var MINIMUM_WIDTH = 15; // px
54
54
 
55
- var bRTL = Core.getConfiguration().getRTL();
55
+ var bRTL = Localization.getRTL();
56
56
  var iDirectionFactor = bRTL ? -1 : 1;
57
57
  var sBeginDirection = bRTL ? "right" : "left";
58
58
  var iKeyboardStep = 15 * iDirectionFactor; // px
@@ -34,7 +34,7 @@ function(
34
34
  * @class The Selection plugin allows you to select or focus overlays with mouse or keyboard and navigate to others.
35
35
  * @extends sap.ui.rta.plugin.Plugin
36
36
  * @author SAP SE
37
- * @version 1.119.0
37
+ * @version 1.120.0
38
38
  * @constructor
39
39
  * @private
40
40
  * @since 1.34
@@ -98,20 +98,6 @@ function(
98
98
  });
99
99
  }
100
100
 
101
- // If a parent overlay is movable it should not be draggable by a non-movable child
102
- function setOrResetFirstParentMovable(oOverlay, bSet) {
103
- if (bSet) {
104
- const oFirstMovableParentOverlay = OverlayUtil.getFirstMovableParentOverlay(oOverlay);
105
- if (oFirstMovableParentOverlay) {
106
- oOverlay._firstMovableParentOverlay = oFirstMovableParentOverlay;
107
- oFirstMovableParentOverlay.setMovable(false);
108
- }
109
- } else if (oOverlay._firstMovableParentOverlay) {
110
- oOverlay._firstMovableParentOverlay.setMovable(true);
111
- delete oOverlay._firstMovableParentOverlay;
112
- }
113
- }
114
-
115
101
  Selection.prototype.init = function(...aArgs) {
116
102
  this._multiSelectionValidator = this._multiSelectionValidator.bind(this);
117
103
  Plugin.prototype.init.apply(this, aArgs);
@@ -342,7 +328,7 @@ function(
342
328
  return;
343
329
  }
344
330
  if (oOverlay.isSelectable()) {
345
- setOrResetFirstParentMovable(oOverlay, true);
331
+ OverlayUtil.setFirstParentMovable(oOverlay, false);
346
332
  if (oOverlay !== this._oHoverTarget) {
347
333
  this._removePreviousHover();
348
334
  this._oHoverTarget = oOverlay;
@@ -367,7 +353,7 @@ function(
367
353
  return;
368
354
  }
369
355
  if (oOverlay.isSelectable()) {
370
- setOrResetFirstParentMovable(oOverlay);
356
+ OverlayUtil.setFirstParentMovable(oOverlay, true);
371
357
  this._removePreviousHover();
372
358
  preventEventDefaultAndPropagation(oEvent);
373
359
  }
@@ -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.119.0
28
+ * @version 1.120.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.119.0
26
+ * @version 1.120.0
27
27
  * @constructor
28
28
  * @private
29
29
  * @since 1.46
@@ -31,7 +31,7 @@ sap.ui.define([
31
31
  * @extends sap.ui.rta.plugin.Plugin
32
32
  *
33
33
  * @author SAP SE
34
- * @version 1.119.0
34
+ * @version 1.120.0
35
35
  *
36
36
  * @constructor
37
37
  * @private
@@ -9,6 +9,7 @@ sap.ui.define([
9
9
  "sap/base/util/merge",
10
10
  "sap/base/Log",
11
11
  "sap/ui/core/util/reflection/JsControlTreeModifier",
12
+ "sap/ui/core/Lib",
12
13
  "sap/ui/dt/ElementUtil",
13
14
  "sap/ui/dt/OverlayRegistry",
14
15
  "sap/ui/fl/apply/api/DelegateMediatorAPI",
@@ -19,6 +20,7 @@ sap.ui.define([
19
20
  merge,
20
21
  Log,
21
22
  JsControlTreeModifier,
23
+ Lib,
22
24
  ElementUtil,
23
25
  OverlayRegistry,
24
26
  DelegateMediatorAPI,
@@ -32,7 +34,7 @@ sap.ui.define([
32
34
  * handled by the AdditionalElements Plugin (Reveal, Add Via Delegate, Add Custom)
33
35
  *
34
36
  * @author SAP SE
35
- * @version 1.119.0
37
+ * @version 1.120.0
36
38
  * @private
37
39
  * @since 1.94
38
40
  */
@@ -42,7 +44,7 @@ sap.ui.define([
42
44
  var aLoadLibraryPromises = [];
43
45
  var aRequiredLibraries = DelegateMediatorAPI.getKnownDefaultDelegateLibraries();
44
46
  aRequiredLibraries.forEach(function(sLibrary) {
45
- var oLoadLibraryPromise = sap.ui.getCore().loadLibrary(sLibrary, { async: true })
47
+ var oLoadLibraryPromise = Lib.load({name: sLibrary})
46
48
  .then(function() {
47
49
  return Promise.resolve(sLibrary);
48
50
  })
@@ -5,6 +5,7 @@
5
5
  */
6
6
  sap.ui.define([
7
7
  "sap/ui/base/ManagedObject",
8
+ "sap/ui/core/Element",
8
9
  "sap/ui/core/Fragment",
9
10
  "sap/ui/fl/write/api/FieldExtensibility",
10
11
  "sap/ui/model/json/JSONModel",
@@ -15,6 +16,7 @@ sap.ui.define([
15
16
  "sap/ui/rta/Utils"
16
17
  ], function(
17
18
  ManagedObject,
19
+ Element,
18
20
  Fragment,
19
21
  FieldExtensibility,
20
22
  JSONModel,
@@ -32,7 +34,7 @@ sap.ui.define([
32
34
  * @class Context - Dialog for available Fields in Runtime Authoring
33
35
  * @extends sap.ui.base.ManagedObject
34
36
  * @author SAP SE
35
- * @version 1.119.0
37
+ * @version 1.120.0
36
38
  * @constructor
37
39
  * @private
38
40
  * @since 1.44
@@ -95,7 +97,7 @@ sap.ui.define([
95
97
 
96
98
  // retrieve List to set the sorting for the 'items' aggregation, since sap.ui.model.Sorter
97
99
  // does not support binding to a model property...
98
- this._oList = sap.ui.getCore().byId(`${this.getId()}--rta_addElementsDialogList`);
100
+ this._oList = Element.getElementById(`${this.getId()}--rta_addElementsDialogList`);
99
101
  this._bDescendingSortOrder = false;
100
102
  }.bind(this));
101
103
  };
@@ -8,6 +8,7 @@ sap.ui.define([
8
8
  "sap/base/util/each",
9
9
  "sap/base/Log",
10
10
  "sap/ui/core/IconPool",
11
+ "sap/ui/core/Lib",
11
12
  "sap/ui/dt/OverlayRegistry",
12
13
  "sap/ui/dt/OverlayUtil",
13
14
  "sap/ui/fl/write/api/FieldExtensibility",
@@ -22,6 +23,7 @@ sap.ui.define([
22
23
  each,
23
24
  Log,
24
25
  IconPool,
26
+ Lib,
25
27
  OverlayRegistry,
26
28
  OverlayUtil,
27
29
  FieldExtensibility,
@@ -75,7 +77,7 @@ sap.ui.define([
75
77
  * @class The plugin allows to add additional elements that exist either hidden in the UI or in the OData service
76
78
  * @extends sap.ui.rta.plugin.Plugin
77
79
  * @author SAP SE
78
- * @version 1.119.0
80
+ * @version 1.120.0
79
81
  * @constructor
80
82
  * @private
81
83
  * @since 1.44
@@ -115,7 +117,7 @@ sap.ui.define([
115
117
  var oTextResources;
116
118
 
117
119
  function getGenericText() {
118
- oTextResources = sap.ui.getCore().getLibraryResourceBundle("sap.ui.rta");
120
+ oTextResources = Lib.getResourceBundleFor("sap.ui.rta");
119
121
  return oTextResources.getText("CTX_ADD_ELEMENTS", [oTextResources.getText("MULTIPLE_CONTROL_NAME")]);
120
122
  }
121
123
 
@@ -127,7 +129,7 @@ sap.ui.define([
127
129
 
128
130
  // When a submenu is present, the text is always the same
129
131
  if (bHasSubMenu) {
130
- oTextResources = sap.ui.getCore().getLibraryResourceBundle("sap.ui.rta");
132
+ oTextResources = Lib.getResourceBundleFor("sap.ui.rta");
131
133
  return oTextResources.getText("CTX_ADD_ELEMENTS_WITH_SUBMENU");
132
134
  }
133
135
  var mParents = AdditionalElementsUtils.getParents(bOverlayIsSibling, oOverlay, this);
@@ -266,7 +268,7 @@ sap.ui.define([
266
268
  this.getDialog().setElements(aElementsPerAggregation);
267
269
  if (sDisplayText) {
268
270
  // Aggregation is part of title
269
- var oTextResources = sap.ui.getCore().getLibraryResourceBundle("sap.ui.rta");
271
+ var oTextResources = Lib.getResourceBundleFor("sap.ui.rta");
270
272
  var sDialogTitle = oTextResources.getText("HEADER_ADDITIONAL_ELEMENTS_WITH_AGGREGATION", [sDisplayText]);
271
273
  this.getDialog().setTitle(sDialogTitle);
272
274
  } else if (sAggregationName || sControlName) {
@@ -5,8 +5,10 @@
5
5
  */
6
6
 
7
7
  sap.ui.define([
8
+ "sap/ui/core/Lib",
8
9
  "sap/ui/dt/OverlayRegistry"
9
10
  ], function(
11
+ Lib,
10
12
  OverlayRegistry
11
13
  ) {
12
14
  "use strict";
@@ -15,7 +17,7 @@ sap.ui.define([
15
17
  * Helper object containing methods for the AdditionalElements plugin
16
18
  *
17
19
  * @author SAP SE
18
- * @version 1.119.0
20
+ * @version 1.120.0
19
21
  * @private
20
22
  * @since 1.94
21
23
  */
@@ -98,7 +100,7 @@ sap.ui.define([
98
100
  return _aNames;
99
101
  }, []);
100
102
 
101
- var oTextResources = sap.ui.getCore().getLibraryResourceBundle("sap.ui.rta");
103
+ var oTextResources = Lib.getResourceBundleFor("sap.ui.rta");
102
104
 
103
105
  if (aNonDuplicateNames.length === 1) {
104
106
  [sControlType] = aNonDuplicateNames;
@@ -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.119.0
28
+ * @version 1.120.0
29
29
  * @private
30
30
  * @since 1.94
31
31
  */