@openui5/sap.ui.rta 1.117.1 → 1.119.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 (177) hide show
  1. package/.eslintrc.json +25 -1
  2. package/THIRDPARTY.txt +2 -2
  3. package/package.json +6 -6
  4. package/src/sap/ui/rta/.library +1 -1
  5. package/src/sap/ui/rta/Client.js +32 -21
  6. package/src/sap/ui/rta/RuntimeAuthoring.js +107 -97
  7. package/src/sap/ui/rta/Utils.js +10 -16
  8. package/src/sap/ui/rta/api/startAdaptation.js +0 -1
  9. package/src/sap/ui/rta/api/startKeyUserAdaptation.js +0 -1
  10. package/src/sap/ui/rta/appVariant/AppVariantDialog.js +24 -26
  11. package/src/sap/ui/rta/appVariant/AppVariantManager.js +1 -3
  12. package/src/sap/ui/rta/appVariant/AppVariantOverviewDialog.js +5 -4
  13. package/src/sap/ui/rta/appVariant/AppVariantUtils.js +21 -21
  14. package/src/sap/ui/rta/appVariant/Feature.js +20 -30
  15. package/src/sap/ui/rta/appVariant/S4HanaCloudBackend.js +21 -17
  16. package/src/sap/ui/rta/appVariant/Utils.js +4 -3
  17. package/src/sap/ui/rta/appVariant/manageApps/webapp/Component.js +8 -7
  18. package/src/sap/ui/rta/appVariant/manageApps/webapp/controller/ManageApps.controller.js +17 -17
  19. package/src/sap/ui/rta/appVariant/manageApps/webapp/manifest.json +1 -1
  20. package/src/sap/ui/rta/appVariant/manageApps/webapp/model/models.js +1 -1
  21. package/src/sap/ui/rta/command/AddIFrame.js +10 -7
  22. package/src/sap/ui/rta/command/AddProperty.js +1 -3
  23. package/src/sap/ui/rta/command/AddXML.js +7 -7
  24. package/src/sap/ui/rta/command/AddXMLAtExtensionPoint.js +5 -5
  25. package/src/sap/ui/rta/command/AppDescriptorCommand.js +1 -3
  26. package/src/sap/ui/rta/command/BaseCommand.js +1 -3
  27. package/src/sap/ui/rta/command/BindProperty.js +4 -5
  28. package/src/sap/ui/rta/command/Combine.js +1 -3
  29. package/src/sap/ui/rta/command/CommandFactory.js +7 -11
  30. package/src/sap/ui/rta/command/CompositeCommand.js +2 -6
  31. package/src/sap/ui/rta/command/ControlVariantConfigure.js +2 -2
  32. package/src/sap/ui/rta/command/ControlVariantSave.js +1 -1
  33. package/src/sap/ui/rta/command/ControlVariantSaveAs.js +4 -4
  34. package/src/sap/ui/rta/command/ControlVariantSetTitle.js +1 -1
  35. package/src/sap/ui/rta/command/ControlVariantSwitch.js +4 -3
  36. package/src/sap/ui/rta/command/CreateContainer.js +1 -3
  37. package/src/sap/ui/rta/command/CustomAdd.js +1 -2
  38. package/src/sap/ui/rta/command/FlexCommand.js +2 -7
  39. package/src/sap/ui/rta/command/LREPSerializer.js +1 -3
  40. package/src/sap/ui/rta/command/LocalReset.js +1 -1
  41. package/src/sap/ui/rta/command/Move.js +1 -3
  42. package/src/sap/ui/rta/command/Property.js +1 -3
  43. package/src/sap/ui/rta/command/Remove.js +1 -3
  44. package/src/sap/ui/rta/command/Rename.js +1 -3
  45. package/src/sap/ui/rta/command/Resize.js +1 -1
  46. package/src/sap/ui/rta/command/Reveal.js +1 -3
  47. package/src/sap/ui/rta/command/Settings.js +5 -7
  48. package/src/sap/ui/rta/command/Split.js +1 -3
  49. package/src/sap/ui/rta/command/Stack.js +3 -5
  50. package/src/sap/ui/rta/command/appDescriptor/AddLibrary.js +1 -3
  51. package/src/sap/ui/rta/command/compVariant/CompVariantContent.js +1 -1
  52. package/src/sap/ui/rta/command/compVariant/CompVariantSaveAs.js +1 -1
  53. package/src/sap/ui/rta/command/compVariant/CompVariantSwitch.js +4 -3
  54. package/src/sap/ui/rta/command/compVariant/CompVariantUpdate.js +1 -1
  55. package/src/sap/ui/rta/enablement/TestDelegate.js +7 -8
  56. package/src/sap/ui/rta/enablement/elementActionTest.js +25 -29
  57. package/src/sap/ui/rta/library.js +2 -3
  58. package/src/sap/ui/rta/messagebundle.properties +13 -7
  59. package/src/sap/ui/rta/messagebundle_ar.properties +8 -8
  60. package/src/sap/ui/rta/messagebundle_bg.properties +20 -20
  61. package/src/sap/ui/rta/messagebundle_ca.properties +7 -7
  62. package/src/sap/ui/rta/messagebundle_cs.properties +10 -10
  63. package/src/sap/ui/rta/messagebundle_cy.properties +8 -8
  64. package/src/sap/ui/rta/messagebundle_da.properties +7 -7
  65. package/src/sap/ui/rta/messagebundle_de.properties +9 -9
  66. package/src/sap/ui/rta/messagebundle_el.properties +7 -7
  67. package/src/sap/ui/rta/messagebundle_en.properties +11 -8
  68. package/src/sap/ui/rta/messagebundle_en_GB.properties +8 -8
  69. package/src/sap/ui/rta/messagebundle_en_US_sappsd.properties +8 -8
  70. package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +7 -7
  71. package/src/sap/ui/rta/messagebundle_en_US_saptrc.properties +8 -8
  72. package/src/sap/ui/rta/messagebundle_es.properties +8 -8
  73. package/src/sap/ui/rta/messagebundle_es_MX.properties +13 -13
  74. package/src/sap/ui/rta/messagebundle_et.properties +6 -6
  75. package/src/sap/ui/rta/messagebundle_fi.properties +9 -9
  76. package/src/sap/ui/rta/messagebundle_fr.properties +9 -9
  77. package/src/sap/ui/rta/messagebundle_fr_CA.properties +9 -9
  78. package/src/sap/ui/rta/messagebundle_hi.properties +12 -12
  79. package/src/sap/ui/rta/messagebundle_hr.properties +9 -9
  80. package/src/sap/ui/rta/messagebundle_hu.properties +10 -10
  81. package/src/sap/ui/rta/messagebundle_id.properties +10 -10
  82. package/src/sap/ui/rta/messagebundle_it.properties +9 -9
  83. package/src/sap/ui/rta/messagebundle_iw.properties +8 -8
  84. package/src/sap/ui/rta/messagebundle_ja.properties +21 -21
  85. package/src/sap/ui/rta/messagebundle_kk.properties +9 -9
  86. package/src/sap/ui/rta/messagebundle_ko.properties +7 -7
  87. package/src/sap/ui/rta/messagebundle_lt.properties +8 -8
  88. package/src/sap/ui/rta/messagebundle_lv.properties +8 -8
  89. package/src/sap/ui/rta/messagebundle_ms.properties +11 -11
  90. package/src/sap/ui/rta/messagebundle_nl.properties +8 -8
  91. package/src/sap/ui/rta/messagebundle_no.properties +9 -9
  92. package/src/sap/ui/rta/messagebundle_pl.properties +9 -9
  93. package/src/sap/ui/rta/messagebundle_pt.properties +9 -9
  94. package/src/sap/ui/rta/messagebundle_pt_PT.properties +8 -8
  95. package/src/sap/ui/rta/messagebundle_ro.properties +9 -9
  96. package/src/sap/ui/rta/messagebundle_ru.properties +8 -8
  97. package/src/sap/ui/rta/messagebundle_sh.properties +8 -8
  98. package/src/sap/ui/rta/messagebundle_sk.properties +9 -9
  99. package/src/sap/ui/rta/messagebundle_sl.properties +9 -9
  100. package/src/sap/ui/rta/messagebundle_sv.properties +8 -8
  101. package/src/sap/ui/rta/messagebundle_th.properties +14 -14
  102. package/src/sap/ui/rta/messagebundle_tr.properties +8 -8
  103. package/src/sap/ui/rta/messagebundle_uk.properties +10 -10
  104. package/src/sap/ui/rta/messagebundle_vi.properties +8 -8
  105. package/src/sap/ui/rta/messagebundle_zh_CN.properties +9 -9
  106. package/src/sap/ui/rta/messagebundle_zh_TW.properties +8 -8
  107. package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +1 -2
  108. package/src/sap/ui/rta/plugin/BaseCreate.js +2 -3
  109. package/src/sap/ui/rta/plugin/Combine.js +1 -2
  110. package/src/sap/ui/rta/plugin/ControlVariant.js +12 -8
  111. package/src/sap/ui/rta/plugin/CreateContainer.js +1 -2
  112. package/src/sap/ui/rta/plugin/CutPaste.js +13 -13
  113. package/src/sap/ui/rta/plugin/DragDrop.js +17 -16
  114. package/src/sap/ui/rta/plugin/EasyAdd.js +12 -10
  115. package/src/sap/ui/rta/plugin/EasyRemove.js +11 -9
  116. package/src/sap/ui/rta/plugin/LocalReset.js +4 -2
  117. package/src/sap/ui/rta/plugin/Plugin.js +6 -10
  118. package/src/sap/ui/rta/plugin/RTAElementMover.js +3 -6
  119. package/src/sap/ui/rta/plugin/Remove.js +8 -9
  120. package/src/sap/ui/rta/plugin/Rename.js +9 -9
  121. package/src/sap/ui/rta/plugin/RenameHandler.js +21 -22
  122. package/src/sap/ui/rta/plugin/Resize.js +11 -10
  123. package/src/sap/ui/rta/plugin/Selection.js +33 -14
  124. package/src/sap/ui/rta/plugin/Settings.js +11 -11
  125. package/src/sap/ui/rta/plugin/Split.js +1 -2
  126. package/src/sap/ui/rta/plugin/Stretch.js +18 -20
  127. package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +4 -9
  128. package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +5 -9
  129. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js +4 -4
  130. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +41 -43
  131. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +2 -3
  132. package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +5 -6
  133. package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +9 -7
  134. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.fragment.xml +45 -3
  135. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +22 -23
  136. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialogController.js +58 -30
  137. package/src/sap/ui/rta/service/Action.js +5 -6
  138. package/src/sap/ui/rta/service/ControllerExtension.js +8 -9
  139. package/src/sap/ui/rta/service/Outline.js +13 -11
  140. package/src/sap/ui/rta/service/Property.js +3 -4
  141. package/src/sap/ui/rta/service/Receiver.js +2 -2
  142. package/src/sap/ui/rta/service/Selection.js +2 -3
  143. package/src/sap/ui/rta/service/SupportTools.js +2 -3
  144. package/src/sap/ui/rta/themes/base/AddIFrame.less +6 -1
  145. package/src/sap/ui/rta/themes/base/Toolbar.base.less +4 -0
  146. package/src/sap/ui/rta/toolbar/Adaptation.js +26 -19
  147. package/src/sap/ui/rta/toolbar/Base.js +25 -11
  148. package/src/sap/ui/rta/toolbar/BaseRenderer.js +2 -2
  149. package/src/sap/ui/rta/toolbar/FeedbackDialog.fragment.xml +4 -4
  150. package/src/sap/ui/rta/toolbar/Fiori.js +20 -20
  151. package/src/sap/ui/rta/toolbar/FioriLike.js +1 -2
  152. package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +5 -6
  153. package/src/sap/ui/rta/toolbar/Personalization.js +4 -4
  154. package/src/sap/ui/rta/toolbar/Standalone.js +1 -2
  155. package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptations.js +43 -20
  156. package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptation.js +16 -7
  157. package/src/sap/ui/rta/toolbar/translation/Translation.js +13 -14
  158. package/src/sap/ui/rta/toolbar/versioning/Versioning.js +31 -28
  159. package/src/sap/ui/rta/util/Animation.js +1 -3
  160. package/src/sap/ui/rta/util/PluginManager.js +1 -3
  161. package/src/sap/ui/rta/util/PopupManager.js +23 -19
  162. package/src/sap/ui/rta/util/ReloadManager.js +4 -4
  163. package/src/sap/ui/rta/util/ServiceEventBus.js +1 -1
  164. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +18 -16
  165. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +6 -9
  166. package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +9 -10
  167. package/src/sap/ui/rta/util/changeVisualization/ChangeVisualizationUtils.js +1 -1
  168. package/src/sap/ui/rta/util/changeVisualization/commands/CombineVisualization.js +1 -1
  169. package/src/sap/ui/rta/util/changeVisualization/commands/CreateContainerVisualization.js +2 -2
  170. package/src/sap/ui/rta/util/changeVisualization/commands/MoveVisualization.js +4 -4
  171. package/src/sap/ui/rta/util/changeVisualization/commands/SplitVisualization.js +2 -2
  172. package/src/sap/ui/rta/util/hasStableId.js +1 -1
  173. package/src/sap/ui/rta/util/showMessageBox.js +2 -1
  174. package/src/sap/ui/rta/util/validateStableIds.js +1 -1
  175. package/src/sap/ui/rta/util/validateText.js +1 -1
  176. package/src/sap/ui/rta/util/StylesLoader.js +0 -31
  177. package/src/sap/ui/rta/util/UrlParser.js +0 -51
