@openui5/sap.ui.dt 1.117.0 → 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 (48) hide show
  1. package/.eslintrc.json +25 -1
  2. package/package.json +2 -2
  3. package/src/sap/ui/dt/.library +1 -1
  4. package/src/sap/ui/dt/AggregationDesignTimeMetadata.js +6 -5
  5. package/src/sap/ui/dt/AggregationOverlay.js +10 -10
  6. package/src/sap/ui/dt/ControlObserver.js +8 -8
  7. package/src/sap/ui/dt/DOMUtil.js +4 -5
  8. package/src/sap/ui/dt/DesignTime.js +9 -9
  9. package/src/sap/ui/dt/DesignTimeMetadata.js +7 -7
  10. package/src/sap/ui/dt/ElementDesignTimeMetadata.js +9 -9
  11. package/src/sap/ui/dt/ElementOverlay.js +29 -26
  12. package/src/sap/ui/dt/ElementUtil.js +14 -16
  13. package/src/sap/ui/dt/ManagedObjectObserver.js +68 -51
  14. package/src/sap/ui/dt/MetadataPropagationUtil.js +7 -7
  15. package/src/sap/ui/dt/MutationObserver.js +2 -6
  16. package/src/sap/ui/dt/Overlay.js +26 -31
  17. package/src/sap/ui/dt/OverlayRegistry.js +3 -4
  18. package/src/sap/ui/dt/OverlayUtil.js +31 -7
  19. package/src/sap/ui/dt/Plugin.js +1 -2
  20. package/src/sap/ui/dt/ScrollbarSynchronizer.js +9 -9
  21. package/src/sap/ui/dt/SelectionManager.js +1 -2
  22. package/src/sap/ui/dt/SelectionMode.js +1 -2
  23. package/src/sap/ui/dt/TaskManager.js +9 -8
  24. package/src/sap/ui/dt/TaskRunner.js +2 -3
  25. package/src/sap/ui/dt/Util.js +17 -18
  26. package/src/sap/ui/dt/designtime/notAdaptableTree.designtime.js +1 -1
  27. package/src/sap/ui/dt/enablement/ElementEnablementTest.js +4 -5
  28. package/src/sap/ui/dt/enablement/Test.js +2 -3
  29. package/src/sap/ui/dt/enablement/Util.js +1 -2
  30. package/src/sap/ui/dt/enablement/libraryTest.js +40 -40
  31. package/src/sap/ui/dt/enablement/report/LibraryReport.js +1 -2
  32. package/src/sap/ui/dt/enablement/report/QUnitReport.js +9 -10
  33. package/src/sap/ui/dt/enablement/report/Statistic.js +17 -18
  34. package/src/sap/ui/dt/enablement/report/StatisticRenderer.js +1 -1
  35. package/src/sap/ui/dt/enablement/report/Table.js +22 -23
  36. package/src/sap/ui/dt/enablement/report/TableRenderer.js +1 -1
  37. package/src/sap/ui/dt/library.js +2 -3
  38. package/src/sap/ui/dt/plugin/ContextMenu.js +5 -8
  39. package/src/sap/ui/dt/plugin/ControlDragDrop.js +6 -7
  40. package/src/sap/ui/dt/plugin/CutPaste.js +2 -3
  41. package/src/sap/ui/dt/plugin/DragDrop.js +19 -16
  42. package/src/sap/ui/dt/plugin/ElementMover.js +2 -4
  43. package/src/sap/ui/dt/plugin/MouseSelection.js +3 -4
  44. package/src/sap/ui/dt/plugin/TabHandling.js +4 -4
  45. package/src/sap/ui/dt/plugin/ToolHooks.js +1 -2
  46. package/src/sap/ui/dt/themes/base/Overlay.less +5 -0
  47. package/src/sap/ui/dt/util/ZIndexManager.js +7 -8
  48. package/src/sap/ui/dt/util/_createPromise.js +11 -14
package/.eslintrc.json CHANGED
@@ -26,6 +26,7 @@
26
26
  "max-len": ["warn", {
27
27
  "code": 140,
28
28
  "ignorePattern": "@param|@returns|@description|<|QUnit.test",
29
+ "ignoreTemplateLiterals": true,
29
30
  "ignoreUrls": true
30
31
  }],
