@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
@@ -82,7 +82,7 @@ sap.ui.define([
82
82
  var oError = DtUtil.propagateError(
83
83
  vError,
84
84
  "service.Receiver",
85
- DtUtil.printf("Can't execute method {0} of service {1} due unexpected error.", mRequestBody.method, mRequestBody.service),
85
+ `Unexpected error: Can't execute method ${mRequestBody.method} of service ${mRequestBody.service}`,
86
86
  "sap.ui.rta"
87
87
  );
88
88
 
@@ -172,7 +172,7 @@ sap.ui.define([
172
172
  oPostMessageBus.subscribe(CHANNEL_ID, "unsubscribe", fnReceiver);
173
173
 
174
174
  return {
175
- destroy: function() {
175
+ destroy() {
176
176
  if (oPostMessageBus) {
177
177
  oPostMessageBus.unsubscribe(CHANNEL_ID, "getService", fnReceiver);
178
178
  oPostMessageBus.unsubscribe(CHANNEL_ID, "callMethod", fnReceiver);
@@ -13,9 +13,8 @@ sap.ui.define(function() {
13
13
  * @namespace
14
14
  * @name sap.ui.rta.service.Selection
15
15
  * @author SAP SE
16
- * @experimental Since 1.58
17
16
  * @since 1.58
18
- * @version 1.117.1
17
+ * @version 1.119.0
19
18
  * @private
20
19
  * @ui5-restricted
21
20
  */
@@ -48,7 +47,7 @@ sap.ui.define(function() {
48
47
  * @return {string[]} Selected control IDs
49
48
  * @public
50
49
  */
51
- get: function() {
50
+ get() {
52
51
  return getControlIds(oSelectionManager.get());
53
52
  },
54
53
 
@@ -27,9 +27,8 @@ sap.ui.define([
27
27
  * @namespace
28
28
  * @name sap.ui.rta.service.SupportTools
29
29
  * @author SAP SE
30
- * @experimental Since 1.106
31
30
  * @since 1.106
32
- * @version 1.117.1
31
+ * @version 1.119.0
33
32
  * @private
34
33
  * @ui5-restricted
35
34
  */
@@ -342,7 +341,7 @@ sap.ui.define([
342
341
  onRtaStart();
343
342
 
344
343
  return {
345
- destroy: function() {
344
+ destroy() {
346
345
  window.removeEventListener("message", fnOnMessageReceivedBound);
347
346
  }
348
347
  };
@@ -116,9 +116,14 @@
116
116
  }
117
117
  }
118
118
 
119
+ .sapUiRtaAddIFrameDialogLegacyNavigationContainer > div {
120
+ display: flex;
121
+ align-items: center;
122
+ }
123
+
119
124
  .sapUiRtaAddIFrameDialogPreviewGrid {
120
125
  padding: 0;
121
- margin: 0 1rem;
126
+ margin: 0 1rem 1rem;
122
127
  background: @_sap_ui_rta_AddIFrame_PreviewBG;
123
128
  border: 0.0625rem solid @_sap_ui_rta_AddIFrame_BorderColor; //1px
124
129
 
@@ -34,5 +34,9 @@
34
34
  padding-left: 1.25rem; //20px
35
35
  height: 2.75rem; /* Overrider `.sapUiSizeCompact .sapMTB` */ //44px
36
36
  background-color: @_sap_ui_rta_Toolbar_Base_BaseBG;
37
+
38
+ &.sapUiRtaToolbar_scrolling {
39
+ position: fixed!important;
40
+ }
37
41
  }
38
42
  }
@@ -21,7 +21,8 @@ sap.ui.define([
21
21
  "sap/ui/rta/toolbar/translation/Translation",
22
22
  "sap/ui/rta/toolbar/versioning/Versioning",
23
23
  "sap/ui/rta/Utils",
24
- "sap/m/MessageBox"
24
+ "sap/m/MessageBox",
25
+ "sap/ui/performance/Measurement"
25
26
  ], function(
26
27
  AdaptationRenderer,
27
28
  Log,
@@ -39,7 +40,8 @@ sap.ui.define([
39
40
  Translation,
40
41
  Versioning,
41
42
  Utils,
42
- MessageBox
43
+ MessageBox,
44
+ Measurement
43
45
  ) {
44
46
  "use strict";
45
47
 
@@ -51,13 +53,12 @@ sap.ui.define([
51
53
  * @extends sap.ui.rta.toolbar.Base
52
54
  *
53
55
  * @author SAP SE
54
- * @version 1.117.1
56
+ * @version 1.119.0
55
57
  *
56
58
  * @constructor
57
59
  * @private
58
60
  * @since 1.48
59
61
  * @alias sap.ui.rta.toolbar.Adaptation
60
- * @experimental Since 1.48. This class is experimental. API might be changed in future.
61
62
  */
62
63
  var Adaptation = Base.extend("sap.ui.rta.toolbar.Adaptation", {
63
64
  renderer: AdaptationRenderer,
@@ -92,11 +93,11 @@ sap.ui.define([
92
93
  // Size of three icons + spacing in pixels
93
94
  var SWITCHER_ICON_WIDTH = 124;
94
95
 
95
- Adaptation.prototype.init = function() {
96
+ Adaptation.prototype.init = function(...aArgs) {
96
97
  this._mSizeLimits = {
97
98
  switchToIcons: undefined
98
99
  };
99
- this._pFragmentLoaded = Base.prototype.init.apply(this, arguments)
100
+ this._pFragmentLoaded = Base.prototype.init.apply(this, aArgs)
100
101
  .then(function() {
101
102
  this._onResize = this._onResize.bind(this);
102
103
  window.addEventListener("resize", this._onResize);
@@ -113,12 +114,12 @@ sap.ui.define([
113
114
  return this._pFragmentLoaded;
114
115
  };
115
116
 
116
- Adaptation.prototype.exit = function() {
117
+ Adaptation.prototype.exit = function(...aArgs) {
117
118
  window.removeEventListener("resize", this._onResize);
118
119
  this._aIntersectionObservers.forEach(function(oInstersectionObserver) {
119
120
  oInstersectionObserver.disconnect();
120
121
  });
121
- Base.prototype.exit.apply(this, arguments);
122
+ Base.prototype.exit.apply(this, aArgs);
122
123
  };
123
124
 
124
125
  Adaptation.prototype._restoreHiddenElements = function() {
@@ -147,11 +148,11 @@ sap.ui.define([
147
148
 
148
149
  Adaptation.prototype.adjustToolbarSectionWidths = function() {
149
150
  // The middle section (switcher) is used as base for the other calculations
150
- this.getControl(Adaptation.MIDDLE_SECTION).setWidth((this._iSwitcherToolbarWidth) + "px");
151
+ this.getControl(Adaptation.MIDDLE_SECTION).setWidth(`${this._iSwitcherToolbarWidth}px`);
151
152
  [Adaptation.LEFT_SECTION, Adaptation.RIGHT_SECTION].forEach(function(sSectionName) {
152
153
  this.getControl(sSectionName).getDomRef().style.setProperty(
153
154
  "width",
154
- "calc(50% - " + Math.ceil(this._iSwitcherToolbarWidth / 2) + "px)",
155
+ `calc(50% - ${Math.ceil(this._iSwitcherToolbarWidth / 2)}px)`,
155
156
  "important"
156
157
  );
157
158
  }.bind(this));
@@ -245,7 +246,7 @@ sap.ui.define([
245
246
  var oButton = oEvent.getSource();
246
247
  if (!this._oActionsMenuFragment) {
247
248
  return Fragment.load({
248
- id: this.getId() + "_actionsMenu_fragment",
249
+ id: `${this.getId()}_actionsMenu_fragment`,
249
250
  name: "sap.ui.rta.toolbar.ActionsMenu",
250
251
  controller: {
251
252
  openDownloadTranslationDialog: onOpenDownloadTranslationDialog.bind(this),
@@ -254,7 +255,7 @@ sap.ui.define([
254
255
  overviewForKeyUser: onOverviewForKeyUserPressed.bind(this),
255
256
  overviewForDeveloper: onOverviewForDeveloperPressed.bind(this),
256
257
  restore: this.eventHandler.bind(this, "Restore"),
257
- formatSaveAsEnabled: formatSaveAsEnabled,
258
+ formatSaveAsEnabled,
258
259
  saveAs: onSaveAsPressed.bind(this)
259
260
  }
260
261
  }).then(function(oMenu) {
@@ -302,7 +303,7 @@ sap.ui.define([
302
303
  Adaptation.prototype.buildControls = function() {
303
304
  return Fragment.load({
304
305
  name: "sap.ui.rta.toolbar.Adaptation",
305
- id: this.getId() + "_fragment",
306
+ id: `${this.getId()}_fragment`,
306
307
  controller: {
307
308
  activate: this._openVersionTitleDialog.bind(this),
308
309
  discardDraft: this.eventHandler.bind(this, "DiscardDraft"),
@@ -374,11 +375,14 @@ sap.ui.define([
374
375
 
375
376
  function performMigration(oRtaInformation) {
376
377
  BusyIndicator.show();
378
+ Measurement.start("onCBAMigration", "Measurement of migration to context-based adaptation");
377
379
  return ContextBasedAdaptationsAPI.migrate({
378
380
  control: oRtaInformation.rootControl,
379
381
  layer: oRtaInformation.flexSettings.layer
380
382
  })
381
383
  .finally(function() {
384
+ Measurement.end("onCBAMigration");
385
+ Measurement.getActive() && Log.info(`onCBAMigration: ${Measurement.getMeasurement("onCBAMigration").time} ms`);
382
386
  BusyIndicator.hide();
383
387
  })
384
388
  .then(Utils.showMessageBox.bind(undefined, "information", "DAC_DIALOG_MIGRATION_SUCCESSFULL_DESCRIPTION", {
@@ -403,8 +407,11 @@ sap.ui.define([
403
407
  function onSaveAsAdaptation() {
404
408
  var oRtaInformation = this.getRtaInformation();
405
409
  Utils.checkDraftOverwrite(this.getModel("versions")).then(function() {
410
+ Measurement.start("onCBACanMigrate", "Measurement if its possible to migrate to context-based adaptation");
406
411
  return ContextBasedAdaptationsAPI.canMigrate({ control: oRtaInformation.rootControl, layer: oRtaInformation.flexSettings.layer });
407
412
  }).then(function(bCanMigrate) {
413
+ Measurement.end("onCBACanMigrate");
414
+ Measurement.getActive() && Log.info(`onCBACanMigrate: ${Measurement.getMeasurement("onCBACanMigrate").time} ms`);
408
415
  if (bCanMigrate) {
409
416
  confirmMigration.call(this, oRtaInformation);
410
417
  } else {
@@ -425,7 +432,7 @@ sap.ui.define([
425
432
  function handleError(oError) {
426
433
  if (oError !== "cancel") {
427
434
  Utils.showMessageBox("error", "MSG_LREP_TRANSFER_ERROR", {error: oError});
428
- Log.error("sap.ui.rta: " + oError.stack || oError.message || oError);
435
+ Log.error(`sap.ui.rta: ${oError.stack || oError.message || oError}`);
429
436
  }
430
437
  }
431
438
 
@@ -450,7 +457,7 @@ sap.ui.define([
450
457
  if (sTitle === "") {
451
458
  return this.getTextResources().getText("TXT_DEFAULT_APP");
452
459
  }
453
- return this.getTextResources().getText("BTN_ADAPTING_FOR", sTitle);
460
+ return this.getTextResources().getText("BTN_ADAPTING_FOR", [sTitle]);
454
461
  }
455
462
  return this.getTextResources().getText("BTN_ADAPTING_FOR_ALL_USERS");
456
463
  }
@@ -468,7 +475,7 @@ sap.ui.define([
468
475
  }
469
476
 
470
477
  Adaptation.prototype.getControl = function(sName) {
471
- var oControl = sap.ui.getCore().byId(this.getId() + "_fragment--sapUiRta_" + sName);
478
+ var oControl = sap.ui.getCore().byId(`${this.getId()}_fragment--sapUiRta_${sName}`);
472
479
  // Control is inside the ActionsMenu
473
480
  if (!oControl && this._oActionsMenuFragment) {
474
481
  oControl = sap.ui.getCore().byId(this._oActionsMenuFragment.getId().replace("sapUiRta_actions", "sapUiRta_") + sName);
@@ -479,11 +486,11 @@ sap.ui.define([
479
486
  /**
480
487
  * @inheritDoc
481
488
  */
482
- Adaptation.prototype.hide = function() {
489
+ Adaptation.prototype.hide = function(...aArgs) {
483
490
  this._aIntersectionObservers.forEach(function(oInstersectionObserver) {
484
491
  oInstersectionObserver.disconnect();
485
492
  });
486
- return Base.prototype.hide.apply(this, arguments);
493
+ return Base.prototype.hide.apply(this, aArgs);
487
494
  };
488
495
 
489
496
  Adaptation.prototype.showFeedbackForm = function() {
@@ -499,7 +506,7 @@ sap.ui.define([
499
506
  oUrlParams.set("feature", (sConnector === "KeyUserConnector" ? "BTP" : "ABAP"));
500
507
 
501
508
  var oFeedbackDialogModel = new JSONModel({
502
- url: sURL + "?" + oUrlParams.toString()
509
+ url: `${sURL}?${oUrlParams.toString()}`
503
510
  });
504
511
 
505
512
  return Fragment.load({
@@ -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.119.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.119.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.119.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.119.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.119.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.119.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: {