@sap-ux/preview-middleware 0.17.23 → 0.17.25

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.
@@ -89,7 +89,13 @@ sap.ui.define([
89
89
  for (const selectedOverlayControl of selectedOverlayControls) {
90
90
  selectedOverlayControl.setSelected(false);
91
91
  }
92
- if (!controlOverlay?.getDomRef()) {
92
+ const controlRef = controlOverlay?.getDomRef?.();
93
+ controlRef?.scrollIntoView({
94
+ behavior: 'smooth',
95
+ block: 'center',
96
+ inline: 'nearest'
97
+ });
98
+ if (!controlRef) {
93
99
  controlOverlay = OverlayUtil.getClosestOverlayFor(control);
94
100
  }
95
101
  if (controlOverlay?.isSelectable()) {
@@ -136,7 +136,9 @@ export class SelectionService implements Service {
136
136
  selectedOverlayControl.setSelected(false); //deselect previously selected control
137
137
  }
138
138
 
139
- if (!controlOverlay?.getDomRef()) {
139
+ const controlRef = controlOverlay?.getDomRef?.();
140
+ controlRef?.scrollIntoView({ behavior: 'smooth', block: 'center', inline: 'nearest' });
141
+ if (!controlRef) {
140
142
  //look for closest control in order to highlight in UI the (without firing the selection event)
141
143
  controlOverlay = OverlayUtil.getClosestOverlayFor(control);
142
144
  }
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "bugs": {
10
10
  "url": "https://github.com/SAP/open-ux-tools/issues?q=is%3Aopen+is%3Aissue+label%3Abug+label%3Apreview-middleware"
11
11
  },
12
- "version": "0.17.23",
12
+ "version": "0.17.25",
13
13
  "license": "Apache-2.0",
14
14
  "author": "@SAP/ux-tools-team",
15
15
  "main": "dist/index.js",
@@ -26,10 +26,10 @@
26
26
  "mem-fs": "2.1.0",
27
27
  "mem-fs-editor": "9.4.0",
28
28
  "@sap-ux/logger": "0.6.0",
29
- "@sap-ux/btp-utils": "1.0.1",
30
- "@sap-ux/adp-tooling": "0.12.125",
31
29
  "@sap-ux/feature-toggle": "0.2.3",
32
- "@sap-ux/control-property-editor-sources": "npm:@sap-ux/control-property-editor@0.5.35",
30
+ "@sap-ux/adp-tooling": "0.12.126",
31
+ "@sap-ux/btp-utils": "1.0.1",
32
+ "@sap-ux/control-property-editor-sources": "npm:@sap-ux/control-property-editor@0.5.36",
33
33
  "@sap-ux/project-access": "1.29.5"
34
34
  },
35
35
  "devDependencies": {
@@ -42,13 +42,13 @@
42
42
  "copyfiles": "2.4.1",
43
43
  "@types/mem-fs": "1.1.2",
44
44
  "@types/mem-fs-editor": "7.0.1",
45
- "express": "4.21.1",
45
+ "express": "4.21.2",
46
46
  "npm-run-all2": "6.2.0",
47
47
  "nock": "13.4.0",
48
48
  "supertest": "6.3.3",
49
49
  "@sap-ux-private/playwright": "0.1.0",
50
50
  "dotenv": "16.3.1",
51
- "@private/preview-middleware-client": "npm:@sap-ux-private/preview-middleware-client@0.11.58",
51
+ "@private/preview-middleware-client": "npm:@sap-ux-private/preview-middleware-client@0.11.59",
52
52
  "@sap-ux/axios-extension": "1.18.5",
53
53
  "@sap-ux/store": "1.0.0",
54
54
  "@sap-ux/ui5-info": "0.8.3",