31
32
  "space-before-function-paren": ["error", {
@@ -50,6 +51,29 @@
50
51
  "quotes": ["error", "double", {
51
52
  "avoidEscape": true,
52
53
  "allowTemplateLiterals": true
53
- }]
54
+ }],
55
+ "no-unsafe-optional-chaining": "error",
56
+ "prefer-const": ["error", { "ignoreReadBeforeAssign": true }],
57
+ "prefer-template": "error",
58
+ "rest-spread-spacing": ["error", "never"],
59
+ "template-curly-spacing": "error",
60
+ "object-shorthand": ["error", "always", { "ignoreConstructors": false, "avoidQuotes": true }],
61
+ "prefer-destructuring": ["error", {
62
+ "VariableDeclarator": {
63
+ "array": false,
64
+ "object": true
65
+ },
66
+ "AssignmentExpression": {
67
+ "array": true,
68
+ "object": false
69
+ }
70
+ }, {
71
+ "enforceForRenamedProperties": false
72
+ }
73
+ ],
74
+ "prefer-rest-params": "error",
75
+ "prefer-spread": "error",
76
+ "logical-assignment-operators":["error", "always", { "enforceForIfStatements": true } ],
77
+ "require-await": "error"
54
78
  }
55
79
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openui5/sap.ui.dt",
3
- "version": "1.117.0",
3
+ "version": "1.118.0",
4
4
  "description": "OpenUI5 UI Library sap.ui.dt",
5
5
  "author": "SAP SE (https://www.sap.com)",
6
6
  "license": "Apache-2.0",
@@ -14,6 +14,6 @@
14
14
  "url": "https://github.com/SAP/openui5.git"
15
15
  },
16
16
  "dependencies": {
17
- "@openui5/sap.ui.core": "1.117.0"
17
+ "@openui5/sap.ui.core": "1.118.0"
18
18
  }
19
19
  }
@@ -6,7 +6,7 @@
6
6
  <copyright>OpenUI5
7
7
  * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
8
8
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.</copyright>
9
- <version>1.117.0</version>
9
+ <version>1.118.0</version>
10
10
 
11
11
  <documentation>SAP UI library: sap.ui.dt (by SAP, Author)</documentation>
12
12
 
