@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
@@ -29,13 +29,12 @@ sap.ui.define([
29
29
  * @extends sap.m.HBox
30
30
  *
31
31
  * @author SAP SE
32
- * @version 1.117.1
32
+ * @version 1.118.0
33
33
  *
34
34
  * @constructor
35
35
  * @private
36
36
  * @since 1.48
37
37
  * @alias sap.ui.rta.toolbar.Base
38
- * @experimental Since 1.48. This class is experimental. The API might be changed in future.
39
38
  */
40
39
 
41
40
  var Base = HBox.extend("sap.ui.rta.toolbar.Base", {
@@ -68,9 +67,10 @@ sap.ui.define([
68
67
  textResources: "object"
69
68
  }
70
69
  },
71
- constructor: function() {
70
+ // eslint-disable-next-line object-shorthand
71
+ constructor: function(...aArgs) {
72
72
  // call parent constructor
73
- HBox.apply(this, arguments);
73
+ HBox.apply(this, aArgs);
74
74
 
75
75
  this._oExtensions = {};
76
76
  this.setAlignItems("Center");
@@ -97,23 +97,26 @@ sap.ui.define([
97
97
  /**
98
98
  * @override
99
99
  */
100
- Base.prototype.init = function() {
100
+ Base.prototype.init = function(...aArgs) {
101
101
  this._oResourceModel = new ResourceModel({
102
102
  bundle: sap.ui.getCore().getLibraryResourceBundle("sap.ui.rta")
103
103
  });
104
- HBox.prototype.init.apply(this, arguments);
104
+ HBox.prototype.init.apply(this, aArgs);
105
105
  // Assign the model object to the SAPUI5 core using the name "i18n"
106
106
  this.setModel(this._oResourceModel, "i18n");
107
+ this._fnOnScrollBound = this._onScroll.bind(this);
108
+ window.addEventListener("scroll", this._fnOnScrollBound, true);
107
109
  return this.buildContent();
108
110
  };
109
111
 
110
- Base.prototype.exit = function() {
112
+ Base.prototype.exit = function(...aArgs) {
111
113
  Object.values(this._oExtensions).forEach(function(oExtension) {
112
114
  oExtension.destroy();
113
115
  });
114
116
  this._oExtensions = {};
117
+ window.removeEventListener("scroll", this._fnOnScrollBound, true);
115
118
 
116
- HBox.prototype.exit.apply(this, arguments);
119
+ HBox.prototype.exit.apply(this, aArgs);
117
120
  };
118
121
 
119
122
  /**
@@ -151,7 +154,7 @@ sap.ui.define([
151
154
  * @param {sap.ui.base.Event} oEvent - Event object
152
155
  */
153
156
  Base.prototype.eventHandler = function(sEventName, oEvent) {
154
- this["fire" + sEventName](oEvent.getParameters());
157
+ this[`fire${sEventName}`](oEvent.getParameters());
155
158
  };
156
159
 
157
160
  /**
@@ -194,7 +197,7 @@ sap.ui.define([
194
197
  // 1) create Promise and wait until DomRef is available
195
198
  return new Promise(function(fnResolve) {
196
199
  var oDelegate = {
197
- onAfterRendering: function() {
200
+ onAfterRendering() {
198
201
  this.removeEventDelegate(oDelegate);
199
202
  fnResolve();
200
203
  }
@@ -249,7 +252,7 @@ sap.ui.define([
249
252
  * @public
250
253
  */
251
254
  Base.prototype.getControl = function(sName) {
252
- return sap.ui.getCore().byId("sapUiRta_" + sName);
255
+ return sap.ui.getCore().byId(`sapUiRta_${sName}`);
253
256
  };
254
257
 
255
258
  /**
@@ -260,5 +263,16 @@ sap.ui.define([
260
263
  this.setZIndex(ZIndexManager.getNextZIndex());
261
264
  };
262
265
 
266
+ Base.prototype._onScroll = function() {
267
+ var oDomElement = this.getDomRef();
268
+ // In some cases, there is a scroll event before
269
+ // the DOM Element is created
270
+ if (!oDomElement) {
271
+ return;
272
+ }
273
+ var sScrollClass = "sapUiRtaToolbar_scrolling";
274
+ oDomElement.classList.toggle(sScrollClass, window.scrollY > 0);
275
+ };
276
+
263
277
  return Base;
264
278
  });
@@ -20,10 +20,10 @@ function(
20
20
 
21
21
  BaseRenderer.render = function(oRM, oControl) {
22
22
  oRM.class("sapUiRtaToolbar");
23
- oRM.class("color_" + oControl.getColor());
23
+ oRM.class(`color_${oControl.getColor()}`);
24
24
 
25
25
  // setting type if exists
26
- oControl.type && oRM.class("type_" + oControl.type);
26
+ oControl.type && oRM.class(`type_${oControl.type}`);
27
27
 
28
28
  // setting z-index if exists
29
29
  var iZIndex = oControl.getZIndex();
@@ -1,7 +1,7 @@
1
1
  <core:FragmentDefinition
2
- xmlns:core="sap.ui.core"
3
- xmlns="sap.m"
4
- xmlns:util="sap.ui.fl.util">
2
+ xmlns:core="sap.ui.core"
3
+ xmlns="sap.m"
4
+ xmlns:util="sap.ui.fl.util">
5
5
  <Dialog
6
6
  id="sapUiRtaFeedbackIFrameDialog"
7
7
  title="{i18n>TIT_FEEDBACK}"
@@ -11,7 +11,7 @@
11
11
  <content>
12
12
  <util:IFrame
13
13
  id="sapUiRtaFeedbackIFrameDialog_iFrame"
14
- url="{= ${feedbackModel>/url}}"
14
+ url="{feedbackModel>/url}"
15
15
  height="46rem"/>
16
16
  </content>
17
17
  <buttons>
@@ -32,13 +32,12 @@ function(
32
32
  * @extends sap.ui.rta.toolbar.Adaptation
33
33
  *
34
34
  * @author SAP SE
35
- * @version 1.117.1
35
+ * @version 1.118.0
36
36
  *
37
37
  * @constructor
38
38
  * @private
39
39
  * @since 1.48
40
40
  * @alias sap.ui.rta.toolbar.Fiori
41
- * @experimental Since 1.48. This class is experimental. API might be changed in future.
42
41
  */
43
42
  var Fiori = Adaptation.extend("sap.ui.rta.toolbar.Fiori", {
44
43
  metadata: {
@@ -48,19 +47,19 @@ function(
48
47
  type: "fiori"
49
48
  });
50
49
 
51
- Fiori.prototype.init = function() {
50
+ Fiori.prototype.init = function(...aArgs) {
52
51
  this._oRenderer = Utils.getFiori2Renderer();
53
52
  this._oFioriHeader = this._oRenderer.getRootControl().getShellHeader();
54
- Adaptation.prototype.init.apply(this, arguments);
53
+ Adaptation.prototype.init.apply(this, aArgs);
55
54
  };
56
55
 
57
- Fiori.prototype.show = function() {
56
+ Fiori.prototype.show = function(...aArgs) {
58
57
  this._oFioriHeader.addStyleClass(FIORI_HIDDEN_CLASS);
59
- return Adaptation.prototype.show.apply(this, arguments);
58
+ return Adaptation.prototype.show.apply(this, aArgs);
60
59
  };
61
60
 
62
- Fiori.prototype.buildControls = function() {
63
- return Adaptation.prototype.buildControls.apply(this, arguments).then(function(aControls) {
61
+ Fiori.prototype.buildControls = function(...aArgs) {
62
+ return Adaptation.prototype.buildControls.apply(this, aArgs).then(function(aControls) {
64
63
  var sLogoPath = this._oFioriHeader.getLogo();
65
64
 
66
65
  if (this._oFioriHeader.getShowLogo() && sLogoPath) {
@@ -81,10 +80,10 @@ function(
81
80
 
82
81
  // first control is the left HBox
83
82
  this.getControl("iconBox").addItem(
84
- new Image(this.getId() + "_fragment--sapUiRta_icon", {
83
+ new Image(`${this.getId()}_fragment--sapUiRta_icon`, {
85
84
  src: sLogoPath,
86
- width: iWidth ? iWidth + "px" : iWidth,
87
- height: iHeight ? iHeight + "px" : iHeight
85
+ width: iWidth ? `${iWidth}px` : iWidth,
86
+ height: iHeight ? `${iHeight}px` : iHeight
88
87
  })
89
88
  );
90
89
  }
@@ -95,8 +94,8 @@ function(
95
94
  /**
96
95
  * @inheritDoc
97
96
  */
98
- Fiori.prototype.hide = function() {
99
- return Adaptation.prototype.hide.apply(this, arguments)
97
+ Fiori.prototype.hide = function(...aArgs) {
98
+ return Adaptation.prototype.hide.apply(this, aArgs)
100
99
  .then(function() {
101
100
  this._oFioriHeader.removeStyleClass(FIORI_HIDDEN_CLASS);
102
101
  }.bind(this));
@@ -109,8 +108,8 @@ function(
109
108
  if (iWidth !== iNaturalWidth || iHeight !== iNaturalHeight) {
110
109
  Log.error([
111
110
  "sap.ui.rta: please check Fiori Launchpad logo, expected size is",
112
- iWidth + "x" + iHeight + ",",
113
- "but actual is " + iNaturalWidth + "x" + iNaturalHeight
111
+ `${iWidth}x${iHeight},`,
112
+ `but actual is ${iNaturalWidth}x${iNaturalHeight}`
114
113
  ].join(" "));
115
114
  }
116
115
  };
@@ -123,7 +122,8 @@ function(
123
122
  Adaptation.prototype._restoreHiddenElements.apply(this);
124
123
  };
125
124
 
126
- Fiori.prototype._hideElementsOnIntersection = function(sSectionName, aEntries) {
125
+ Fiori.prototype._hideElementsOnIntersection = function(...aArgs) {
126
+ const [sSectionName, aEntries] = aArgs;
127
127
  var bWiderThanLogo;
128
128
 
129
129
  if (aEntries[0].intersectionRatio === 0) {
@@ -141,12 +141,12 @@ function(
141
141
  this._iLogoVisibilityLimit = this._calculateWindowWidth(aEntries);
142
142
  this._setLogoVisibility(false);
143
143
  if (bWiderThanLogo) {
144
- Adaptation.prototype._hideElementsOnIntersection.apply(this, arguments);
144
+ Adaptation.prototype._hideElementsOnIntersection.apply(this, aArgs);
145
145
  }
146
146
  return;
147
147
  }
148
148
  }
149
- Adaptation.prototype._hideElementsOnIntersection.apply(this, arguments);
149
+ Adaptation.prototype._hideElementsOnIntersection.apply(this, aArgs);
150
150
  };
151
151
 
152
152
  Fiori.prototype._setLogoVisibility = function(bVisible) {
@@ -156,11 +156,11 @@ function(
156
156
  oIconSpacer.setVisible(bVisible);
157
157
  };
158
158
 
159
- Fiori.prototype.destroy = function() {
159
+ Fiori.prototype.destroy = function(...aArgs) {
160
160
  // In case of destroy() without normal hide() call
161
161
  this._oFioriHeader.removeStyleClass(FIORI_HIDDEN_CLASS);
162
162
 
163
- Adaptation.prototype.destroy.apply(this, arguments);
163
+ Adaptation.prototype.destroy.apply(this, aArgs);
164
164
  };
165
165
 
166
166
  return Fiori;
@@ -20,13 +20,12 @@ function(
20
20
  * @extends sap.ui.rta.toolbar.Adaptation
21
21
  *
22
22
  * @author SAP SE
23
- * @version 1.117.1
23
+ * @version 1.118.0
24
24
  *
25
25
  * @constructor
26
26
  * @private
27
27
  * @since 1.84
28
28
  * @alias sap.ui.rta.toolbar.FioriLike
29
- * @experimental Since 1.84. This class is experimental. API might be changed in future.
30
29
  */
31
30
  var FioriLike = Adaptation.extend("sap.ui.rta.toolbar.FioriLike", {
32
31
  metadata: {
@@ -23,13 +23,12 @@ sap.ui.define([
23
23
  * @extends sap.m.OverflowToolbarButton
24
24
  *
25
25
  * @author SAP SE
26
- * @version 1.117.1
26
+ * @version 1.118.0
27
27
  *
28
28
  * @constructor
29
29
  * @private
30
30
  * @since 1.94
31
31
  * @alias sap.ui.rta.toolbar.OverflowToolbarButton
32
- * @experimental Since 1.94. This class is experimental. The API might be changed in the future.
33
32
  */
34
33
 
35
34
  var OverflowToolbarButton = SapMOverflowToolbarButton.extend("sap.ui.rta.toolbar.OverflowToolbarButton", {
@@ -50,8 +49,8 @@ sap.ui.define([
50
49
  *
51
50
  * @private
52
51
  */
53
- OverflowToolbarButton.prototype._onBeforeEnterOverflow = function() {
54
- SapMOverflowToolbarButton.prototype._onBeforeEnterOverflow.apply(this, arguments);
52
+ OverflowToolbarButton.prototype._onBeforeEnterOverflow = function(...aArgs) {
53
+ SapMOverflowToolbarButton.prototype._onBeforeEnterOverflow.apply(this, aArgs);
55
54
  this.setVisibleIcon(this.getIcon());
56
55
  this.setIcon("");
57
56
  };
@@ -61,8 +60,8 @@ sap.ui.define([
61
60
  *
62
61
  * @private
63
62
  */
64
- OverflowToolbarButton.prototype._onAfterExitOverflow = function() {
65
- SapMOverflowToolbarButton.prototype._onAfterExitOverflow.apply(this, arguments);
63
+ OverflowToolbarButton.prototype._onAfterExitOverflow = function(...aArgs) {
64
+ SapMOverflowToolbarButton.prototype._onAfterExitOverflow.apply(this, aArgs);
66
65
  this.setIcon(this.getVisibleIcon());
67
66
  };
68
67
 
@@ -22,13 +22,12 @@ function(
22
22
  * @extends sap.ui.rta.toolbar.Base
23
23
  *
24
24
  * @author SAP SE
25
- * @version 1.117.1
25
+ * @version 1.118.0
26
26
  *
27
27
  * @constructor
28
28
  * @private
29
29
  * @since 1.48
30
30
  * @alias sap.ui.rta.toolbar.Personalization
31
- * @experimental Since 1.48. This class is experimental. API might be changed in future.
32
31
  */
33
32
  var Personalization = Base.extend("sap.ui.rta.toolbar.Personalization", {
34
33
  renderer: "sap.ui.rta.toolbar.BaseRenderer",
@@ -43,8 +42,9 @@ function(
43
42
  restore: {}
44
43
  }
45
44
  },
46
- constructor: function() {
47
- Base.apply(this, arguments);
45
+ // eslint-disable-next-line object-shorthand
46
+ constructor: function(...aArgs) {
47
+ Base.apply(this, aArgs);
48
48
  this.setJustifyContent("End");
49
49
  }
50
50
  });
@@ -20,13 +20,12 @@ function(
20
20
  * @extends sap.ui.rta.toolbar.Adaptation
21
21
  *
22
22
  * @author SAP SE
23
- * @version 1.117.1
23
+ * @version 1.118.0
24
24
  *
25
25
  * @constructor
26
26
  * @private
27
27
  * @since 1.48
28
28
  * @alias sap.ui.rta.toolbar.Standalone
29
- * @experimental Since 1.48. This class is experimental. API might be changed in future.
30
29
  */
31
30
  var Standalone = Adaptation.extend("sap.ui.rta.toolbar.Standalone", {
32
31
  metadata: {
@@ -17,7 +17,8 @@ sap.ui.define([
17
17
  "sap/ui/model/Filter",
18
18
  "sap/ui/model/FilterOperator",
19
19
  "sap/ui/model/json/JSONModel",
20
- "sap/ui/core/date/UI5Date"
20
+ "sap/ui/core/date/UI5Date",
21
+ "sap/ui/performance/Measurement"
21
22
  ],
22
23
  function(
23
24
  Log,
@@ -31,20 +32,21 @@ function(
31
32
  Filter,
32
33
  FilterOperator,
33
34
  JSONModel,
34
- UI5Date
35
+ UI5Date,
36
+ Measurement
35
37
  ) {
36
38
  "use strict";
37
39
 
38
40
  var oRanking = {
39
41
  Initial: 0,
40
42
  Default: 1024,
41
- Before: function(iRank) {
43
+ Before(iRank) {
42
44
  return iRank + 1024;
43
45
  },
44
- Between: function(iRank1, iRank2) {
46
+ Between(iRank1, iRank2) {
45
47
  return (iRank1 + iRank2) / 2;
46
48
  },
47
- After: function(iRank) {
49
+ After(iRank) {
48
50
  return iRank + 0.5;
49
51
  }
50
52
  };
@@ -57,17 +59,19 @@ function(
57
59
  }
58
60
  }
59
61
  },
60
- constructor: function() {
61
- ManagedObject.prototype.constructor.apply(this, arguments);
62
+ // eslint-disable-next-line object-shorthand
63
+ constructor: function(...aArgs) {
64
+ ManagedObject.prototype.constructor.apply(this, aArgs);
62
65
  this.oTextResources = this.getToolbar().getTextResources();
63
66
  }
64
67
  });
65
68
 
66
69
  ManageAdaptations.prototype.openManageAdaptationDialog = function() {
70
+ Measurement.start("onCBAOpenManageAdaptationDialog", "Measurement of opening the manage context-based adaptation dialog");
67
71
  if (!this._oManageAdaptationDialogPromise) {
68
72
  this._oManageAdaptationDialogPromise = Fragment.load({
69
73
  name: "sap.ui.rta.toolbar.contextBased.ManageAdaptationsDialog",
70
- id: this.getToolbar().getId() + "_fragment--sapUiRta_manageAdaptationDialog",
74
+ id: `${this.getToolbar().getId()}_fragment--sapUiRta_manageAdaptationDialog`,
71
75
  controller: {
72
76
  formatContextColumnCell: formatContextColumnCell.bind(this),
73
77
  formatContextColumnTooltip: formatContextColumnTooltip.bind(this),
@@ -94,9 +98,15 @@ function(
94
98
  return this._oManageAdaptationDialogPromise
95
99
  .then(function() {
96
100
  this._oRtaInformation = this.getToolbar().getRtaInformation();
97
- return ContextBasedAdaptationsAPI.load({control: this._oRtaInformation.rootControl, layer: this._oRtaInformation.flexSettings.layer});
101
+ return ContextBasedAdaptationsAPI.load({
102
+ control: this._oRtaInformation.rootControl,
103
+ layer: this._oRtaInformation.flexSettings.layer
104
+ });
98
105
  }.bind(this)).then(function(oAdaptations) {
99
- this.oAdaptationsModel = ContextBasedAdaptationsAPI.getAdaptationsModel({control: this._oRtaInformation.rootControl, layer: this._oRtaInformation.flexSettings.layer});
106
+ this.oAdaptationsModel = ContextBasedAdaptationsAPI.getAdaptationsModel({
107
+ control: this._oRtaInformation.rootControl,
108
+ layer: this._oRtaInformation.flexSettings.layer
109
+ });
100
110
  this.oAdaptationsModel.updateAdaptations(oAdaptations.adaptations);
101
111
  this.oReferenceAdaptationsData = JSON.parse(JSON.stringify(this.oAdaptationsModel.getProperty("/adaptations")));
102
112
  this._oOriginAdaptationsData = JSON.parse(JSON.stringify(this.oAdaptationsModel.getProperty("/allAdaptations")));
@@ -104,6 +114,8 @@ function(
104
114
  this._oManageAdaptationDialog.setModel(this.oAdaptationsModel, "contextBased");
105
115
  this._oManageAdaptationDialog.setModel(this._oControlConfigurationModel, "controlConfiguration");
106
116
  getAdaptationsTable.call(this).attachSelectionChange(onSelectionChange.bind(this));
117
+ Measurement.end("onCBAOpenManageAdaptationDialog");
118
+ Measurement.getActive() && Log.info(`onCBAOpenManageAdaptationDialog: ${Measurement.getMeasurement("onCBAOpenManageAdaptationDialog").time} ms`);
107
119
  return this._oManageAdaptationDialog.open();
108
120
  }.bind(this)
109
121
  ).catch(function(oError) {
@@ -117,8 +129,8 @@ function(
117
129
 
118
130
  // ------ formatting ------
119
131
  function formatContextColumnCell(aRoles) {
120
- return aRoles.length + " " + (aRoles.length > 1 ?
121
- this.oTextResources.getText("TXT_TABLE_CONTEXT_CELL_ROLES") : this.oTextResources.getText("TXT_TABLE_CONTEXT_CELL_ROLE"));
132
+ return `${aRoles.length} ${aRoles.length > 1 ?
133
+ this.oTextResources.getText("TXT_TABLE_CONTEXT_CELL_ROLES") : this.oTextResources.getText("TXT_TABLE_CONTEXT_CELL_ROLE")}`;
122
134
  }
123
135
 
124
136
  function formatContextColumnTooltip(aRoles) {
@@ -135,7 +147,7 @@ function(
135
147
  minute: "numeric"
136
148
  };
137
149
  var sLanguage = sap.ui.getCore().getConfiguration().getLanguage();
138
- return sModifiedBy + "\n" + oUi5Date.toLocaleTimeString(sLanguage, oOptions);
150
+ return `${sModifiedBy}\n${oUi5Date.toLocaleTimeString(sLanguage, oOptions)}`;
139
151
  }
140
152
 
141
153
  function onSelectionChange(oEvent) {
@@ -176,7 +188,7 @@ function(
176
188
  var oFilterByTitle = new Filter("title", FilterOperator.Contains, sQuery);
177
189
  var oFilterByContextId = new Filter({
178
190
  path: "contexts/role",
179
- test: function(aRoles) {
191
+ test(aRoles) {
180
192
  return aRoles.some(function(sRole) {
181
193
  return sRole.includes(sQuery.toUpperCase());
182
194
  });
@@ -286,7 +298,10 @@ function(
286
298
  // set the rank property and update the model to refresh the bindings
287
299
  this.oAdaptationsModel.setProperty("rank", iNewRank, oDraggedItemContext);
288
300
  sortByRank(this.oAdaptationsModel);
289
- var oAllUpdatedAdaptations = Object.assign(this.oAdaptationsModel.getProperty("/allAdaptations"), this.oAdaptationsModel.getProperty("/adaptations"));
301
+ var oAllUpdatedAdaptations = Object.assign(
302
+ this.oAdaptationsModel.getProperty("/allAdaptations"),
303
+ this.oAdaptationsModel.getProperty("/adaptations")
304
+ );
290
305
  this.oAdaptationsModel.updateAdaptations(oAllUpdatedAdaptations);
291
306
  enableSaveButton.call(this, didAdaptationsPriorityChange.call(this));
292
307
  }
@@ -309,7 +324,7 @@ function(
309
324
  }
310
325
 
311
326
  function getControlInDialog(sId) {
312
- return this.getToolbar().getControl("manageAdaptationDialog--" + sId);
327
+ return this.getToolbar().getControl(`manageAdaptationDialog--${sId}`);
313
328
  }
314
329
 
315
330
  function getDefaultApplicationTable() {
@@ -350,17 +365,25 @@ function(
350
365
  function onSaveReorderedAdaptations() {
351
366
  Utils.checkDraftOverwrite(this.getToolbar().getModel("versions")).then(function() {
352
367
  var oRtaInformation = this.getToolbar().getRtaInformation();
353
- var aAdaptationPriorities = this.oAdaptationsModel.getProperty("/adaptations").map(function(oAdaptation) { return oAdaptation.id; });
354
- return ContextBasedAdaptationsAPI.reorder({control: oRtaInformation.rootControl, layer: oRtaInformation.flexSettings.layer, parameters: {priorities: aAdaptationPriorities}});
368
+ var aAdaptationPriorities = this.oAdaptationsModel.getProperty("/adaptations")
369
+ .map(function(oAdaptation) { return oAdaptation.id; });
370
+ return ContextBasedAdaptationsAPI.reorder({
371
+ control: oRtaInformation.rootControl,
372
+ layer: oRtaInformation.flexSettings.layer,
373
+ parameters: {priorities: aAdaptationPriorities}
374
+ });
355
375
  }.bind(this)).then(function() {
356
- var oAllUpdatedAdaptations = Object.assign(this.oAdaptationsModel.getProperty("/allAdaptations"), this.oAdaptationsModel.getProperty("/adaptations"));
376
+ var oAllUpdatedAdaptations = Object.assign(
377
+ this.oAdaptationsModel.getProperty("/allAdaptations"),
378
+ this.oAdaptationsModel.getProperty("/adaptations")
379
+ );
357
380
  this.oAdaptationsModel.updateAdaptations(oAllUpdatedAdaptations);
358
381
  onCloseDialog.call(this);
359
382
  }.bind(this))
360
383
  .catch(function(oError) {
361
384
  if (oError !== "cancel") {
362
385
  Utils.showMessageBox("error", "MSG_LREP_TRANSFER_ERROR", { titleKey: "BTN_MANAGE_APP_CTX", error: oError});
363
- Log.error("sap.ui.rta: " + oError.stack || oError.message || oError);
386
+ Log.error(`sap.ui.rta: ${oError.stack || oError.message || oError}`);
364
387
  }
365
388
  });
366
389
  }
@@ -15,7 +15,8 @@ sap.ui.define([
15
15
  "sap/ui/fl/write/api/ContextBasedAdaptationsAPI",
16
16
  "sap/ui/fl/write/api/ContextSharingAPI",
17
17
  "sap/ui/rta/Utils",
18
- "sap/ui/model/json/JSONModel"
18
+ "sap/ui/model/json/JSONModel",
19
+ "sap/ui/performance/Measurement"
19
20
  ], function(
20
21
  ManagedObject,
21
22
  Log,
@@ -27,12 +28,13 @@ sap.ui.define([
27
28
  ContextBasedAdaptationsAPI,
28
29
  ContextSharingAPI,
29
30
  Utils,
30
- JSONModel
31
+ JSONModel,
32
+ Measurement
31
33
  ) {
32
34
  "use strict";
33
35
 
34
36
  // shortcut for sap.ui.core.ValueState
35
- var ValueState = coreLibrary.ValueState;
37
+ var {ValueState} = coreLibrary;
36
38
 
37
39
  /**
38
40
  * Controller for the <code>sap.ui.rta.toolbar.contextBased.SaveAsAdaptation</code> controls.
@@ -41,7 +43,7 @@ sap.ui.define([
41
43
  * @class
42
44
  *
43
45
  * @author SAP SE
44
- * @version 1.117.1
46
+ * @version 1.118.0
45
47
  *
46
48
  * @constructor
47
49
  * @private
@@ -56,8 +58,9 @@ sap.ui.define([
56
58
  }
57
59
  }
58
60
  },
59
- constructor: function() {
60
- ManagedObject.prototype.constructor.apply(this, arguments);
61
+ // eslint-disable-next-line object-shorthand
62
+ constructor: function(...aArgs) {
63
+ ManagedObject.prototype.constructor.apply(this, aArgs);
61
64
  this.oTextResources = this.getToolbar().getTextResources();
62
65
  }
63
66
  });
@@ -67,7 +70,7 @@ sap.ui.define([
67
70
  if (!this._oAddAdaptationDialogPromise) {
68
71
  this._oAddAdaptationDialogPromise = Fragment.load({
69
72
  name: "sap.ui.rta.toolbar.contextBased.SaveAsAdaptationDialog",
70
- id: this.getToolbar().getId() + "_fragment--sapUiRta_addAdaptationDialog",
73
+ id: `${this.getToolbar().getId()}_fragment--sapUiRta_addAdaptationDialog`,
71
74
  controller: {
72
75
  onAdaptationTitleChange: onAdaptationTitleChange.bind(this),
73
76
  onSaveAsAdaptation: onSaveAsAdaptation.bind(this),
@@ -165,6 +168,7 @@ sap.ui.define([
165
168
  oContextBasedAdaptation.priority = getAdaptationPriority.call(this);
166
169
  var oRtaInformation = this.getToolbar().getRtaInformation();
167
170
  if (this._bIsEditMode) {
171
+ Measurement.start("onCBAUpdateAdaptation", "Measurement of updating a context-based adaptation");
168
172
  oContextBasedAdaptation.adaptationId = this._mEditProperties.adaptationId;
169
173
  ContextBasedAdaptationsAPI.update({
170
174
  control: oRtaInformation.rootControl,
@@ -175,6 +179,8 @@ sap.ui.define([
175
179
  .then(function(oContextBasedAdaptation, oResponse) {
176
180
  if (oResponse.status === 200) {
177
181
  this.oAdaptationsModel.updateAdaptationContent(oContextBasedAdaptation);
182
+ Measurement.end("onCBAUpdateAdaptation");
183
+ Measurement.getActive() && Log.info(`onCBAUpdateAdaptation: ${Measurement.getMeasurement("onCBAUpdateAdaptation").time} ms`);
178
184
  }
179
185
  }.bind(this, oContextBasedAdaptation))
180
186
  .catch(function(oError) {
@@ -185,6 +191,7 @@ sap.ui.define([
185
191
  Utils.showMessageBox("error", sMessage, oOptions);
186
192
  });
187
193
  } else {
194
+ Measurement.start("onCBASaveAsAdaptation", "Measurement of saving a context-based adaptation");
188
195
  BusyIndicator.show();
189
196
  ContextBasedAdaptationsAPI.create({
190
197
  control: oRtaInformation.rootControl,
@@ -193,6 +200,8 @@ sap.ui.define([
193
200
  }).then(function() {
194
201
  BusyIndicator.hide();
195
202
  this.getToolbar().fireEvent("switchAdaptation", {adaptationId: oContextBasedAdaptation.id, trigger: "SaveAs"});
203
+ Measurement.end("onCBASaveAsAdaptation");
204
+ Measurement.getActive() && Log.info(`onCBASaveAsAdaptation: ${Measurement.getMeasurement("onCBASaveAsAdaptation").time} ms`);
196
205
  }.bind(this)).catch(function(oError) {
197
206
  BusyIndicator.hide();
198
207
  Log.error(oError.stack);