@openui5/sap.ui.rta 1.117.1 → 1.118.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 (170) hide show
  1. package/.eslintrc.json +25 -1
  2. package/package.json +6 -6
  3. package/src/sap/ui/rta/.library +1 -1
  4. package/src/sap/ui/rta/Client.js +32 -21
  5. package/src/sap/ui/rta/RuntimeAuthoring.js +78 -45
  6. package/src/sap/ui/rta/Utils.js +10 -16
  7. package/src/sap/ui/rta/api/startAdaptation.js +0 -1
  8. package/src/sap/ui/rta/api/startKeyUserAdaptation.js +0 -1
  9. package/src/sap/ui/rta/appVariant/AppVariantDialog.js +24 -26
  10. package/src/sap/ui/rta/appVariant/AppVariantManager.js +1 -3
  11. package/src/sap/ui/rta/appVariant/AppVariantOverviewDialog.js +5 -4
  12. package/src/sap/ui/rta/appVariant/AppVariantUtils.js +21 -21
  13. package/src/sap/ui/rta/appVariant/Feature.js +20 -30
  14. package/src/sap/ui/rta/appVariant/S4HanaCloudBackend.js +21 -17
  15. package/src/sap/ui/rta/appVariant/Utils.js +4 -3
  16. package/src/sap/ui/rta/appVariant/manageApps/webapp/Component.js +8 -7
  17. package/src/sap/ui/rta/appVariant/manageApps/webapp/controller/ManageApps.controller.js +17 -17
  18. package/src/sap/ui/rta/appVariant/manageApps/webapp/model/models.js +1 -1
  19. package/src/sap/ui/rta/command/AddIFrame.js +5 -7
  20. package/src/sap/ui/rta/command/AddProperty.js +1 -3
  21. package/src/sap/ui/rta/command/AddXML.js +7 -7
  22. package/src/sap/ui/rta/command/AddXMLAtExtensionPoint.js +5 -5
  23. package/src/sap/ui/rta/command/AppDescriptorCommand.js +1 -3
  24. package/src/sap/ui/rta/command/BaseCommand.js +1 -3
  25. package/src/sap/ui/rta/command/BindProperty.js +4 -5
  26. package/src/sap/ui/rta/command/Combine.js +1 -3
  27. package/src/sap/ui/rta/command/CommandFactory.js +7 -11
  28. package/src/sap/ui/rta/command/CompositeCommand.js +2 -6
  29. package/src/sap/ui/rta/command/ControlVariantConfigure.js +2 -2
  30. package/src/sap/ui/rta/command/ControlVariantSave.js +1 -1
  31. package/src/sap/ui/rta/command/ControlVariantSaveAs.js +4 -4
  32. package/src/sap/ui/rta/command/ControlVariantSetTitle.js +1 -1
  33. package/src/sap/ui/rta/command/ControlVariantSwitch.js +4 -3
  34. package/src/sap/ui/rta/command/CreateContainer.js +1 -3
  35. package/src/sap/ui/rta/command/CustomAdd.js +1 -2
  36. package/src/sap/ui/rta/command/FlexCommand.js +2 -7
  37. package/src/sap/ui/rta/command/LREPSerializer.js +1 -3
  38. package/src/sap/ui/rta/command/LocalReset.js +1 -1
  39. package/src/sap/ui/rta/command/Move.js +1 -3
  40. package/src/sap/ui/rta/command/Property.js +1 -3
  41. package/src/sap/ui/rta/command/Remove.js +1 -3
  42. package/src/sap/ui/rta/command/Rename.js +1 -3
  43. package/src/sap/ui/rta/command/Resize.js +1 -1
  44. package/src/sap/ui/rta/command/Reveal.js +1 -3
  45. package/src/sap/ui/rta/command/Settings.js +5 -7
  46. package/src/sap/ui/rta/command/Split.js +1 -3
  47. package/src/sap/ui/rta/command/Stack.js +2 -4
  48. package/src/sap/ui/rta/command/appDescriptor/AddLibrary.js +1 -3
  49. package/src/sap/ui/rta/command/compVariant/CompVariantContent.js +1 -1
  50. package/src/sap/ui/rta/command/compVariant/CompVariantSaveAs.js +1 -1
  51. package/src/sap/ui/rta/command/compVariant/CompVariantSwitch.js +4 -3
  52. package/src/sap/ui/rta/command/compVariant/CompVariantUpdate.js +1 -1
  53. package/src/sap/ui/rta/enablement/TestDelegate.js +7 -8
  54. package/src/sap/ui/rta/enablement/elementActionTest.js +25 -29
  55. package/src/sap/ui/rta/library.js +2 -3
  56. package/src/sap/ui/rta/messagebundle.properties +7 -7
  57. package/src/sap/ui/rta/messagebundle_ar.properties +8 -8
  58. package/src/sap/ui/rta/messagebundle_bg.properties +7 -7
  59. package/src/sap/ui/rta/messagebundle_ca.properties +7 -7
  60. package/src/sap/ui/rta/messagebundle_cs.properties +8 -8
  61. package/src/sap/ui/rta/messagebundle_cy.properties +8 -8
  62. package/src/sap/ui/rta/messagebundle_da.properties +7 -7
  63. package/src/sap/ui/rta/messagebundle_de.properties +8 -8
  64. package/src/sap/ui/rta/messagebundle_el.properties +7 -7
  65. package/src/sap/ui/rta/messagebundle_en.properties +8 -8
  66. package/src/sap/ui/rta/messagebundle_en_GB.properties +8 -8
  67. package/src/sap/ui/rta/messagebundle_en_US_sappsd.properties +8 -8
  68. package/src/sap/ui/rta/messagebundle_en_US_saprigi.properties +7 -7
  69. package/src/sap/ui/rta/messagebundle_en_US_saptrc.properties +8 -8
  70. package/src/sap/ui/rta/messagebundle_es.properties +8 -8
  71. package/src/sap/ui/rta/messagebundle_es_MX.properties +8 -8
  72. package/src/sap/ui/rta/messagebundle_et.properties +6 -6
  73. package/src/sap/ui/rta/messagebundle_fi.properties +8 -8
  74. package/src/sap/ui/rta/messagebundle_fr.properties +8 -8
  75. package/src/sap/ui/rta/messagebundle_fr_CA.properties +9 -9
  76. package/src/sap/ui/rta/messagebundle_hi.properties +7 -7
  77. package/src/sap/ui/rta/messagebundle_hr.properties +8 -8
  78. package/src/sap/ui/rta/messagebundle_hu.properties +8 -8
  79. package/src/sap/ui/rta/messagebundle_id.properties +8 -8
  80. package/src/sap/ui/rta/messagebundle_it.properties +8 -8
  81. package/src/sap/ui/rta/messagebundle_iw.properties +8 -8
  82. package/src/sap/ui/rta/messagebundle_ja.properties +8 -8
  83. package/src/sap/ui/rta/messagebundle_kk.properties +8 -8
  84. package/src/sap/ui/rta/messagebundle_ko.properties +7 -7
  85. package/src/sap/ui/rta/messagebundle_lt.properties +8 -8
  86. package/src/sap/ui/rta/messagebundle_lv.properties +8 -8
  87. package/src/sap/ui/rta/messagebundle_ms.properties +8 -8
  88. package/src/sap/ui/rta/messagebundle_nl.properties +8 -8
  89. package/src/sap/ui/rta/messagebundle_no.properties +8 -8
  90. package/src/sap/ui/rta/messagebundle_pl.properties +9 -9
  91. package/src/sap/ui/rta/messagebundle_pt.properties +8 -8
  92. package/src/sap/ui/rta/messagebundle_pt_PT.properties +8 -8
  93. package/src/sap/ui/rta/messagebundle_ro.properties +8 -8
  94. package/src/sap/ui/rta/messagebundle_ru.properties +8 -8
  95. package/src/sap/ui/rta/messagebundle_sh.properties +8 -8
  96. package/src/sap/ui/rta/messagebundle_sk.properties +8 -8
  97. package/src/sap/ui/rta/messagebundle_sl.properties +8 -8
  98. package/src/sap/ui/rta/messagebundle_sv.properties +8 -8
  99. package/src/sap/ui/rta/messagebundle_th.properties +8 -8
  100. package/src/sap/ui/rta/messagebundle_tr.properties +8 -8
  101. package/src/sap/ui/rta/messagebundle_uk.properties +8 -8
  102. package/src/sap/ui/rta/messagebundle_vi.properties +8 -8
  103. package/src/sap/ui/rta/messagebundle_zh_CN.properties +9 -9
  104. package/src/sap/ui/rta/messagebundle_zh_TW.properties +8 -8
  105. package/src/sap/ui/rta/plugin/AddXMLAtExtensionPoint.js +1 -2
  106. package/src/sap/ui/rta/plugin/BaseCreate.js +2 -3
  107. package/src/sap/ui/rta/plugin/Combine.js +1 -2
  108. package/src/sap/ui/rta/plugin/ControlVariant.js +12 -8
  109. package/src/sap/ui/rta/plugin/CreateContainer.js +1 -2
  110. package/src/sap/ui/rta/plugin/CutPaste.js +13 -13
  111. package/src/sap/ui/rta/plugin/DragDrop.js +17 -16
  112. package/src/sap/ui/rta/plugin/EasyAdd.js +12 -10
  113. package/src/sap/ui/rta/plugin/EasyRemove.js +11 -9
  114. package/src/sap/ui/rta/plugin/LocalReset.js +4 -2
  115. package/src/sap/ui/rta/plugin/Plugin.js +6 -10
  116. package/src/sap/ui/rta/plugin/RTAElementMover.js +3 -6
  117. package/src/sap/ui/rta/plugin/Remove.js +8 -9
  118. package/src/sap/ui/rta/plugin/Rename.js +9 -9
  119. package/src/sap/ui/rta/plugin/RenameHandler.js +21 -22
  120. package/src/sap/ui/rta/plugin/Resize.js +11 -10
  121. package/src/sap/ui/rta/plugin/Selection.js +33 -14
  122. package/src/sap/ui/rta/plugin/Settings.js +11 -11
  123. package/src/sap/ui/rta/plugin/Split.js +1 -2
  124. package/src/sap/ui/rta/plugin/Stretch.js +18 -20
  125. package/src/sap/ui/rta/plugin/additionalElements/ActionExtractor.js +4 -9
  126. package/src/sap/ui/rta/plugin/additionalElements/AddElementsDialog.js +5 -9
  127. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsAnalyzer.js +4 -4
  128. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsPlugin.js +41 -43
  129. package/src/sap/ui/rta/plugin/additionalElements/AdditionalElementsUtils.js +2 -3
  130. package/src/sap/ui/rta/plugin/additionalElements/CommandBuilder.js +5 -6
  131. package/src/sap/ui/rta/plugin/iframe/AddIFrame.js +7 -6
  132. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialog.js +5 -5
  133. package/src/sap/ui/rta/plugin/iframe/AddIFrameDialogController.js +28 -27
  134. package/src/sap/ui/rta/service/Action.js +3 -4
  135. package/src/sap/ui/rta/service/ControllerExtension.js +8 -9
  136. package/src/sap/ui/rta/service/Outline.js +13 -11
  137. package/src/sap/ui/rta/service/Property.js +3 -4
  138. package/src/sap/ui/rta/service/Receiver.js +1 -1
  139. package/src/sap/ui/rta/service/Selection.js +2 -3
  140. package/src/sap/ui/rta/service/SupportTools.js +2 -3
  141. package/src/sap/ui/rta/themes/base/Toolbar.base.less +4 -0
  142. package/src/sap/ui/rta/toolbar/Adaptation.js +25 -18
  143. package/src/sap/ui/rta/toolbar/Base.js +25 -11
  144. package/src/sap/ui/rta/toolbar/BaseRenderer.js +2 -2
  145. package/src/sap/ui/rta/toolbar/FeedbackDialog.fragment.xml +4 -4
  146. package/src/sap/ui/rta/toolbar/Fiori.js +20 -20
  147. package/src/sap/ui/rta/toolbar/FioriLike.js +1 -2
  148. package/src/sap/ui/rta/toolbar/OverflowToolbarButton.js +5 -6
  149. package/src/sap/ui/rta/toolbar/Personalization.js +4 -4
  150. package/src/sap/ui/rta/toolbar/Standalone.js +1 -2
  151. package/src/sap/ui/rta/toolbar/contextBased/ManageAdaptations.js +43 -20
  152. package/src/sap/ui/rta/toolbar/contextBased/SaveAsAdaptation.js +16 -7
  153. package/src/sap/ui/rta/toolbar/translation/Translation.js +13 -14
  154. package/src/sap/ui/rta/toolbar/versioning/Versioning.js +31 -28
  155. package/src/sap/ui/rta/util/Animation.js +1 -3
  156. package/src/sap/ui/rta/util/PluginManager.js +1 -3
  157. package/src/sap/ui/rta/util/PopupManager.js +23 -19
  158. package/src/sap/ui/rta/util/ReloadManager.js +4 -4
  159. package/src/sap/ui/rta/util/ServiceEventBus.js +1 -1
  160. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicator.js +18 -16
  161. package/src/sap/ui/rta/util/changeVisualization/ChangeIndicatorRegistry.js +6 -9
  162. package/src/sap/ui/rta/util/changeVisualization/ChangeVisualization.js +9 -10
  163. package/src/sap/ui/rta/util/changeVisualization/ChangeVisualizationUtils.js +1 -1
  164. package/src/sap/ui/rta/util/changeVisualization/commands/CombineVisualization.js +1 -1
  165. package/src/sap/ui/rta/util/changeVisualization/commands/CreateContainerVisualization.js +2 -2
  166. package/src/sap/ui/rta/util/hasStableId.js +1 -1
  167. package/src/sap/ui/rta/util/showMessageBox.js +2 -1
  168. package/src/sap/ui/rta/util/validateText.js +1 -1
  169. package/src/sap/ui/rta/util/StylesLoader.js +0 -31
  170. package/src/sap/ui/rta/util/UrlParser.js +0 -51