@@ -42,7 +42,7 @@ sap.ui.define([
42
42
  * @alias sap.ui.rta.util.changeVisualization.ChangeIndicator
43
43
  * @author SAP SE
44
44
  * @since 1.84.0
45
- * @version 1.117.1
45
+ * @version 1.119.0
46
46
  * @private
47
47
  */
48
48
  var ChangeIndicator = Control.extend("sap.ui.rta.util.changeVisualization.ChangeIndicator", {
@@ -115,7 +115,7 @@ sap.ui.define([
115
115
  },
116
116
  renderer: {
117
117
  apiVersion: 2,
118
- render: function(oRm, oControl) {
118
+ render(oRm, oControl) {
119
119
  oRm.openStart("div", oControl);
120
120
  oRm.class("sapUiRtaChangeIndicator");
121
121
  oRm.class("sapUiRtaChangeIndicatorChange");
@@ -132,7 +132,7 @@ sap.ui.define([
132
132
  }
133
133
  oRm.openEnd();
134
134
  if (sTooltip) {
135
- oRm.openStart("span", oControl.getId() + "-tooltip");
135
+ oRm.openStart("span", `${oControl.getId()}-tooltip`);
136
136
  oRm.class("sapUiInvisibleText");
137
137
  oRm.openEnd();
138
138
  oRm.text(sTooltip);
@@ -141,12 +141,13 @@ sap.ui.define([
141
141
  oRm.close("div");
142
142
  }
143
143
  },
144
- constructor: function() {
144
+ // eslint-disable-next-line object-shorthand
145
+ constructor: function(...aArgs) {
145
146
  this._oDetailModel = new JSONModel();
146
147
  this._oDetailModel.setDefaultBindingMode("OneWay");
147
148
  this._fnHoverTrue = this._setHoverStyleClasses.bind(this, true);
148
149
  this._fnHoverFalse = this._setHoverStyleClasses.bind(this, false);
149
- Control.prototype.constructor.apply(this, arguments);
150
+ Control.prototype.constructor.apply(this, aArgs);
150
151
  // is needed to prevent that multiple events listeners are attached
151
152
  // to the same overlay because setVisible is called multiple times
152
153
  this._bEventAttachedToElement = false;
@@ -216,17 +217,17 @@ sap.ui.define([
216
217
  } else {
217
218
  var sShortenedElementLabel = ChangeVisualizationUtils.shortenString(sElementLabel);
218
219
  var sChangeTextKey = (
219
- "TXT_CHANGEVISUALIZATION_CHANGE_"
220
- + sCommandName.toUpperCase()
220
+ `TXT_CHANGEVISUALIZATION_CHANGE_${
221
+ sCommandName.toUpperCase()}`
221
222
  );
222
- sDescriptionText = oRtaResourceBundle.getText(sChangeTextKey, sShortenedElementLabel);
223
- sDescriptionTooltip = oRtaResourceBundle.getText(sChangeTextKey, sElementLabel);
223
+ sDescriptionText = oRtaResourceBundle.getText(sChangeTextKey, [sShortenedElementLabel]);
224
+ sDescriptionTooltip = oRtaResourceBundle.getText(sChangeTextKey, [sElementLabel]);
224
225
  }
225
226
  sDescriptionTooltip = sDescriptionText.length < sDescriptionTooltip.length ? sDescriptionTooltip : null;
226
227
  var sDetailButtonText = oDescription && oDescription.buttonText;
227
228
  var sIconTooltip = oRtaResourceBundle.getText(
228
- "TXT_CHANGEVISUALIZATION_OVERVIEW_"
229
- + mChangeInformation.changeCategory.toUpperCase()
229
+ `TXT_CHANGEVISUALIZATION_OVERVIEW_${
230
+ mChangeInformation.changeCategory.toUpperCase()}`
230
231
  );
231
232
 
232
233
  return {
@@ -271,8 +272,9 @@ sap.ui.define([
271
272
  handleBrowserEventsOnIndicator.call(this, this, "attachBrowserEvent");
272
273
  };
273
274
 
274
- ChangeIndicator.prototype.setVisible = function(bVisible) {
275
- Control.prototype.setVisible.apply(this, arguments);
275
+ ChangeIndicator.prototype.setVisible = function(...aArgs) {
276
+ const [bVisible] = aArgs;
277
+ Control.prototype.setVisible.apply(this, aArgs);
276
278
  var oOverlay = Core.byId(this.getOverlayId());
277
279
  // needed because the change indicator cleanup is only triggered on save and exit
278
280
  if (oOverlay) {
@@ -291,10 +293,10 @@ sap.ui.define([
291
293
  return this;
292
294
  };
293
295
 
294
- ChangeIndicator.prototype.focus = function() {
296
+ ChangeIndicator.prototype.focus = function(...aArgs) {
295
297
  if (this.getDomRef()) {
296
298
  // Element is rendered, focus immediately
297
- Control.prototype.focus.apply(this, arguments);
299
+ Control.prototype.focus.apply(this, aArgs);
298
300
  this._bScheduledForFocus = false;
299
301
  return;
300
302
  }
@@ -405,7 +407,7 @@ sap.ui.define([
405
407
  this._iOldTabIndex = this.getDomRef().getAttribute("tabindex");
406
408
  Fragment.load({
407
409
  name: "sap.ui.rta.util.changeVisualization.ChangeIndicatorPopover",
408
- id: this.sId + "Info",
410
+ id: `${this.sId}Info`,
409
411
  controller: this
410
412
  }).then(function(oPopover) {
411
413
  oPopover._bOpenedByChangeIndicator = true;
@@ -39,7 +39,7 @@ sap.ui.define([
39
39
  * @alias sap.ui.rta.util.changeVisualization.ChangeIndicatorRegistry
40
40
  * @author SAP SE
41
41
  * @since 1.86.0
42
- * @version 1.117.1
42
+ * @version 1.119.0
43
43
  * @private
44
44
  */
45
45
  var ChangeIndicatorRegistry = ManagedObject.extend("sap.ui.rta.util.changeVisualization.ChangeIndicatorRegistry", {
@@ -60,8 +60,9 @@ sap.ui.define([
60
60
  }
61
61
  }
62
62
  },
63
- constructor: function() {
64
- ManagedObject.prototype.constructor.apply(this, arguments);
63
+ // eslint-disable-next-line object-shorthand
64
+ constructor: function(...aArgs) {
65
+ ManagedObject.prototype.constructor.apply(this, aArgs);
65
66
 
66
67
  // List of entries with indicator data, grouped by Change ID
67
68
  this._oRegisteredChanges = {};
@@ -194,9 +195,7 @@ sap.ui.define([
194
195
  sChangeCategory = Object.keys(aCategories).find(function(sChangeCategoryName) {
195
196
  return includes(aCategories[sChangeCategoryName], sCommandName);
196
197
  });
197
- if (!sChangeCategory) {
198
- sChangeCategory = ChangeCategories.OTHER;
199
- }
198
+ sChangeCategory ||= ChangeCategories.OTHER;
200
199
  }
201
200
  var aChangeStates;
202
201
  var aDraftChangesList = [];
@@ -259,9 +258,7 @@ sap.ui.define([
259
258
 
260
259
  function getInfoFromChangeHandler(oAppComponent, oChange) {
261
260
  var oSelector = oChange.getOriginalSelector && oChange.getOriginalSelector();
262
- if (!oSelector) {
263
- oSelector = oChange.getSelector && oChange.getSelector();
264
- }
261
+ oSelector ||= oChange.getSelector && oChange.getSelector();
265
262
  var oControl = JsControlTreeModifier.bySelector(oSelector, oAppComponent);
266
263
  if (oControl) {
267
264
  return ChangesWriteAPI.getChangeHandler({
@@ -82,7 +82,7 @@ sap.ui.define([
82
82
  * @alias sap.ui.rta.util.changeVisualization.ChangeVisualization
83
83
  * @author SAP SE
84
84
  * @since 1.84.0
85
- * @version 1.117.1
85
+ * @version 1.119.0
86
86
  * @private
87
87
  */
88
88
  var ChangeVisualization = Control.extend("sap.ui.rta.util.changeVisualization.ChangeVisualization", {
@@ -110,12 +110,13 @@ sap.ui.define([
110
110
  }
111
111
  }
112
112
  },
113
- constructor: function() {
113
+ // eslint-disable-next-line object-shorthand
114
+ constructor: function(...aArgs) {
114
115
  this._oChangeIndicatorRegistry = new ChangeIndicatorRegistry({
115
116
  changeCategories: ChangeCategories.getCategories()
116
117
  });
117
118
 
118
- Control.prototype.constructor.apply(this, arguments);
119
+ Control.prototype.constructor.apply(this, aArgs);
119
120
 
120
121
  this._oTextBundle = Core.getLibraryResourceBundle("sap.ui.rta");
121
122
  this.setModel(new ResourceModel({
@@ -316,20 +317,18 @@ sap.ui.define([
316
317
  };
317
318
 
318
319
  ChangeVisualization.prototype._getChangeCategoryLabel = function(sChangeCategoryName, iChangesCount) {
319
- var sLabelKey = "TXT_CHANGEVISUALIZATION_OVERVIEW_" + sChangeCategoryName.toUpperCase();
320
+ var sLabelKey = `TXT_CHANGEVISUALIZATION_OVERVIEW_${sChangeCategoryName.toUpperCase()}`;
320
321
  return this._oTextBundle.getText(sLabelKey, [iChangesCount]);
321
322
  };
322
323
 
323
324
  ChangeVisualization.prototype._getChangeCategoryButton = function(sChangeCategoryName) {
324
- var sButtonKey = "BTN_CHANGEVISUALIZATION_OVERVIEW_" + sChangeCategoryName.toUpperCase();
325
+ var sButtonKey = `BTN_CHANGEVISUALIZATION_OVERVIEW_${sChangeCategoryName.toUpperCase()}`;
325
326
  return this._oTextBundle.getText(sButtonKey);
326
327
  };
327
328
 
328
329
  ChangeVisualization.prototype.openChangeCategorySelectionPopover = function(oEvent) {
329
- if (!this._oToolbarButton) {
330
- // Event bubbled through the toolbar, get original source
331
- this._oToolbarButton = Core.byId(oEvent.getParameter("id"));
332
- }
330
+ // Event bubbled through the toolbar, get original source
331
+ this._oToolbarButton ||= Core.byId(oEvent.getParameter("id"));
333
332
  var oPopover = this.getPopover();
334
333
 
335
334
  if (!oPopover) {
@@ -648,7 +647,7 @@ sap.ui.define([
648
647
  selectChange: this.selectChange.bind(this)
649
648
  });
650
649
  oChangeIndicator.setModel(this._oChangeVisualizationModel);
651
- oChangeIndicator.bindElement("/content/" + sSelectorId);
650
+ oChangeIndicator.bindElement(`/content/${sSelectorId}`);
652
651
  oChangeIndicator.setModel(this.getModel("i18n"), "i18n");
653
652
  this._oChangeIndicatorRegistry.registerChangeIndicator(sSelectorId, oChangeIndicator);
654
653
  };
@@ -28,7 +28,7 @@ sap.ui.define([
28
28
  if (iStringLength > 60) {
29
29
  var sFirstPart = sString.substring(0, 27);
30
30
  var sLastPart = sString.substring(iStringLength - 27);
31
- sString = sFirstPart + "(...)" + sLastPart;
31
+ sString = `${sFirstPart}(...)${sLastPart}`;
32
32
  }
33
33
  return sString;
34
34
  };
@@ -77,7 +77,7 @@ sap.ui.define([
77
77
  ),
78
78
  descriptionTooltip: aLabels
79
79
  .map(function(sLabel) {
80
- return "\"" + sLabel + "\"";
80
+ return `"${sLabel}"`;
81
81
  })
82
82
  .join(",\n")
83
83
  };
@@ -30,8 +30,8 @@ sap.ui.define([
30
30
  var sShortenedElementLabel = ChangeVisualizationUtils.shortenString(sElementLabel);
31
31
  var sTextKey = "TXT_CHANGEVISUALIZATION_CHANGE_CREATECONTAINER";
32
32
  return {
33
- descriptionText: oRtaResourceBundle.getText(sTextKey, sShortenedElementLabel),
34
- descriptionTooltip: oRtaResourceBundle.getText(sTextKey, sElementLabel)
33
+ descriptionText: oRtaResourceBundle.getText(sTextKey, [sShortenedElementLabel]),
34
+ descriptionTooltip: oRtaResourceBundle.getText(sTextKey, [sElementLabel])
35
35
  };
36
36
  };
37
37
 
@@ -28,8 +28,8 @@ sap.ui.define([
28
28
  */
29
29
  MoveVisualization.getDescription = function(mPayload, sLabel, mPropertyBag) {
30
30
  var oRtaResourceBundle = sap.ui.getCore().getLibraryResourceBundle("sap.ui.rta");
31
- var sDescriptionText = oRtaResourceBundle.getText("TXT_CHANGEVISUALIZATION_CHANGE_MOVE_WITHIN", ChangeVisualizationUtils.shortenString(sLabel));
32
- var sDescriptionTooltip = oRtaResourceBundle.getText("TXT_CHANGEVISUALIZATION_CHANGE_MOVE_WITHIN", sLabel);
31
+ var sDescriptionText = oRtaResourceBundle.getText("TXT_CHANGEVISUALIZATION_CHANGE_MOVE_WITHIN", [ChangeVisualizationUtils.shortenString(sLabel)]);
32
+ var sDescriptionTooltip = oRtaResourceBundle.getText("TXT_CHANGEVISUALIZATION_CHANGE_MOVE_WITHIN", [sLabel]);
33
33
  var sButtonText;
34
34
  var oAppComponent = mPropertyBag.appComponent;
35
35
 
@@ -43,8 +43,8 @@ sap.ui.define([
43
43
  );
44
44
 
45
45
  if (sSourceId !== sTargetId) {
46
- sDescriptionText = oRtaResourceBundle.getText("TXT_CHANGEVISUALIZATION_CHANGE_MOVE", ChangeVisualizationUtils.shortenString(sLabel));
47
- sDescriptionTooltip = (sSourceId && oRtaResourceBundle.getText("TXT_CHANGEVISUALIZATION_CHANGE_MOVE", sLabel)) || "";
46
+ sDescriptionText = oRtaResourceBundle.getText("TXT_CHANGEVISUALIZATION_CHANGE_MOVE", [ChangeVisualizationUtils.shortenString(sLabel)]);
47
+ sDescriptionTooltip = (sSourceId && oRtaResourceBundle.getText("TXT_CHANGEVISUALIZATION_CHANGE_MOVE", [sLabel])) || "";
48
48
  sButtonText = sSourceId && oRtaResourceBundle.getText("BTN_CHANGEVISUALIZATION_SHOW_DEPENDENT_CONTAINER_MOVE");
49
49
  }
50
50
  return { descriptionText: sDescriptionText, descriptionTooltip: sDescriptionTooltip, buttonText: sButtonText };
@@ -25,8 +25,8 @@ sap.ui.define([
25
25
  */
26
26
  SplitVisualization.getDescription = function(mPayload, sLabel) {
27
27
  var oRtaResourceBundle = Core.getLibraryResourceBundle("sap.ui.rta");
28
- var sDescriptionText = oRtaResourceBundle.getText("TXT_CHANGEVISUALIZATION_CHANGE_SPLIT", ChangeVisualizationUtils.shortenString(sLabel));
29
- var sDescriptionTooltip = oRtaResourceBundle.getText("TXT_CHANGEVISUALIZATION_CHANGE_SPLIT", sLabel);
28
+ var sDescriptionText = oRtaResourceBundle.getText("TXT_CHANGEVISUALIZATION_CHANGE_SPLIT", [ChangeVisualizationUtils.shortenString(sLabel)]);
29
+ var sDescriptionTooltip = oRtaResourceBundle.getText("TXT_CHANGEVISUALIZATION_CHANGE_SPLIT", [sLabel]);
30
30
  var sButtonText = oRtaResourceBundle.getText("BTN_CHANGEVISUALIZATION_SHOW_DEPENDENT_CONTAINER_SPLIT");
31
31
  return { descriptionText: sDescriptionText, descriptionTooltip: sDescriptionTooltip, buttonText: sButtonText};
32
32
  };
@@ -16,7 +16,7 @@ sap.ui.define([
16
16
  "use strict";
17
17
 
18
18
  function isCloneFromAggregationBinding(oControl) {
19
- var sParentAggregationName = oControl.sParentAggregationName;
19
+ var {sParentAggregationName} = oControl;
20
20
  var oParent = oControl.getParent();
21
21
 
22
22
  if (oParent && sParentAggregationName) {
@@ -25,7 +25,7 @@ sap.ui.define([
25
25
  }
26
26
 
27
27
  function isLink(sText) {
28
- var oRegex = new RegExp("^" + sLinkRegex + "$");
28
+ var oRegex = new RegExp(`^${sLinkRegex}$`);
29
29
  return Array.isArray(oRegex.exec(sText));
30
30
  }
31
31
 
@@ -90,6 +90,7 @@ sap.ui.define([
90
90
  }
91
91
  });
92
92
 
93
+ // eslint-disable-next-line prefer-spread
93
94
  aSymbols.splice.apply(aSymbols, [i, 1].concat(aInsert));
94
95
  i += aInsert.length;
95
96
  }
@@ -59,7 +59,7 @@ sap.ui.define([
59
59
  var oElementOverlay = aElementOverlays[i];
60
60
  var oElement = oElementOverlay.getElement();
61
61
  var bIsExtensionOverlay = aExtensionList.some(function(mViewExtension) { // eslint-disable-line no-loop-func
62
- var ClassDeclaration = ObjectPath.get(mViewExtension.className);
62
+ var ClassDeclaration = sap.ui.require(mViewExtension.className.replace(/\./g, "/"));
63
63
  var sExtensionName;
64
64
  var sElementName;
65
65
 
@@ -15,7 +15,7 @@ sap.ui.define([
15
15
  var sEmptyTextKey = "\xa0";
16
16
  var oValidators = {
17
17
  noEmptyText: {
18
- validatorFunction: function(sNewText) {
18
+ validatorFunction(sNewText) {
19
19
  return sNewText !== sEmptyTextKey;
20
20
  },
21
21
  errorMessage: Core.getLibraryResourceBundle("sap.ui.rta").getText("RENAME_EMPTY_ERROR_TEXT")
@@ -1,31 +0,0 @@
1
- /*!
2
- * OpenUI5
3
- * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
4
- * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
- */
6
-
7
- sap.ui.define([
8
- "sap/ui/thirdparty/jquery", "sap/ui/core/Configuration"
9
- ], function(jQuery, Configuration) {
10
- "use strict";
11
-
12
- var module = {};
13
-
14
- /**
15
- * Loads styles from the specified file
16
- * @param {string} sFileName - Name of the file
17
- * @return {jqXHR} - returns jqXHR object which can be thenable
18
- */
19
- module.loadStyles = function(sFileName) {
20
- return jQuery.get(sap.ui.require.toUrl(("sap.ui.rta.assets." + sFileName).replace(/\./g, "/")) + ".css")
21
- .then(function(sData) {
22
- // TODO: check if it's possible to use UI5 standard mechanism for styles adjustments
23
- if (Configuration.getRTL()) {
24
- return sData.replace(/right/g, "left");
25
- }
26
- return sData;
27
- });
28
- };
29
-
30
- return module;
31
- }, true);
@@ -1,51 +0,0 @@
1
- /*!
2
- * OpenUI5
3
- * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
4
- * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
- */
6
-
7
- sap.ui.define([], function() {
8
- "use strict";
9
-
10
- var module = {};
11
-
12
- /**
13
- * Get URL Param by name
14
- * @param {string} sParamName - Parameter name
15
- * @return {string|undefined} - Returns value of the specified param or undefined if not found
16
- */
17
- module.getParam = function(sParamName) {
18
- return module.getParams()[sParamName];
19
- };
20
-
21
- /**
22
- * Get URL parameters object from the url or given url string
23
- * @param {string} [sUrl] - Url parameter string notation starting with ? and following key value pair
24
- * @returns {object} Object with key value pairs of given parameters
25
- */
26
- module.getParams = function(sUrl) {
27
- sUrl = (sUrl || sUrl === "") ? sUrl : document.location.search;
28
- return sUrl
29
- .replace(/^\?/, "")
30
- .split("&")
31
- .reduce(function(mParams, sParam) {
32
- var aParts = sParam.split("="); // split on key/value
33
- var sValue = aParts[1];
34
-
35
- switch (sValue) {
36
- case "true":
37
- sValue = true;
38
- break;
39
- case "false":
40
- sValue = false;
41
- break;
42
- default: break;
43
- }
44
-
45
- mParams[aParts[0]] = sValue;
46
- return mParams;
47
- }, {});
48
- };
49
-
50
- return module;
51
- }, true);