@@ -23,15 +23,15 @@ function(
23
23
  * @extends sap.ui.dt.DesignTimeMetadata
24
24
  *
25
25
  * @author SAP SE
26
- * @version 1.117.0
26
+ * @version 1.118.0
27
27
  *
28
28
  * @constructor
29
29
  * @private
30
30
  * @since 1.30
31
31
  * @alias sap.ui.dt.AggregationDesignTimeMetadata
32
- * @experimental Since 1.30. This class is experimental and provides only limited functionality. Also the API might be changed in future.
33
32
  */
34
- var AggregationDesignTimeMetadata = DesignTimeMetadata.extend("sap.ui.dt.AggregationDesignTimeMetadata", /** @lends sap.ui.dt.AggregationDesignTimeMetadata.prototype */ {
33
+ var AggregationDesignTimeMetadata = DesignTimeMetadata
34
+ .extend("sap.ui.dt.AggregationDesignTimeMetadata", /** @lends sap.ui.dt.AggregationDesignTimeMetadata.prototype */ {
35
35
  metadata: {
36
36
  library: "sap.ui.dt"
37
37
  }
@@ -45,8 +45,9 @@ function(
45
45
  * @return {string|undefined} Returns the label as string or undefined
46
46
  * @public
47
47
  */
48
- AggregationDesignTimeMetadata.prototype.getLabel = function(oElement, sAggregationName) {
49
- return DesignTimeMetadata.prototype.getLabel.apply(this, arguments) || sAggregationName;
48
+ AggregationDesignTimeMetadata.prototype.getLabel = function(...aArgs) {
49
+ const [, sAggregationName] = aArgs;
50
+ return DesignTimeMetadata.prototype.getLabel.apply(this, aArgs) || sAggregationName;
50
51
  };
51
52
 
52
53
  return AggregationDesignTimeMetadata;
@@ -33,13 +33,12 @@ function(
33
33
  * @extends sap.ui.dt.Overlay
34
34
  *
35
35
  * @author SAP SE
36
- * @version 1.117.0
36
+ * @version 1.118.0
37
37
  *
38
38
  * @constructor
39
39
  * @private
40
40
  * @since 1.30
41
41
  * @alias sap.ui.dt.AggregationOverlay
42
- * @experimental Since 1.30. This class is experimental and provides only limited functionality. Also the API might be changed in future.
43
42
  */
44
43
  var AggregationOverlay = Overlay.extend("sap.ui.dt.AggregationOverlay", /** @lends sap.ui.dt.AggregationOverlay.prototype */ {
45
44
  metadata: {
@@ -78,10 +77,10 @@ function(
78
77
  /**
79
78
  * @override
80
79
  */
81
- AggregationOverlay.prototype._getAttributes = function() {
80
+ AggregationOverlay.prototype._getAttributes = function(...aArgs) {
82
81
  return merge(
83
82
  {},
84
- Overlay.prototype._getAttributes.apply(this, arguments),
83
+ Overlay.prototype._getAttributes.apply(this, aArgs),
85
84
  {
86
85
  "data-sap-ui-dt-aggregation": this.getAggregationName()
87
86
  }
@@ -192,10 +191,10 @@ function(
192
191
  /**
193
192
  * @override
194
193
  */
195
- AggregationOverlay.prototype.render = function() {
194
+ AggregationOverlay.prototype.render = function(...aArgs) {
196
195
  if (this.getChildren().length > 0 || this.getDesignTimeMetadata().getDomRef()) {
197
196
  this.addStyleClass("sapUiDtAggregationOverlay");
198
- return Overlay.prototype.render.apply(this, arguments);
197
+ return Overlay.prototype.render.apply(this, aArgs);
199
198
  }
200
199
  return undefined;
201
200
  };
@@ -203,19 +202,20 @@ function(
203
202
  /**
204
203
  * @override
205
204
  */
206
- AggregationOverlay.prototype._getRenderingParent = function() {
205
+ AggregationOverlay.prototype._getRenderingParent = function(...aArgs) {
207
206
  if (Util.isInteger(this.getScrollContainerId())) {
208
207
  return this.getParent().getScrollContainerById(this.getScrollContainerId());
209
208
  }
210
- return Overlay.prototype._getRenderingParent.apply(this, arguments);
209
+ return Overlay.prototype._getRenderingParent.apply(this, aArgs);
211
210
  };
212
211
 
213
212
  /**
214
213
  * @override
215
214
  */
216
- AggregationOverlay.prototype._setPosition = function($Target, oGeometry, $Parent, bForceScrollbarSync) {
215
+ AggregationOverlay.prototype._setPosition = function(...aArgs) {
216
+ const [, oGeometry, , bForceScrollbarSync] = aArgs;
217
217
  // Apply Overlay position first, then extra logic based on this new position
218
- Overlay.prototype._setPosition.apply(this, arguments);
218
+ Overlay.prototype._setPosition.apply(this, aArgs);
219
219
 
220
220
  if (oGeometry.domRef && !Util.isInteger(this.getScrollContainerId())) {
221
221
  this._handleOverflowScroll(oGeometry, this.$(), this.getParent(), bForceScrollbarSync);
@@ -22,13 +22,12 @@ function(ManagedObjectObserver) {
22
22
  * @extends sap.ui.dt.ManagedObjectObserver
23
23
  *
24
24
  * @author SAP SE
25
- * @version 1.117.0
25
+ * @version 1.118.0
26
26
  *
27
27
  * @constructor
28
28
  * @private
29
29
  * @since 1.30
30
30
  * @alias sap.ui.dt.ControlObserver
31
- * @experimental Since 1.30. This class is experimental and provides only limited functionality. Also the API might be changed in future.
32
31
  */
33
32
  var ControlObserver = ManagedObjectObserver.extend("sap.ui.dt.ControlObserver", /** @lends sap.ui.dt.ControlObserver.prototype */ {
34
33
  metadata: {
@@ -54,8 +53,8 @@ function(ManagedObjectObserver) {
54
53
  /**
55
54
  * @protected
56
55
  */
57
- ControlObserver.prototype.init = function() {
58
- ManagedObjectObserver.prototype.init.apply(this, arguments);
56
+ ControlObserver.prototype.init = function(...aArgs) {
57
+ ManagedObjectObserver.prototype.init.apply(this, aArgs);
59
58
 
60
59
  this._oControlDelegate = {
61
60
  onAfterRendering: this._onAfterRendering
@@ -67,8 +66,9 @@ function(ManagedObjectObserver) {
67
66
  * @param {sap.ui.core.Control} oControl The target to observe
68
67
  * @override
69
68
  */
70
- ControlObserver.prototype.observe = function(oControl) {
71
- ManagedObjectObserver.prototype.observe.apply(this, arguments);
69
+ ControlObserver.prototype.observe = function(...aArgs) {
70
+ const [oControl] = aArgs;
71
+ ManagedObjectObserver.prototype.observe.apply(this, aArgs);
72
72
 
73
73
  oControl.addEventDelegate(this._oControlDelegate, this);
74
74
  };
@@ -78,13 +78,13 @@ function(ManagedObjectObserver) {
78
78
  * @param {sap.ui.core.Control} oControl The target to unobserve
79
79
  * @override
80
80
  */
81
- ControlObserver.prototype.unobserve = function() {
81
+ ControlObserver.prototype.unobserve = function(...aArgs) {
82
82
  var oControl = this.getTargetInstance();
83
83
  if (oControl) {
84
84
  oControl.removeDelegate(this._oControlDelegate, this);
85
85
  }
86
86
 
87
- ManagedObjectObserver.prototype.unobserve.apply(this, arguments);
87
+ ManagedObjectObserver.prototype.unobserve.apply(this, aArgs);
88
88
  };
89
89
 
90
90
  /**
@@ -23,12 +23,11 @@ sap.ui.define([
23
23
  *
24
24
  * @namespace
25
25
  * @author SAP SE
26
- * @version 1.117.0
26
+ * @version 1.118.0
27
27
  *
28
28
  * @private
29
29
  * @since 1.30
30
30
  * @alias sap.ui.dt.DOMUtil
31
- * @experimental Since 1.30. This class is experimental and provides only limited functionality. Also the API might be changed in future.
32
31
  */
33
32
 
34
33
  var DOMUtil = {};
@@ -153,11 +152,11 @@ sap.ui.define([
153
152
 
154
153
  DOMUtil._getElementDimensions = function(oDomRef, sMeasure, aDirection) {
155
154
  var oRelevantDomRef = oDomRef[0] || oDomRef;
156
- var iOffsetWidth = oRelevantDomRef["offset" + sMeasure];
155
+ var iOffsetWidth = oRelevantDomRef[`offset${sMeasure}`];
157
156
  var iValue = 0;
158
157
  for (var i = 0; i < 2; i++) {
159
158
  // remove border
160
- var sBorderMeasure = window.getComputedStyle(oRelevantDomRef, null)["border" + aDirection[ i ] + sMeasure];
159
+ var sBorderMeasure = window.getComputedStyle(oRelevantDomRef, null)[`border${aDirection[ i ]}${sMeasure}`];
161
160
  iValue -= sBorderMeasure ? parseInt(sBorderMeasure.slice(0, -2)) : 0;
162
161
  }
163
162
  return iOffsetWidth + iValue;
@@ -364,7 +363,7 @@ sap.ui.define([
364
363
  // Styles is an array, but has some special access functions
365
364
  for (var i = 0; i < iLength; i++) {
366
365
  sStyle = oStyles[i];
367
- sStyles = sStyles + sStyle + ":" + oStyles.getPropertyValue(sStyle) + ";";
366
+ sStyles = `${sStyles + sStyle}:${oStyles.getPropertyValue(sStyle)};`;
368
367
  }
369
368
 
370
369
  oDest.style.cssText = sStyles;
@@ -69,13 +69,12 @@ sap.ui.define([
69
69
  * @extends sap.ui.base.ManagedObject
70
70
  *
71
71
  * @author SAP SE
72
- * @version 1.117.0
72
+ * @version 1.118.0
73
73
  *
74
74
  * @constructor
75
75
  * @private
76
76
  * @since 1.30
77
77
  * @alias sap.ui.dt.DesignTime
78
- * @experimental Since 1.30. This class is experimental and provides only limited functionality. Also the API might be changed in future.
79
78
  */
80
79
 
81
80
  var DesignTime = ManagedObject.extend("sap.ui.dt.DesignTime", /** @lends sap.ui.dt.DesignTime.prototype */ {
@@ -258,7 +257,8 @@ sap.ui.define([
258
257
  syncFailed: {}
259
258
  }
260
259
  },
261
- constructor: function() {
260
+ // eslint-disable-next-line object-shorthand
261
+ constructor: function(...aArgs) {
262
262
  // Storage for promises of pending overlays (overlays that are in creation phase)
263
263
  this._sStatus = DesignTimeStatus.SYNCED;
264
264
  this._mPendingOverlays = {};
@@ -296,7 +296,7 @@ sap.ui.define([
296
296
  // Syncing batch of overlays
297
297
  this._aOverlaysCreatedInLastBatch = [];
298
298
 
299
- ManagedObject.apply(this, arguments);
299
+ ManagedObject.apply(this, aArgs);
300
300
 
301
301
  // Create overlays for root elements
302
302
  this.getRootElements().forEach(this._createOverlaysForRootElement, this);
@@ -827,7 +827,7 @@ sap.ui.define([
827
827
  } else if (oElement.bIsDestroyed) {
828
828
  sReason = "Cannot create overlay — the element is already destroyed.";
829
829
  } else if (oElement instanceof ManagedObject && !ElementUtil.isElementInTemplate(oElement)) {
830
- sReason = "Element is in a bound aggregation, but not found in the binding template. Skipping overlay creation for element with id='" + oElement.getId() + "'. Please report to CA-UI5-FL-RTA component.";
830
+ sReason = `Element is in a bound aggregation, but not found in the binding template. Skipping overlay creation for element with id='${oElement.getId()}'. Please report to CA-UI5-FL-RTA component.`;
831
831
  } else {
832
832
  sReason = Util.printf(
833
833
  "Cannot create overlay without a valid element. Expected a descendant of sap.ui.core.Element or sap.ui.core.Component, but {0} was given",
@@ -1241,9 +1241,9 @@ sap.ui.define([
1241
1241
  delete oParams.target;
1242
1242
 
1243
1243
  if (this.getStatus() === DesignTimeStatus.SYNCING) {
1244
- this.attachEventOnce("synced", oParams, function() {
1244
+ this.attachEventOnce("synced", oParams, function(...aArgs) {
1245
1245
  if (!oElementOverlay.bIsDestroyed) {
1246
- this.fireElementPropertyChanged(arguments[1]);
1246
+ this.fireElementPropertyChanged(aArgs[1]);
1247
1247
  }
1248
1248
  }, this);
1249
1249
  } else {
@@ -1264,9 +1264,9 @@ sap.ui.define([
1264
1264
  var oElementOverlay = oEvent.getSource();
1265
1265
  oParams.id = oElementOverlay.getId();
1266
1266
  if (this.getStatus() === DesignTimeStatus.SYNCING) {
1267
- this.attachEventOnce("synced", oParams, function() {
1267
+ this.attachEventOnce("synced", oParams, function(...aArgs) {
1268
1268
  if (!oElementOverlay.bIsDestroyed) {
1269
- this.fireElementOverlayEditableChanged(arguments[1]);
1269
+ this.fireElementOverlayEditableChanged(aArgs[1]);
1270
1270
  }
1271
1271
  }, this);
1272
1272
  } else {
@@ -46,13 +46,12 @@ function(
46
46
  * @extends sap.ui.base.ManagedObject
47
47
  *
48
48
  * @author SAP SE
49
- * @version 1.117.0
49
+ * @version 1.118.0
50
50
  *
51
51
  * @constructor
52
52
  * @private
53
53
  * @since 1.30
54
54
  * @alias sap.ui.dt.DesignTimeMetadata
55
- * @experimental Since 1.30. This class is experimental and provides only limited functionality. Also the API might be changed in future.
56
55
  */
57
56
  var DesignTimeMetadata = ManagedObject.extend("sap.ui.dt.DesignTimeMetadata", /** @lends sap.ui.dt.DesignTimeMetadata.prototype */ {
58
57
  metadata: {
@@ -133,7 +132,8 @@ function(
133
132
  * @return {jQuery} Returns associated DOM references wrapped by jQuery object
134
133
  * @public
135
134
  */
136
- DesignTimeMetadata.prototype.getAssociatedDomRef = function(oElement, vDomRef, sAggregationName) {
135
+ DesignTimeMetadata.prototype.getAssociatedDomRef = function(...aArgs) {
136
+ const [oElement, vDomRef, sAggregationName] = aArgs;
137
137
  if (oElement) {
138
138
  var oElementDomRef = ElementUtil.getDomRef(oElement);
139
139
  var aArguments = [];
@@ -144,7 +144,7 @@ function(
144
144
 
145
145
  if (typeof (vDomRef) === "function") {
146
146
  try {
147
- var vRes = vDomRef.apply(null, aArguments);
147
+ var vRes = vDomRef(...aArgs);
148
148
  return vRes && jQuery(vRes);
149
149
  } catch (error) {
150
150
  return undefined;
@@ -263,7 +263,7 @@ function(
263
263
  };
264
264
 
265
265
  DesignTimeMetadata.prototype._getTextFromLibrary = function(sLibraryName, sKey, aArgs) {
266
- var oLibResourceBundle = sap.ui.getCore().getLibraryResourceBundle(sLibraryName + ".designtime");
266
+ var oLibResourceBundle = sap.ui.getCore().getLibraryResourceBundle(`${sLibraryName}.designtime`);
267
267
  if (oLibResourceBundle && oLibResourceBundle.hasText(sKey)) {
268
268
  return oLibResourceBundle.getText(sKey, aArgs);
269
269
  }
@@ -282,10 +282,10 @@ function(
282
282
  * @return {string|undefined} Returns the label calculated from getLabel() in designtime metadata
283
283
  * @public
284
284
  */
285
- DesignTimeMetadata.prototype.getLabel = function() {
285
+ DesignTimeMetadata.prototype.getLabel = function(...aArgs) {
286
286
  var vLabel = this.getData().getLabel;
287
287
  return typeof vLabel === "function"
288
- ? vLabel.apply(this, arguments)
288
+ ? vLabel.apply(this, aArgs)
289
289
  : undefined;
290
290
  };
291
291
 
@@ -27,13 +27,12 @@ sap.ui.define([
27
27
  * @extends sap.ui.dt.DesignTimeMetadata
28
28
  *
29
29
  * @author SAP SE
30
- * @version 1.117.0
30
+ * @version 1.118.0
31
31
  *
32
32
  * @constructor
33
33
  * @private
34
34
  * @since 1.30
35
35
  * @alias sap.ui.dt.ElementDesignTimeMetadata
36
- * @experimental Since 1.30. This class is experimental and provides only limited functionality. Also the API might be changed in future.
37
36
  */
38
37
  var ElementDesignTimeMetadata = DesignTimeMetadata.extend("sap.ui.dt.ElementDesignTimeMetadata", /** @lends sap.ui.dt.ElementDesignTimeMetadata.prototype */ {
39
38
  metadata: {
@@ -49,8 +48,8 @@ sap.ui.define([
49
48
  * @return {Object} default data
50
49
  * @override
51
50
  */
52
- ElementDesignTimeMetadata.prototype.getDefaultData = function() {
53
- var oDefaultData = DesignTimeMetadata.prototype.getDefaultData.apply(this, arguments);
51
+ ElementDesignTimeMetadata.prototype.getDefaultData = function(...aArgs) {
52
+ var oDefaultData = DesignTimeMetadata.prototype.getDefaultData.apply(this, aArgs);
54
53
 
55
54
  oDefaultData.aggregations = {
56
55
  layout: {
@@ -157,7 +156,7 @@ sap.ui.define([
157
156
  if (aArgs) {
158
157
  aActionParameters = aActionParameters.concat(aArgs);
159
158
  }
160
- vAction = vAction.apply(null, aActionParameters);
159
+ vAction = vAction(...aActionParameters);
161
160
  }
162
161
  if (typeof (vAction) === "string") {
163
162
  vAction = { changeType: vAction };
@@ -226,8 +225,8 @@ sap.ui.define([
226
225
 
227
226
  ElementDesignTimeMetadata.prototype.getToolHooks = function() {
228
227
  return this.getData().tool || {
229
- start: function() {},
230
- stop: function() {}
228
+ start() {},
229
+ stop() {}
231
230
  };
232
231
  };
233
232
 
@@ -279,8 +278,9 @@ sap.ui.define([
279
278
  * @return {string|undefined} Returns the label as string or undefined
280
279
  * @public
281
280
  */
282
- ElementDesignTimeMetadata.prototype.getLabel = function(oElement) {
283
- return DesignTimeMetadata.prototype.getLabel.apply(this, arguments) || ElementUtil.getLabelForElement(oElement);
281
+ ElementDesignTimeMetadata.prototype.getLabel = function(...aArgs) {
282
+ const [oElement] = aArgs;
283
+ return DesignTimeMetadata.prototype.getLabel.apply(this, aArgs) || ElementUtil.getLabelForElement(oElement);
284
284
  };
285
285
 
286
286
  /**
@@ -57,13 +57,12 @@ sap.ui.define([
57
57
  * @extends sap.ui.dt.Overlay
58
58
  *
59
59
  * @author SAP SE
60
- * @version 1.117.0
60
+ * @version 1.118.0
61
61
  *
62
62
  * @constructor
63
63
  * @private
64
64
  * @since 1.30
65
65
  * @alias sap.ui.dt.ElementOverlay
66
- * @experimental Since 1.30. This class is experimental and provides only limited functionality. Also the API might be changed in future.
67
66
  */
68
67
  var ElementOverlay = Overlay.extend("sap.ui.dt.ElementOverlay", {
69
68
  metadata: {
@@ -190,9 +189,10 @@ sap.ui.define([
190
189
  }
191
190
  }
192
191
  },
193
- constructor: function() {
192
+ // eslint-disable-next-line object-shorthand
193
+ constructor: function(...aArgs) {
194
194
  this._aMetadataEnhancers = [];
195
- Overlay.apply(this, arguments);
195
+ Overlay.apply(this, aArgs);
196
196
  }
197
197
  });
198
198
 
@@ -324,10 +324,10 @@ sap.ui.define([
324
324
  }
325
325
  };
326
326
 
327
- ElementOverlay.prototype._getAttributes = function() {
327
+ ElementOverlay.prototype._getAttributes = function(...aArgs) {
328
328
  return merge(
329
329
  {},
330
- Overlay.prototype._getAttributes.apply(this, arguments),
330
+ Overlay.prototype._getAttributes.apply(this, aArgs),
331
331
  {
332
332
  "data-sap-ui-dt-for": this.getElement().getId(),
333
333
  draggable: this.getMovable()
@@ -335,16 +335,16 @@ sap.ui.define([
335
335
  );
336
336
  };
337
337
 
338
- ElementOverlay.prototype.render = function() {
338
+ ElementOverlay.prototype.render = function(...aArgs) {
339
339
  this.addStyleClass("sapUiDtElementOverlay");
340
- return Overlay.prototype.render.apply(this, arguments);
340
+ return Overlay.prototype.render.apply(this, aArgs);
341
341
  };
342
342
 
343
343
  /**
344
344
  * Called when the ElementOverlay is destroyed
345
345
  * @protected
346
346
  */
347
- ElementOverlay.prototype.exit = function() {
347
+ ElementOverlay.prototype.exit = function(...aArgs) {
348
348
  this._unsubscribeFromMutationObserver();
349
349
  this._destroyControlObserver();
350
350
 
@@ -352,7 +352,7 @@ sap.ui.define([
352
352
  window.cancelAnimationFrame(this._iApplyStylesRequest);
353
353
  }
354
354
 
355
- Overlay.prototype.exit.apply(this, arguments);
355
+ Overlay.prototype.exit.apply(this, aArgs);
356
356
  };
357
357
 
358
358
  ElementOverlay.prototype._loadDesignTimeMetadata = function() {
@@ -387,13 +387,17 @@ sap.ui.define([
387
387
  /**
388
388
  * @override
389
389
  */
390
- ElementOverlay.prototype._setPosition = function($Target, oGeometry, $Parent, bForceScrollbarSync) {
390
+ ElementOverlay.prototype._setPosition = function(...aArgs) {
391
+ const [, , , bForceScrollbarSync] = aArgs;
391
392
  // Apply Overlay position first, then extra logic based on this new position
392
- Overlay.prototype._setPosition.apply(this, arguments);
393
+ Overlay.prototype._setPosition.apply(this, aArgs);
393
394
 
394
395
  this.getScrollContainers().forEach(function(mScrollContainer, iIndex) {
395
396
  // TODO: write Unit test for the case when getAssociatedDomRef() returns undefined (domRef func returns undefined)
396
- var $ScrollContainerDomRef = this.getDesignTimeMetadata().getAssociatedDomRef(this.getElement(), mScrollContainer.domRef) || jQuery();
397
+ var $ScrollContainerDomRef = this.getDesignTimeMetadata().getAssociatedDomRef(
398
+ this.getElement(),
399
+ mScrollContainer.domRef
400
+ ) || jQuery();
397
401
  var $ScrollContainerOverlayDomRef = this.getScrollContainerById(iIndex);
398
402
 
399
403
  if ($ScrollContainerDomRef.length) {
@@ -410,8 +414,8 @@ sap.ui.define([
410
414
  }, this);
411
415
  };
412
416
 
413
- ElementOverlay.prototype._applySizes = function() {
414
- return Overlay.prototype._applySizes.apply(this, arguments)
417
+ ElementOverlay.prototype._applySizes = function(...aArgs) {
418
+ return Overlay.prototype._applySizes.apply(this, aArgs)
415
419
  .then(function() {
416
420
  this._sortChildren(this.getChildrenDomRef());
417
421
  if (!this.bIsDestroyed) {
@@ -594,8 +598,8 @@ sap.ui.define([
594
598
  * @return {jQuery[]} - returns array of children DOM Nodes each wrapped into jQuery object.
595
599
  * @private
596
600
  */
597
- ElementOverlay.prototype._renderChildren = function() {
598
- var a$Children = Overlay.prototype._renderChildren.apply(this, arguments);
601
+ ElementOverlay.prototype._renderChildren = function(...aArgs) {
602
+ var a$Children = Overlay.prototype._renderChildren.apply(this, aArgs);
599
603
 
600
604
  this.getScrollContainers().forEach(function(mScrollContainer, iIndex) {
601
605
  var $ScrollContainer = jQuery("<div></div>", {
@@ -628,7 +632,7 @@ sap.ui.define([
628
632
  * @return {jQuery} - returns DOM Node of scroll container by its index
629
633
  */
630
634
  ElementOverlay.prototype.getScrollContainerById = function(iIndex) {
631
- return jQuery(this.getChildrenDomRef()).find(">." + S_SCROLLCONTAINER_CLASSNAME + '[data-sap-ui-dt-scrollcontainerindex="' + iIndex + '"]');
635
+ return jQuery(this.getChildrenDomRef()).find(`>.${S_SCROLLCONTAINER_CLASSNAME}[data-sap-ui-dt-scrollcontainerindex="${iIndex}"]`);
632
636
  };
633
637
 
634
638
  /**
@@ -640,9 +644,7 @@ sap.ui.define([
640
644
  var oDesignTimeMetadata = this.getDesignTimeMetadata();
641
645
  var vDomRef = oDesignTimeMetadata.getDomRef();
642
646
  var oDomRef = oDesignTimeMetadata.getAssociatedDomRef(this.getElement(), vDomRef);
643
- if (!oDomRef) {
644
- oDomRef = ElementUtil.getDomRef(this.getElement());
645
- }
647
+ oDomRef ||= ElementUtil.getDomRef(this.getElement());
646
648
 
647
649
  if (oDomRef) {
648
650
  return jQuery(oDomRef);
@@ -801,12 +803,13 @@ sap.ui.define([
801
803
  * and a new child is added to that aggregation. We then render the aggregation here.
802
804
  * @param {sap.ui.dt.AggregationOverlay} oAggregationOverlay - The aggregation overlay where the child is being added.
803
805
  */
804
- ElementOverlay.prototype.addChild = function(oAggregationOverlay) {
806
+ ElementOverlay.prototype.addChild = function(...aArgs) {
807
+ const [oAggregationOverlay] = aArgs;
805
808
  // Since we can't check whether the listener was attached before or not, we re-attach it to avoid multiple listeners
806
809
  oAggregationOverlay.detachChildAdded(this._onChildAdded, this);
807
810
  oAggregationOverlay.attachChildAdded(this._onChildAdded, this);
808
811
 
809
- Overlay.prototype.addChild.apply(this, arguments);
812
+ Overlay.prototype.addChild.apply(this, aArgs);
810
813
  };
811
814
 
812
815
  /**
@@ -864,7 +867,7 @@ sap.ui.define([
864
867
  * @public
865
868
  */
866
869
  ElementOverlay.prototype.getAggregationOverlay = function(sAggregationName, sAggregationType) {
867
- var sGetterFunction = "get" + (sAggregationType || "Children");
870
+ var sGetterFunction = `get${sAggregationType || "Children"}`;
868
871
  return this[sGetterFunction]().filter(function(oAggregationOverlay) {
869
872
  return oAggregationOverlay.getAggregationName() === sAggregationName;
870
873
  }).pop();
@@ -984,9 +987,9 @@ sap.ui.define([
984
987
  return bVisible;
985
988
  };
986
989
 
987
- ElementOverlay.prototype.isVisible = function() {
990
+ ElementOverlay.prototype.isVisible = function(...aArgs) {
988
991
  return (
989
- Overlay.prototype.isVisible.apply(this, arguments)
992
+ Overlay.prototype.isVisible.apply(this, aArgs)
990
993
  && this.isElementVisible()
991
994
  );
992
995
  };
@@ -6,21 +6,21 @@
6
6
 
7
7
  // Provides object sap.ui.dt.ElementUtil.
8
8
  sap.ui.define([
9
+ "sap/base/util/isPlainObject",
9
10
  "sap/ui/base/Object",
10
- "sap/ui/dt/Util",
11
- "sap/ui/dt/DOMUtil",
12
- "sap/ui/core/Element",
13
11
  "sap/ui/core/Component",
14
- "sap/base/util/isPlainObject",
15
- "sap/ui/core/UIArea"
12
+ "sap/ui/core/Element",
13
+ "sap/ui/core/UIArea",
14
+ "sap/ui/dt/DOMUtil",
15
+ "sap/ui/dt/Util"
16
16
  ], function(
17
+ isPlainObject,
17
18
  BaseObject,
18
- Util,
19
- DOMUtil,
20
- Element,
21
19
  Component,
22
- isPlainObject,
23
- UIArea
20
+ Element,
21
+ UIArea,
22
+ DOMUtil,
23
+ Util
24
24
  ) {
25
25
  "use strict";
26
26
 
@@ -29,13 +29,11 @@ sap.ui.define([
29
29
  *
30
30
  * @namespace
31
31
  * @author SAP SE
32
- * @version 1.117.0
32
+ * @version 1.118.0
33
33
  *
34
34
  * @private
35
35
  * @since 1.30
36
36
  * @alias sap.ui.dt.ElementUtil
37
- * @experimental Since 1.30. This class is experimental and provides only limited functionality. Also the API
38
- * might be changed in future.
39
37
  */
40
38
 
41
39
  var ElementUtil = {};
@@ -144,8 +142,8 @@ sap.ui.define([
144
142
 
145
143
  // altType getter returns not element (TODO: clarify if getAggregationNameControl getter is a convention)
146
144
  if (oAggregationMetadata.altTypes && oAggregationMetadata.altTypes.length
147
- && oElement[oAggregationMetadata._sGetter + "Control"]) {
148
- sGetter = oAggregationMetadata._sGetter + "Control";
145
+ && oElement[`${oAggregationMetadata._sGetter}Control`]) {
146
+ sGetter = `${oAggregationMetadata._sGetter}Control`;
149
147
  }
150
148
 
151
149
  return {
@@ -465,7 +463,7 @@ sap.ui.define([
465
463
 
466
464
  // If the binding is found on an API parent (with a forwarded aggregation),
467
465
  // the templateId is directly retrieved from it (the stack only has the element itself)
468
- var aAPIParentInfos = oElement.aAPIParentInfos;
466
+ var {aAPIParentInfos} = oElement;
469
467
  if (aAPIParentInfos && aAPIParentInfos.length > 0) {
470
468
  bBindingFound = aAPIParentInfos.some(function(mParentInfo) {
471
469
  oParent = mParentInfo.parent;