@@ -56,9 +56,9 @@ function(
56
56
  "use strict";
57
57
 
58
58
  // shortcut for sap.ui.layout.form.SimpleFormLayout
59
- var SimpleFormLayout = layoutLibrary.form.SimpleFormLayout;
59
+ var {SimpleFormLayout} = layoutLibrary.form;
60
60
 
61
- var ValueState = coreLibrary.ValueState;
61
+ var {ValueState} = coreLibrary;
62
62
 
63
63
  var oResources = sap.ui.getCore().getLibraryResourceBundle("sap.ui.rta");
64
64
  var oDataSet;
@@ -114,21 +114,19 @@ function(
114
114
  }
115
115
 
116
116
  function _handleSelectDialog() {
117
- if (!oSelectDialog) {
118
- oSelectDialog = new SelectDialog("selectDialog", {
119
- noDataText: oResources.getText("APP_VARIANT_ICON_NO_DATA"),
120
- title: oResources.getText("APP_VARIANT_ICON_SELECT_ICON"),
121
- search: function(oEvent) {
122
- _handleSearch(oEvent);
123
- },
124
- confirm: function(oEvent) {
125
- _handleClose(oEvent);
126
- },
127
- cancel: function(oEvent) {
128
- _handleClose(oEvent);
129
- }
130
- });
131
- }
117
+ oSelectDialog ||= new SelectDialog("selectDialog", {
118
+ noDataText: oResources.getText("APP_VARIANT_ICON_NO_DATA"),
119
+ title: oResources.getText("APP_VARIANT_ICON_SELECT_ICON"),
120
+ search(oEvent) {
121
+ _handleSearch(oEvent);
122
+ },
123
+ confirm(oEvent) {
124
+ _handleClose(oEvent);
125
+ },
126
+ cancel(oEvent) {
127
+ _handleClose(oEvent);
128
+ }
129
+ });
132
130
 
133
131
  oSelectDialog.addStyleClass(RtaUtils.getRtaStyleClassName());
134
132
 
@@ -174,7 +172,7 @@ function(
174
172
  value: "{/title}",
175
173
  valueLiveUpdate: true,
176
174
  placeholder: oResources.getText("SAVE_AS_DIALOG_PLACEHOLDER_TITLE_TEXT"),
177
- liveChange: function() {
175
+ liveChange() {
178
176
  var oSaveButton = sap.ui.getCore().byId("saveButton");
179
177
  if (this.getValue() === "") {
180
178
  this.setValueState(ValueState.Error); // if the field is empty after change, it will go red
@@ -212,10 +210,10 @@ function(
212
210
 
213
211
  oIconInput = new Input("selectInput", {
214
212
  showValueHelp: true,
215
- liveChange: function(oEvent) {
213
+ liveChange(oEvent) {
216
214
  _handleSelectDialog(oEvent);
217
215
  },
218
- valueHelpRequest: function(oEvent) {
216
+ valueHelpRequest(oEvent) {
219
217
  _handleSelectDialog(oEvent);
220
218
  },
221
219
  value: "{/iconname}",
@@ -284,7 +282,7 @@ function(
284
282
  cancel: {}
285
283
  }
286
284
  },
287
- init: function() {
285
+ init() {
288
286
  Dialog.prototype.init.apply(this);
289
287
 
290
288
  // initialize dialog and create member variables.
@@ -314,12 +312,12 @@ function(
314
312
  this._createButtons();
315
313
  this.addStyleClass(RtaUtils.getRtaStyleClassName());
316
314
  },
317
- onAfterRendering: function() {
315
+ onAfterRendering() {
318
316
  document.getElementById("title1").style.height = "0px";
319
317
  document.getElementById("title2").style.height = "0px";
320
318
  document.getElementById("tile").style.float = "left";
321
319
  },
322
- _onCreate: function() {
320
+ _onCreate() {
323
321
  var sTitle = oTitleInput.getValue() || " ";
324
322
  var sSubTitle = oSubTitleInput.getValue() || " ";
325
323
  var sDescription = oDescriptionText.getValue() || " ";
@@ -336,7 +334,7 @@ function(
336
334
  this.close();
337
335
  this.destroy();
338
336
  },
339
- _createButtons: function() {
337
+ _createButtons() {
340
338
  this.addButton(new Button("saveButton", {
341
339
  text: oResources.getText("APP_VARIANT_DIALOG_SAVE"),
342
340
  tooltip: oResources.getText("TOOLTIP_APP_VARIANT_DIALOG_SAVE"),
@@ -356,11 +354,11 @@ function(
356
354
  }.bind(this)
357
355
  }));
358
356
  },
359
- destroy: function() {
357
+ destroy(...aArgs) {
360
358
  if (oCustomTileModel) {
361
359
  oCustomTileModel.destroy();
362
360
  }
363
- Dialog.prototype.destroy.apply(this, arguments);
361
+ Dialog.prototype.destroy.apply(this, aArgs);
364
362
  },
365
363
  renderer: DialogRenderer
366
364
  });
@@ -24,13 +24,11 @@ sap.ui.define([
24
24
  * @class
25
25
  * @extends sap.ui.base.ManagedObject
26
26
  * @author SAP SE
27
- * @version 1.117.1
27
+ * @version 1.118.0
28
28
  * @constructor
29
29
  * @private
30
30
  * @since 1.53
31
31
  * @alias sap.ui.rta.appVariant.AppVariantManager
32
- * @experimental Since 1.53. This class is experimental and provides only limited functionality. Also the API might be
33
- * changed in future.
34
32
  */
35
33
  var AppVariantManager = ManagedObject.extend("sap.ui.rta.appVariant.AppVariantManager", {
36
34
  metadata: {
@@ -36,8 +36,9 @@ sap.ui.define([
36
36
  cancel: {}
37
37
  }
38
38
  },
39
- constructor: function() {
40
- Dialog.prototype.constructor.apply(this, arguments);
39
+ // eslint-disable-next-line object-shorthand
40
+ constructor: function(...aArgs) {
41
+ Dialog.prototype.constructor.apply(this, aArgs);
41
42
  this._oTextResources = sap.ui.getCore().getLibraryResourceBundle("sap.ui.rta");
42
43
 
43
44
  // Create manage apps component
@@ -63,8 +64,8 @@ sap.ui.define([
63
64
 
64
65
  this.addStyleClass(RtaUtils.getRtaStyleClassName());
65
66
  },
66
- destroy: function() {
67
- Dialog.prototype.destroy.apply(this, arguments);
67
+ destroy(...aArgs) {
68
+ Dialog.prototype.destroy.apply(this, aArgs);
68
69
  },
69
70
  renderer: DialogRenderer
70
71
  });
@@ -67,7 +67,7 @@ sap.ui.define([
67
67
  if (sTrimmedId[sTrimmedId.length - 1] === ".") {
68
68
  sTrimmedId = sTrimmedId + sGuidString;
69
69
  } else {
70
- sTrimmedId = sTrimmedId + "." + sGuidString;
70
+ sTrimmedId = `${sTrimmedId}.${sGuidString}`;
71
71
  }
72
72
 
73
73
  return this.trimIdIfRequired(sTrimmedId);
@@ -82,7 +82,7 @@ sap.ui.define([
82
82
  var aIdStrings = sBaseAppID.split(".");
83
83
 
84
84
  if (aIdStrings[0] !== "customer") {
85
- aIdStrings[0] = "customer." + aIdStrings[0];
85
+ aIdStrings[0] = `customer.${aIdStrings[0]}`;
86
86
  }
87
87
 
88
88
  var bRegFound = false;
@@ -98,7 +98,7 @@ sap.ui.define([
98
98
 
99
99
  sChangedId = aIdStrings.join(".");
100
100
  if (!bRegFound) {
101
- sChangedId = sChangedId + "." + uid().replace(/-/g, "_");
101
+ sChangedId = `${sChangedId}.${uid().replace(/-/g, "_")}`;
102
102
  }
103
103
 
104
104
  sChangedId = this.trimIdIfRequired(sChangedId);
@@ -124,7 +124,7 @@ sap.ui.define([
124
124
  };
125
125
 
126
126
  AppVariantUtils.prepareTextsChange = function(sPropertyName, sPropertyValue) {
127
- var sComment = "New " + sPropertyName + " entered by a key user via RTA tool";
127
+ var sComment = `New ${sPropertyName} entered by a key user via RTA tool`;
128
128
  return this.getInlineChangeInput(sPropertyValue, sComment);
129
129
  };
130
130
 
@@ -180,7 +180,7 @@ sap.ui.define([
180
180
  oInboundInfo.addNewInboundRequired = true;
181
181
  break;
182
182
  case 1:
183
- oInboundInfo.currentRunningInbound = aInboundsFound[0];
183
+ [oInboundInfo.currentRunningInbound] = aInboundsFound;
184
184
  oInboundInfo.addNewInboundRequired = false;
185
185
  break;
186
186
  default:
@@ -194,7 +194,7 @@ sap.ui.define([
194
194
  };
195
195
 
196
196
  AppVariantUtils.getInboundPropertiesKey = function(sAppVariantId, sCurrentRunningInboundId, sPropertyName) {
197
- return sAppVariantId + "_sap.app.crossNavigation.inbounds." + sCurrentRunningInboundId + "." + sPropertyName;
197
+ return `${sAppVariantId}_sap.app.crossNavigation.inbounds.${sCurrentRunningInboundId}.${sPropertyName}`;
198
198
  };
199
199
 
200
200
  AppVariantUtils.getInlineChangeForInboundPropertySaveAs = function(sCurrentRunningInboundId, sAppVariantId) {
@@ -245,8 +245,8 @@ sap.ui.define([
245
245
  oProperty.content.inbound[sCurrentRunningInboundId] = {
246
246
  semanticObject: oParsedHash.semanticObject,
247
247
  action: oParsedHash.action,
248
- title: "{{" + sInboundTitleKey + "}}",
249
- subTitle: "{{" + sInboundSubTitleKey + "}}",
248
+ title: `{{${sInboundTitleKey}}}`,
249
+ subTitle: `{{${sInboundSubTitleKey}}}`,
250
250
  icon: oAppVariantSpecificData.icon,
251
251
  signature: {
252
252
  parameters: {
@@ -301,11 +301,11 @@ sap.ui.define([
301
301
  }, {
302
302
  propertyPath: "title",
303
303
  operation: "UPSERT",
304
- propertyValue: "{{" + sInboundTitleKey + "}}"
304
+ propertyValue: `{{${sInboundTitleKey}}}`
305
305
  }, {
306
306
  propertyPath: "subTitle",
307
307
  operation: "UPSERT",
308
- propertyValue: "{{" + sInboundSubTitleKey + "}}"
308
+ propertyValue: `{{${sInboundSubTitleKey}}}`
309
309
  }, {
310
310
  propertyPath: "icon",
311
311
  operation: "UPSERT",
@@ -343,16 +343,16 @@ sap.ui.define([
343
343
 
344
344
  AppVariantUtils.getTransportInput = function(sPackageName, sNameSpace, sName, sType) {
345
345
  return {
346
- getPackage: function() {
346
+ getPackage() {
347
347
  return sPackageName;
348
348
  },
349
- getNamespace: function() {
349
+ getNamespace() {
350
350
  return sNameSpace;
351
351
  },
352
- getId: function() {
352
+ getId() {
353
353
  return sName;
354
354
  },
355
- getDefinition: function() {
355
+ getDefinition() {
356
356
  return {
357
357
  fileType: sType
358
358
  };
@@ -403,7 +403,7 @@ sap.ui.define([
403
403
 
404
404
  AppVariantUtils.getText = function(sMessageKey, sText) {
405
405
  var oTextResources = this.getTextResources();
406
- return sText ? oTextResources.getText(sMessageKey, sText) : oTextResources.getText(sMessageKey);
406
+ return sText ? oTextResources.getText(sMessageKey, [sText]) : oTextResources.getText(sMessageKey);
407
407
  };
408
408
 
409
409
  AppVariantUtils._getErrorMessageText = function(oError) {
@@ -416,7 +416,7 @@ sap.ui.define([
416
416
  } else if (oError.userMessage) {
417
417
  sErrorMessage = oError.userMessage;
418
418
  } else if (oError.iamAppId) {
419
- sErrorMessage = "IAM App Id: " + oError.iamAppId;
419
+ sErrorMessage = `IAM App Id: ${oError.iamAppId}`;
420
420
  } else {
421
421
  sErrorMessage = oError.stack || oError.message || oError.status || oError;
422
422
  }
@@ -426,10 +426,10 @@ sap.ui.define([
426
426
 
427
427
  AppVariantUtils.buildErrorInfo = function(sMessageKey, oError, sAppVariantId) {
428
428
  var sErrorMessage = this._getErrorMessageText(oError);
429
- var sMessage = AppVariantUtils.getText(sMessageKey) + "\n\n";
429
+ var sMessage = `${AppVariantUtils.getText(sMessageKey)}\n\n`;
430
430
 
431
431
  if (sAppVariantId) {
432
- sMessage += AppVariantUtils.getText("MSG_APP_VARIANT_ID", sAppVariantId) + "\n";
432
+ sMessage += `${AppVariantUtils.getText("MSG_APP_VARIANT_ID", sAppVariantId)}\n`;
433
433
  }
434
434
 
435
435
  sMessage += AppVariantUtils.getText("MSG_TECHNICAL_ERROR", sErrorMessage);
@@ -451,8 +451,8 @@ sap.ui.define([
451
451
  var sOverviewList = bSaveAsTriggeredFromRtaToolbar ? "" : "_OVERVIEW_LIST";
452
452
  var sText = bIsS4HanaCloud ? undefined : sAppVariantId;
453
453
 
454
- var sMessage = AppVariantUtils.getText("SAVE_APP_VARIANT_SUCCESS_MESSAGE") + "\n\n";
455
- sMessage += AppVariantUtils.getText("SAVE_APP_VARIANT_SUCCESS_S4HANA_" + sSystemTag + "_MESSAGE" + sOverviewList, sText);
454
+ var sMessage = `${AppVariantUtils.getText("SAVE_APP_VARIANT_SUCCESS_MESSAGE")}\n\n`;
455
+ sMessage += AppVariantUtils.getText(`SAVE_APP_VARIANT_SUCCESS_S4HANA_${sSystemTag}_MESSAGE${sOverviewList}`, sText);
456
456
 
457
457
  return {
458
458
  text: sMessage,
@@ -563,7 +563,7 @@ sap.ui.define([
563
563
  }
564
564
  })
565
565
  .catch(function(vError) {
566
- throw new Error("Error navigating to FLP Homepage: " + vError);
566
+ throw new Error(`Error navigating to FLP Homepage: ${vError}`);
567
567
  });
568
568
  }
569
569
  return Promise.resolve();
@@ -99,7 +99,7 @@ sap.ui.define([
99
99
 
100
100
  return {
101
101
  // To see the overview of app variants, a key user has created from an app
102
- onGetOverview: function(bAsKeyUser, sLayer) {
102
+ onGetOverview(bAsKeyUser, sLayer) {
103
103
  var oDescriptor = fnGetDescriptor();
104
104
 
105
105
  return new Promise(function(resolve) {
@@ -115,9 +115,7 @@ sap.ui.define([
115
115
  };
116
116
 
117
117
  sap.ui.require([sOverviewPath], function(AppVariantOverviewDialog) {
118
- if (!oAppVariantOverviewDialog) {
119
- oAppVariantOverviewDialog = new AppVariantOverviewDialog(oProperties);
120
- }
118
+ oAppVariantOverviewDialog ||= new AppVariantOverviewDialog(oProperties);
121
119
 
122
120
  oAppVariantOverviewDialog.attachCancel(fnCancel);
123
121
 
@@ -137,7 +135,7 @@ sap.ui.define([
137
135
  * When this method returns <code>true</code> then a drop down menu button on the UI is shown where a user can choose app variant overview for either a key user or SAP developer.
138
136
  * When this method returns <code>false</code>, an app variant overview is shown only for a key user.
139
137
  */
140
- isOverviewExtended: function() {
138
+ isOverviewExtended() {
141
139
  var oUriParams = UriParameters.fromQuery(window.location.search);
142
140
  var sMode = oUriParams.get("sap-ui-xx-app-variant-overview-extended");
143
141
  if (!sMode) {
@@ -146,7 +144,7 @@ sap.ui.define([
146
144
 
147
145
  return sMode.toLowerCase() === "true";
148
146
  },
149
- isManifestSupported: function() {
147
+ isManifestSupported() {
150
148
  var oDescriptor = fnGetDescriptor();
151
149
  return AppVariantUtils.getManifirstSupport(oDescriptor["sap.app"].id);
152
150
  },
@@ -156,7 +154,7 @@ sap.ui.define([
156
154
  * @param {object} oLrepSerializer - Layered repository serializer
157
155
  * @returns {boolean} Boolean value
158
156
  */
159
- isSaveAsAvailable: function(oRootControl, sCurrentLayer, oLrepSerializer) {
157
+ isSaveAsAvailable(oRootControl, sCurrentLayer, oLrepSerializer) {
160
158
  oRootControlRunningApp = oRootControl;
161
159
  oCommandSerializer = oLrepSerializer;
162
160
 
@@ -182,7 +180,7 @@ sap.ui.define([
182
180
  * @returns {Promise} Resolved promise with an app variant descriptor
183
181
  * @description Getting here an app variant descriptor from the layered repository.
184
182
  */
185
- getAppVariantDescriptor: function(oRootControl) {
183
+ getAppVariantDescriptor(oRootControl) {
186
184
  oRootControlRunningApp = oRootControl;
187
185
  var oDescriptor = fnGetDescriptor();
188
186
  if (oDescriptor["sap.app"] && oDescriptor["sap.app"].id) {
@@ -192,7 +190,7 @@ sap.ui.define([
192
190
  }
193
191
  return Promise.resolve(false);
194
192
  },
195
- _determineSelector: function(bIsRunningApp, oDescriptor) {
193
+ _determineSelector(bIsRunningApp, oDescriptor) {
196
194
  return bIsRunningApp ? oRootControlRunningApp : {
197
195
  appId: oDescriptor["sap.app"].id,
198
196
  appVersion: oDescriptor["sap.app"].applicationVersion.version
@@ -208,7 +206,7 @@ sap.ui.define([
208
206
  * When 'Save As' triggered from the UI adaptation header bar, we set both flags <code>bSaveAsFromRta</code> and <code>bCopyUnsavedChanges</code> equal to <code>true</code>.
209
207
  * The flag <code>bCopyUnsavedChanges</code> is <code>true</code> if a key user presses 'Save As' from the running app entry in the app variant overview dialog.
210
208
  */
211
- onSaveAs: function(bSaveAsFromRta, bCopyUnsavedChanges, sCurrentLayer, oSelectedAppVariant) {
209
+ onSaveAs(bSaveAsFromRta, bCopyUnsavedChanges, sCurrentLayer, oSelectedAppVariant) {
212
210
  var bIsS4HanaCloud;
213
211
  var oAppVariantSaveClosure;
214
212
  var oDescriptor = fnGetDescriptor();
@@ -254,9 +252,7 @@ sap.ui.define([
254
252
  return oAppVariantManager.createAppVariant(sAppVariantId, vSelector)
255
253
  .catch(function(oError) {
256
254
  var sMessageKey = oError.messageKey;
257
- if (!sMessageKey) {
258
- sMessageKey = "MSG_SAVE_APP_VARIANT_FAILED";
259
- }
255
+ sMessageKey ||= "MSG_SAVE_APP_VARIANT_FAILED";
260
256
 
261
257
  return AppVariantUtils.catchErrorDialog(oError, sMessageKey, sAppVariantId);
262
258
  });
@@ -321,12 +317,10 @@ sap.ui.define([
321
317
  };
322
318
 
323
319
  sap.ui.require(["sap/ui/rta/appVariant/AppVariantManager"], function(AppVariantManager) {
324
- if (!oAppVariantManager) {
325
- oAppVariantManager = new AppVariantManager({
326
- commandSerializer: oCommandSerializer,
327
- layer: sCurrentLayer
328
- });
329
- }
320
+ oAppVariantManager ||= new AppVariantManager({
321
+ commandSerializer: oCommandSerializer,
322
+ layer: sCurrentLayer
323
+ });
330
324
 
331
325
  return fnProcessSaveAsDialog()
332
326
  .then(fnCreateInlineChanges) // Create the inline changes for application variant
@@ -355,17 +349,15 @@ sap.ui.define([
355
349
  * @returns {Promise} Resolved promise
356
350
  * @description Triggers a delete operation of the app variant.
357
351
  */
358
- onDeleteFromOverviewDialog: function(sAppVariantId, bCurrentlyAdapting, sCurrentLayer) {
352
+ onDeleteFromOverviewDialog(sAppVariantId, bCurrentlyAdapting, sCurrentLayer) {
359
353
  var bIsS4HanaCloud;
360
354
  return new Promise(function(resolve) {
361
355
  sap.ui.require(["sap/ui/rta/appVariant/AppVariantManager"], function(AppVariantManager) {
362
- if (!oAppVariantManager) {
363
- oAppVariantManager = new AppVariantManager({
364
- rootControl: oRootControlRunningApp,
365
- commandSerializer: oCommandSerializer,
366
- layer: sCurrentLayer
367
- });
368
- }
356
+ oAppVariantManager ||= new AppVariantManager({
357
+ rootControl: oRootControlRunningApp,
358
+ commandSerializer: oCommandSerializer,
359
+ layer: sCurrentLayer
360
+ });
369
361
 
370
362
  var fnDeleteAppVariant = function() {
371
363
  return oAppVariantManager.deleteAppVariant(sAppVariantId)
@@ -374,9 +366,7 @@ sap.ui.define([
374
366
  return Promise.reject("cancel");
375
367
  }
376
368
  var sMessageKey = oError.messageKey;
377
- if (!sMessageKey) {
378
- sMessageKey = "MSG_DELETE_APP_VARIANT_FAILED";
379
- }
369
+ sMessageKey ||= "MSG_DELETE_APP_VARIANT_FAILED";
380
370
  return AppVariantUtils.catchErrorDialog(oError, sMessageKey, sAppVariantId);
381
371
  });
382
372
  };
@@ -22,8 +22,9 @@ sap.ui.define([
22
22
  metadata: {
23
23
  library: "sap.ui.rta"
24
24
  },
25
- constructor: function() {
26
- ManagedObject.apply(this, arguments);
25
+ // eslint-disable-next-line object-shorthand
26
+ constructor: function(...aArgs) {
27
+ ManagedObject.apply(this, aArgs);
27
28
  }
28
29
  });
29
30
 
@@ -38,7 +39,12 @@ sap.ui.define([
38
39
  * or rejects if the required ODATA service /sap/opu/odata/sap/APS_IAM_APP_SRV is not there
39
40
  * @async
40
41
  */
41
- S4HanaCloudBackend.prototype.notifyFlpCustomizingIsReady = function(sIamAppId, bAppVarCreation, iCheckIntervallMsec, iMaxNumberOfChecks) {
42
+ S4HanaCloudBackend.prototype.notifyFlpCustomizingIsReady = function(
43
+ sIamAppId,
44
+ bAppVarCreation,
45
+ iCheckIntervallMsec,
46
+ iMaxNumberOfChecks
47
+ ) {
42
48
  var that = this;
43
49
  return new Promise(function(resolve, reject) {
44
50
  // Check inputs and determine defaults
@@ -66,7 +72,7 @@ sap.ui.define([
66
72
  // ... Reject if publishing return an error or is locked
67
73
  }).catch(function(oError) {
68
74
  var sText = bAppVarCreation ? "creation" : "deletion";
69
- Log.error("Catalog publishing failed for app variant " + sText + ". AppVarStatus is " + oError.message);
75
+ Log.error(`Catalog publishing failed for app variant ${sText}. AppVarStatus is ${oError.message}`);
70
76
  reject({ iamAppId: sIamAppId, error: oError.message});
71
77
  });
72
78
  }
@@ -79,7 +85,7 @@ sap.ui.define([
79
85
  S4HanaCloudBackend._isAppReady = function(oAppStatusResponse, bAppVarCreation) {
80
86
  var aCatalogList = oAppStatusResponse.data.results;
81
87
  if (!Array.isArray(aCatalogList)) {
82
- throw new Error(oAppStatusResponse.requestUri + " returned unexpected result: " + oAppStatusResponse);
88
+ throw new Error(`${oAppStatusResponse.requestUri} returned unexpected result: ${oAppStatusResponse}`);
83
89
  }
84
90
 
85
91
  var bIsUnpublished = aCatalogList.every(function(oCatalog) {
@@ -111,18 +117,16 @@ sap.ui.define([
111
117
  };
112
118
 
113
119
  S4HanaCloudBackend._getODataModel = function() {
114
- if (!oModelPromise) {
115
- oModelPromise = new Promise(function(resolve, reject) {
116
- var oModel = new ODataModel("/sap/opu/odata/sap/APS_IAM_APP_SRV");
117
- oModel.attachMetadataFailed(function(oError) {
118
- reject(oError);
119
- oModelPromise = null;
120
- });
121
- oModel.metadataLoaded().then(function() {
122
- resolve(oModel);
123
- });
120
+ oModelPromise ||= new Promise(function(resolve, reject) {
121
+ var oModel = new ODataModel("/sap/opu/odata/sap/APS_IAM_APP_SRV");
122
+ oModel.attachMetadataFailed(function(oError) {
123
+ reject(oError);
124
+ oModelPromise = null;
124
125
  });
125
- }
126
+ oModel.metadataLoaded().then(function() {
127
+ resolve(oModel);
128
+ });
129
+ });
126
130
  return oModelPromise;
127
131
  };
128
132
 
@@ -135,7 +139,7 @@ sap.ui.define([
135
139
  reject(oError);
136
140
  };
137
141
 
138
- oModel.read("/aps_iam_app_ddl('" + sIamAppId + "')/to_BusinessCatalogAssignment", {success: fnSuccess, error: fnFailure});
142
+ oModel.read(`/aps_iam_app_ddl('${sIamAppId}')/to_BusinessCatalogAssignment`, {success: fnSuccess, error: fnFailure});
139
143
  });
140
144
  };
141
145
 
@@ -23,9 +23,9 @@ function(
23
23
 
24
24
  var Utils = {};
25
25
 
26
- var sModulePath = sap.ui.require.toUrl("sap/ui/rta/appVariant/manageApps/") + "webapp";
26
+ var sModulePath = `${sap.ui.require.toUrl("sap/ui/rta/appVariant/manageApps/")}webapp`;
27
27
  var oI18n = ResourceBundle.create({
28
- url: sModulePath + "/i18n/i18n.properties"
28
+ url: `${sModulePath}/i18n/i18n.properties`
29
29
  });
30
30
 
31
31
  Utils._checkNavigationSupported = function(oNavigationParams) {
@@ -35,7 +35,7 @@ function(
35
35
  return oNavigationService.getLinks(oNavigationParams);
36
36
  })
37
37
  .catch(function(vError) {
38
- throw new Error("Error retrieving ushell service CrossApplicationNavigation: " + vError);
38
+ throw new Error(`Error retrieving ushell service CrossApplicationNavigation: ${vError}`);
39
39
  });
40
40
  };
41
41
 
@@ -179,6 +179,7 @@ function(
179
179
  // Adding the tooltip to every icon which is shown on the App Variant Overview Dialog
180
180
  var sIconUrl = oAppVariantInfo.iconUrl;
181
181
  if (sIconUrl && IconPool.isIconURI(sIconUrl)) {
182
+ // eslint-disable-next-line prefer-destructuring
182
183
  oAppVariantInfo.iconText = sIconUrl.split("//")[1];
183
184
  }
184
185
 
@@ -27,11 +27,12 @@ sap.ui.define([
27
27
  }
28
28
  },
29
29
 
30
- constructor: function() {
31
- _sIdRunningApp = arguments[1].idRunningApp;
32
- _bKeyUser = arguments[1].isOverviewForKeyUser;
33
- _sLayer = arguments[1].layer;
34
- UIComponent.prototype.constructor.apply(this, arguments);
30
+ // eslint-disable-next-line object-shorthand
31
+ constructor: function(...aArgs) {
32
+ _sIdRunningApp = aArgs[1].idRunningApp;
33
+ _bKeyUser = aArgs[1].isOverviewForKeyUser;
34
+ _sLayer = aArgs[1].layer;
35
+ UIComponent.prototype.constructor.apply(this, aArgs);
35
36
  },
36
37
 
37
38
  /**
@@ -39,12 +40,12 @@ sap.ui.define([
39
40
  * @public
40
41
  * @override
41
42
  */
42
- init: function() {
43
+ init(...aArgs) {
43
44
  this.setIdRunningApp(_sIdRunningApp);
44
45
  this.setIsOverviewForKeyUser(_bKeyUser);
45
46
  this.setLayer(_sLayer);
46
47
  // call the base component's init function
47
- UIComponent.prototype.init.apply(this, arguments);
48
+ UIComponent.prototype.init.apply(this, aArgs);
48
49
  }
49
50
  });
50
51
  });