@sapui5/sap.ui.vbm 1.135.0 → 1.138.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sapui5/sap.ui.vbm",
3
- "version": "1.135.0",
3
+ "version": "1.138.0",
4
4
  "description": "SAPUI5 Library sap.ui.vbm",
5
5
  "homepage": "https://sap.github.io/ui5-tooling/pages/SAPUI5/",
6
6
  "author": "SAP SE (https://www.sap.com)",
@@ -3,7 +3,7 @@
3
3
  <name>sap.ui.vbm</name>
4
4
  <vendor>SAP SE</vendor>
5
5
  <copyright>SAP UI development toolkit for HTML5 (SAPUI5) (c) Copyright 2009-2012 SAP AG. All rights reserved</copyright>
6
- <version>1.135.0</version>
6
+ <version>1.138.0</version>
7
7
 
8
8
  <documentation>SAP UI library: sap.ui.vbm</documentation>
9
9
 
@@ -12,7 +12,7 @@
12
12
  <libraryName>sap.ui.core</libraryName>
13
13
  </dependency>
14
14
  <dependency>
15
- <libraryName>sap.ui.commons</libraryName>
15
+ <libraryName>sap.m</libraryName>
16
16
  <lazy>true</lazy>
17
17
  </dependency>
18
18
  <dependency>
@@ -24,7 +24,7 @@ sap.ui.define([
24
24
  * @param {string} [sId] id for the new control, generated automatically if no id is given
25
25
  * @param {object} [mSettings] initial settings for the new object
26
26
  * @author SAP SE
27
- * @version 1.135.0
27
+ * @version 1.138.0
28
28
  * @extends sap.ui.core.Element
29
29
  * @constructor
30
30
  * @public
@@ -274,16 +274,16 @@ sap.ui.define([
274
274
  for (const MapProvider in MapProviders) {
275
275
  if (MapProviders.hasOwnProperty(MapProvider)) {
276
276
  let Provider = MapProviders[MapProvider];
277
- if (Provider.name == currRefMap && Provider.type == "vector") {
277
+ if (Provider.name == currRefMap && Provider.type == "V") {
278
278
  return true;
279
- } else if (Provider.name == currRefMap && (Provider.type == "raster" || Provider.type == "")) {
279
+ } else if (Provider.name == currRefMap && (Provider.type == "")) {
280
280
  return false;
281
281
  }
282
282
  }
283
283
  }
284
- } else if (MapProviders.name == currRefMap && MapProviders.type == "vector") {
284
+ } else if (MapProviders.name == currRefMap && MapProviders.type == "V") {
285
285
  return true;
286
- } else if (MapProviders.name == currRefMap && (MapProviders.type == "raster" || MapProviders.type == "")) {
286
+ } else if (MapProviders.name == currRefMap && (MapProviders.type == "")) {
287
287
  return false;
288
288
  }
289
289
  }
@@ -291,7 +291,7 @@ sap.ui.define([
291
291
  var mapLayerStack = obj?.SAPVB?.Scenes?.Merge?.SceneGeo?.refMapLayerStack
292
292
  if (mapLayerStack) {
293
293
  const provider = this._mapConfiguration.MapProvider.find(provider => provider.name === mapLayerStack);
294
- return provider.type === "vector" ? true : false;
294
+ return provider.type === "V" ? true : false;
295
295
  }
296
296
  }
297
297
  }
@@ -47,7 +47,7 @@ sap.ui.define([
47
47
  * @param {string} [sId] id for the new control, generated automatically if no id is given
48
48
  * @param {object} [mSettings] initial settings for the new object
49
49
  * @author SAP SE
50
- * @version 1.135.0
50
+ * @version 1.138.0
51
51
  * @extends sap.ui.core.Element
52
52
  * @constructor
53
53
  * @public
@@ -106,13 +106,23 @@ sap.ui.define([
106
106
  // on abap systems the GeoJSON is requested from this handler................//
107
107
  AnalyticMap.DefaultABAPGeoJSONURL = "/sap/bc/vbi/geojson/L0.json";
108
108
  AnalyticMap.DefaultGeoJSONURL = "media/analyticmap/L0.json";
109
- AnalyticMap.DefaultRegionColor = (Parameters && Parameters.get("_sap_ui_vbm_shared_ChoroplethRegionBG")) ? Parameters.get("_sap_ui_vbm_shared_ChoroplethRegionBG") : "rgb(213,218,221)";
110
- AnalyticMap.DefaultRegionColorBorder = (Parameters && Parameters.get("_sap_ui_vbm_shared_ChoroplethRegionBorder")) ? Parameters.get("_sap_ui_vbm_shared_ChoroplethRegionBorder") : "rgb(255,255,255)";
111
109
  AnalyticMap.DefaultRegionSelectColor = "RHLSA(0;1;1;1)"; // no change!
112
110
  AnalyticMap.DefaultHotDeltaColor = "RHLSA(0;1;1;1.0)"; // default regions should not be hot
113
- AnalyticMap.AltBorderColor = (Parameters && Parameters.get("_sap_ui_vbm_shared_ChartDataPointBorderHoverSelectedColor")) ? Parameters.get("_sap_ui_vbm_shared_ChartDataPointBorderHoverSelectedColor") : "#676767";
114
111
  // reduce opacity to 60%
115
- var nonSelectOpacity = (Parameters && Parameters.get("_sap_ui_vbm_shared_ChartDataPointNotSelectedBackgroundOpacity") ? Parameters.get("_sap_ui_vbm_shared_ChartDataPointNotSelectedBackgroundOpacity") : "0.6");
112
+ var nonSelectOpacity = "0.6";
113
+ let values = Parameters.get({
114
+ name: [
115
+ "_sap_ui_vbm_shared_ChoroplethRegionBG",
116
+ "_sap_ui_vbm_shared_ChoroplethRegionBorder",
117
+ "_sap_ui_vbm_shared_ChartDataPointBorderHoverSelectedColor",
118
+ "_sap_ui_vbm_shared_ChartDataPointNotSelectedBackgroundOpacity"
119
+ ] });
120
+
121
+ AnalyticMap.DefaultRegionColor = values?values["_sap_ui_vbm_shared_ChoroplethRegionBG"] : "rgb(213,218,221)";
122
+ AnalyticMap.DefaultRegionColorBorder = values?values["_sap_ui_vbm_shared_ChoroplethRegionBorder"] : "rgb(255,255,255)";
123
+ AnalyticMap.AltBorderColor = values?values["_sap_ui_vbm_shared_ChartDataPointBorderHoverSelectedColor"] : "#676767";
124
+ nonSelectOpacity = values?values["_sap_ui_vbm_shared_ChartDataPointNotSelectedBackgroundOpacity"] : "0.6";
125
+
116
126
  AnalyticMap.DefaultRegionNonSelectColor = "RHLSA(0;1;1;" + nonSelectOpacity + ")";
117
127
 
118
128
  // ...........................................................................//
@@ -976,13 +986,14 @@ sap.ui.define([
976
986
  AnalyticMap.prototype.applyTheming = function(aRegions) {
977
987
  if (Parameters) { // only if theming parameters are available
978
988
  var sColC = AnalyticMap.DefaultRegionColor;
979
- if (Parameters.get("_sap_ui_vbm_shared_ChoroplethRegionBG") != undefined) {
980
- sColC = AnalyticMap.DefaultRegionColor = Parameters.get("_sap_ui_vbm_shared_ChoroplethRegionBG");
981
- }
982
989
  var sColCB = AnalyticMap.DefaultRegionColorBorder;
983
- if (Parameters.get("_sap_ui_vbm_shared_ChoroplethRegionBorder") != undefined) {
984
- sColCB = AnalyticMap.DefaultRegionColorBorder = Parameters.get("_sap_ui_vbm_shared_ChoroplethRegionBorder");
985
- }
990
+ let oColValues = Parameters.get({
991
+ name: [
992
+ "_sap_ui_vbm_shared_ChoroplethRegionBG",
993
+ "_sap_ui_vbm_shared_ChoroplethRegionBorder"
994
+ ] });
995
+ sColC = AnalyticMap.DefaultRegionColor = oColValues? oColValues["_sap_ui_vbm_shared_ChoroplethRegionBG"] : AnalyticMap.DefaultRegionColor;
996
+ sColCB = AnalyticMap.DefaultRegionColorBorder = oColValues? oColValues["_sap_ui_vbm_shared_ChoroplethRegionBorder"] : AnalyticMap.DefaultRegionColorBorder;
986
997
  if (this.getPlugin()) { // plug-in mode -> make sure color format matches plugin requirements
987
998
  sColC = window.VBI.Utilities.String2VBColor(sColC);
988
999
  sColCB = window.VBI.Utilities.String2VBColor(sColCB);
@@ -219,7 +219,10 @@ sap.ui.define([
219
219
  // do something for initialization...
220
220
  this.mVizObjMap = {};
221
221
  this.mContObjMap = {};
222
- var sDefaultFontFamily = Parameters.get("sapUiFontFamily");
222
+ var sDefaultFontFamily = Parameters.get({
223
+ name: "sapUiFontFamily"
224
+ });
225
+
223
226
  this.setProperty("textSettings", {
224
227
  textcolor: "#000000",
225
228
  textfont: (sDefaultFontFamily) ? sDefaultFontFamily : "Arial, Helvetica, sans-serif",
@@ -86,7 +86,13 @@ sap.ui.define([
86
86
  var ariaRoleDescription = sap.ui.core.AccessibleRole.Description;
87
87
 
88
88
  oRm.openStart("div", Id1);
89
- oRm.class(classOuter);
89
+ if (typeof classOuter === "string") {
90
+ var cOuter = classOuter.split(" ");
91
+
92
+ for (var iCOuter = 0; iCOuter < cOuter.length; iCOuter++) {
93
+ oRm.class(cOuter[iCOuter]);
94
+ }
95
+ }
90
96
 
91
97
  if (type == sap.ui.vbm.SemanticType.None && col) {
92
98
  oRm.style("border-color", col)
@@ -95,7 +101,13 @@ sap.ui.define([
95
101
  oRm.openEnd();
96
102
 
97
103
  oRm.openStart("div", Id2);
98
- oRm.class(classInner);
104
+ if (typeof classInner === "string") {
105
+ var cInner = classInner.split(" ");
106
+
107
+ for (var iCInner = 0; iCInner < cInner.length; iCInner++) {
108
+ oRm.class(cInner[iCInner]);
109
+ }
110
+ }
99
111
  if (type == sap.ui.vbm.SemanticType.None && col) {
100
112
  oRm.style("border-color", col)
101
113
  }
@@ -108,7 +120,13 @@ sap.ui.define([
108
120
  if (icon) {
109
121
  var IdIcon = oControl.getId() + "-" + "icon";
110
122
  oRm.openStart("span", IdIcon);
111
- oRm.class(classIcon);
123
+ if (typeof classIcon === "string") {
124
+ var cIcon = classIcon.split(" ");
125
+
126
+ for (var iCIcon = 0; iCIcon < cIcon.length; iCIcon++) {
127
+ oRm.class(cIcon[iCIcon]);
128
+ }
129
+ }
112
130
  if (type == sap.ui.vbm.SemanticType.None && col) {
113
131
  oRm.style("color", col)
114
132
  }
@@ -122,7 +140,13 @@ sap.ui.define([
122
140
  if ((oControl.getText())) {
123
141
  var IdTextbox = oControl.getId() + "-" + "textbox";
124
142
  oRm.openStart("div", IdTextbox);
125
- oRm.class(classTextbox);
143
+ if (typeof classTextbox === "string") {
144
+ var cTextBox = classTextbox.split(" ");
145
+
146
+ for (var iCTBox = 0; iCTBox < cTextBox.length; iCTBox++) {
147
+ oRm.class(cTextBox[iCTBox]);
148
+ }
149
+ }
126
150
  if (type == sap.ui.vbm.SemanticType.None && col) {
127
151
  oRm.style("border-color", col);
128
152
  }
@@ -299,7 +299,7 @@ sap.ui.define([
299
299
  // segmentedButton for for multiple content entries
300
300
  this._oContentSegmentedButton = new SegmentedButton({
301
301
  layoutData: oLayoutData.clone(),
302
- select: this._onContentButtonSelect.bind(this)
302
+ selectionChange: this._onContentButtonSelect.bind(this)
303
303
  });
304
304
 
305
305
  // Left side...
@@ -628,12 +628,12 @@ sap.ui.define([
628
628
  ContainerBase.prototype._contentChange = function() {
629
629
  var aContent = this.getContent();
630
630
  // remove and destroy all buttons for old content
631
- this._oContentSegmentedButton.removeAllButtons();
631
+ this._oContentSegmentedButton.removeAllItems();
632
632
  this._destroyButtons(this._aContentIcons);
633
633
 
634
634
  this._aContentIcons = [];
635
635
  if (aContent.length === 0) {
636
- this._oContentSegmentedButton.removeAllButtons();
636
+ this._oContentSegmentedButton.removeAllItems();
637
637
  this._setDefaultOnSegmentedButton();
638
638
  this.switchContent(null);
639
639
  }
@@ -660,7 +660,7 @@ sap.ui.define([
660
660
  };
661
661
 
662
662
  ContainerBase.prototype._onContentButtonSelect = function(oEvent) {
663
- var sContentId = oEvent.getParameter("key");
663
+ var sContentId = oEvent.getParameter("item").getKey();
664
664
  this._switchContent(sContentId);
665
665
  };
666
666
 
@@ -465,11 +465,13 @@ sap.ui.define([
465
465
  var oTemp, aResult = [];
466
466
 
467
467
  // Polygones
468
+ var oTempBorder = Parameters.get({
469
+ name: "_sap_ui_vbm_shared_ChartDataPointBorderHoverSelectedColor" });
468
470
  oTemp = {
469
471
  id: this.getId() + "_Polys",
470
472
  type: "{00100000-2012-0004-B001-F311DE491C77}", // Area
471
473
  hotDeltaColor: "RHLSA(0;1;1;1.5)", // increase opacity by 50%
472
- altBorderDeltaColor: (Parameters) ? Parameters.get("_sap_ui_vbm_shared_ChartDataPointBorderHoverSelectedColor") : "#666"
474
+ altBorderDeltaColor: oTempBorder ? oTempBorder : "#666"
473
475
  };
474
476
  // the data source name is equivalent to the controls id..................//
475
477
  oTemp.datasource = oTemp.id;
@@ -481,11 +483,13 @@ sap.ui.define([
481
483
  aResult.push(oTemp);
482
484
 
483
485
  // Lines
486
+ var oTempBorderLines = Parameters.get({
487
+ name: "_sap_ui_vbm_shared_ChartDataPointBorderHoverSelectedColor" });
484
488
  oTemp = {
485
489
  id: this.getId() + "_Lines",
486
490
  type: "{00100000-2012-0004-B001-C46BD7336A1A}", // Route
487
491
  hotDeltaColor: "RHLSA(0;1;1;1.5)", // increase opacity by 50%
488
- altBorderDeltaColor: (Parameters) ? Parameters.get("_sap_ui_vbm_shared_ChartDataPointBorderHoverSelectedColor") : "#666"
492
+ altBorderDeltaColor: oTempBorderLines ? oTempBorderLines : "#666"
489
493
  };
490
494
  // the data source name is equivalent to the controls id..................//
491
495
  oTemp.datasource = oTemp.id;
@@ -86,7 +86,7 @@ sap.ui.define([
86
86
  * List Panel aggregation
87
87
  */
88
88
  "listPanelStack": {
89
- type: "sap.ui.vk.ListPanelStack",
89
+ type: "sap.ui.vbm.ListPanelStack",
90
90
  multiple: false
91
91
  },
92
92
  /**
@@ -267,7 +267,8 @@ sap.ui.define([
267
267
  this._box = new sap.m.HBox().addStyleClass("mapContainerHboxPopover");
268
268
 
269
269
  this._popover = new sap.m.Popover({
270
- enableScrolling: false,
270
+ horizontalScrolling: false,
271
+ verticalScrolling: false,
271
272
  placement: sap.m.PlacementType.Horizontal,
272
273
  content: this._box,
273
274
  showHeader: false
@@ -17,6 +17,7 @@ sap.ui.define([], function() {
17
17
  Click: "Click",
18
18
  Toggle: "Toggle"
19
19
  };
20
+ // As of 2025-05-23, this enum is not used in managed properties and therefore not registered
20
21
 
21
22
  return MapContainerButtonType;
22
23
 
@@ -190,7 +190,9 @@ sap.ui.define([
190
190
  // set control specific property defaults
191
191
  // explicitly set properties will still be applied later!
192
192
  this.mProperties.contentColor = "#000000";
193
- this.mProperties.contentSize = (Parameters) ? Parameters.get("sapMFontMediumSize") : null;
193
+ var contentSize = Parameters.get({
194
+ name: "sapMFontMediumSize" });
195
+ this.mProperties.contentSize = contentSize ? contentSize : null;
194
196
  };
195
197
 
196
198
  // Implement function defined in VoBase
@@ -23,7 +23,7 @@ sap.ui.define([
23
23
  *
24
24
  * @public
25
25
  * @author SAP SE
26
- * @version 1.135.0
26
+ * @version 1.138.0
27
27
  * @extends sap.ui.core.Control
28
28
  * @alias sap.ui.vbm.Viewport
29
29
  */
@@ -335,10 +335,16 @@ sap.ui.define([
335
335
  // // do something for initialization...
336
336
  // };
337
337
 
338
- VoBase.prototype.DefaultColorBad = (Parameters) ? Parameters.get("_sap_ui_vbm_shared_ChartBad") : "rgb(211, 32, 48)";
339
- VoBase.prototype.DefaultColorCritical = (Parameters) ? Parameters.get("_sap_ui_vbm_shared_ChartCritical") : "rgb(225, 123, 36)";
340
- VoBase.prototype.DefaultColorGood = (Parameters) ? Parameters.get("_sap_ui_vbm_shared_ChartGood") : "rgb(97, 166, 86)";
341
- VoBase.prototype.DefaultColorNeutral = (Parameters) ? Parameters.get("_sap_ui_vbm_shared_ChartNeutral") : "rgb(132, 143, 148)";
338
+ var colorParams = Parameters.get({
339
+ name: ["_sap_ui_vbm_shared_ChartBad",
340
+ "_sap_ui_vbm_shared_ChartCritical",
341
+ "_sap_ui_vbm_shared_ChartGood",
342
+ "_sap_ui_vbm_shared_ChartNeutral"] });
343
+
344
+ VoBase.prototype.DefaultColorBad = colorParams? colorParams["_sap_ui_vbm_shared_ChartBad"] : "rgb(211, 32, 48)";
345
+ VoBase.prototype.DefaultColorCritical = colorParams? colorParams["_sap_ui_vbm_shared_ChartCritical"] : "rgb(225, 123, 36)";
346
+ VoBase.prototype.DefaultColorGood = colorParams? colorParams["_sap_ui_vbm_shared_ChartGood"] : "rgb(97, 166, 86)";
347
+ VoBase.prototype.DefaultColorNeutral = colorParams? colorParams["_sap_ui_vbm_shared_ChartNeutral"] : "rgb(132, 143, 148)";
342
348
 
343
349
  // VO Interface implementation ..............................................//
344
350
 
@@ -22,7 +22,7 @@ sap.ui.define([
22
22
  *
23
23
  * @private
24
24
  * @author SAP SE
25
- * @version 1.135.0
25
+ * @version 1.138.0
26
26
  * @alias sap.ui.vbm.adapter3d.ColladaBounds
27
27
  */
28
28
  var ColladaBounds = BaseObject.extend("sap.ui.vbm.adapter3d.ColladaBounds", /** @lends sap.ui.vbm.adapter3d.ColladaBounds.prototype */ {
@@ -83,7 +83,7 @@ sap.ui.define([
83
83
  *
84
84
  * @private
85
85
  * @author SAP SE
86
- * @version 1.135.0
86
+ * @version 1.138.0
87
87
  * @alias sap.ui.vbm.adapter3d.DragDropHandler
88
88
  */
89
89
  var DragDropHandler = BaseObject.extend("sap.ui.vbm.adapter3d.DragDropHandler", /** @lends sap.ui.vbm.adapter3d.DragDropHandler.prototype */ {
@@ -29,7 +29,7 @@ sap.ui.define([
29
29
  *
30
30
  * @private
31
31
  * @author SAP SE
32
- * @version 1.135.0
32
+ * @version 1.138.0
33
33
  * @alias sap.ui.vbm.adapter3d.ModelHandler
34
34
  */
35
35
  var ModelHandler = BaseObject.extend("sap.ui.vbm.adapter3d.ModelHandler", /** @lends sap.ui.vbm.adapter3d.ModelHandler.prototype */ {
@@ -377,7 +377,7 @@ sap.ui.define([
377
377
  *
378
378
  * @private
379
379
  * @author SAP SE
380
- * @version 1.135.0
380
+ * @version 1.138.0
381
381
  * @alias sap.ui.vbm.adapter3d.ObjectFactory
382
382
  */
383
383
  var ObjectFactory = BaseObject.extend("sap.ui.vbm.adapter3d.ObjectFactory", /** @lends sap.ui.vbm.adapter3d.ObjectFactory.prototype */ {});
@@ -32,7 +32,7 @@ sap.ui.define([
32
32
  *
33
33
  * @private
34
34
  * @author SAP SE
35
- * @version 1.135.0
35
+ * @version 1.138.0
36
36
  * @alias sap.ui.vbm.adapter3d.PolygonHandler
37
37
  */
38
38
  var PolygonHandler = BaseObject.extend("sap.ui.vbm.adapter3d.PolygonHandler", /** @lends sap.ui.vbm.adapter3d.PolygonHandler.prototype */ {
@@ -39,7 +39,7 @@ sap.ui.define([
39
39
  *
40
40
  * @private
41
41
  * @author SAP SE
42
- * @version 1.135.0
42
+ * @version 1.138.0
43
43
  * @alias sap.ui.vbm.adapter3d.RectangleTracker
44
44
  */
45
45
  var RectangleTracker = BaseObject.extend("sap.ui.vbm.adapter3d.RectangleTracker", /** @lends sap.ui.vbm.adapter3d.RectangleTracker.prototype */ {
@@ -114,7 +114,7 @@ sap.ui.define([
114
114
  var ref = this._viewport.getDomRef();
115
115
  if (ref) {
116
116
  this._dom = ref;
117
- this._addListener(ref, "pointerup", this._onPointerCancel);
117
+ this._addListener(ref, "pointerup", this._onPointerUp);
118
118
  this._addListener(ref, "pointerdown", this._onPointerDown);
119
119
  this._addListener(ref, "pointermove", this._onPointerMove);
120
120
  this._addListener(ref, "pointerleave", this._onPointerCancel);
@@ -228,15 +228,20 @@ sap.ui.define([
228
228
 
229
229
  RectangleTracker.prototype._onPointerMove = function (event) {
230
230
  event.preventDefault();
231
-
232
- if (!this._mouseDown) {
233
- this._updatePointer(event, _pointer);
234
- this._handleHover(_pointer);
235
- }
236
-
231
+ //this._updateController(false);
237
232
  if (this._mouseDown) {
238
- this._updateController(false);
233
+ this._cameraControls.enableRotate = false;
239
234
  this.onSelectMove(event);
235
+ this._updatePointer(event, _pointer);
236
+ this._handleHover(_pointer);
237
+ }
238
+ // else if (!this._mouseDown) {
239
+ // this._cameraControls.enableRotate = false;
240
+ // }
241
+ }
242
+ RectangleTracker.prototype._onPointerUp = function (event) {
243
+ this._updateController(true);
244
+ if (!this._mouseDown) {
240
245
  var that = this;
241
246
  event.cursor = event.cursor || this._getXY(event);
242
247
  var rect = this._viewport.getDomRef().getBoundingClientRect();
@@ -311,7 +316,7 @@ sap.ui.define([
311
316
  E: [obj]
312
317
  }]);
313
318
  }
314
-
319
+
315
320
  }
316
321
  });
317
322
 
@@ -324,7 +329,10 @@ sap.ui.define([
324
329
  });
325
330
  }
326
331
  }
327
-
332
+ this._mouseDown = false;
333
+ this._dom.style.cursor = this._hovered ? "pointer" : "auto";
334
+ this._updateController(true);
335
+ this.onSelectOver();
328
336
  };
329
337
 
330
338
  RectangleTracker.prototype._constructPayload = function (dataMap) {
@@ -47,7 +47,7 @@ sap.ui.define([
47
47
  *
48
48
  * @private
49
49
  * @author SAP SE
50
- * @version 1.135.0
50
+ * @version 1.138.0
51
51
  * @alias sap.ui.vbm.adapter3d.SceneBuilder
52
52
  */
53
53
  var SceneBuilder = BaseObject.extend("sap.ui.vbm.adapter3d.SceneBuilder", /** @lends sap.ui.vbm.adapter3d.SceneBuilder.prototype */ {
@@ -56,7 +56,7 @@ sap.ui.define([
56
56
  *
57
57
  * @private
58
58
  * @author SAP SE
59
- * @version 1.135.0
59
+ * @version 1.138.0
60
60
  * @alias sap.ui.vbm.adapter3d.VBIJSONParser
61
61
  */
62
62
  var VBIJSONParser = BaseObject.extend("sap.ui.vbm.adapter3d.VBIJSONParser", /** @lends sap.ui.vbm.adapter3d.VBIJSONParser.prototype */ {
@@ -6,12 +6,12 @@
6
6
  * Initialization Code and shared classes of library sap.ui.vbm.
7
7
  */
8
8
  sap.ui.define([
9
- "sap/ui/core/Core",
9
+ "sap/ui/base/DataType",
10
+ "sap/ui/core/Lib",
10
11
  "sap/m/library",
11
12
  "sap/ui/core/library",
12
- "sap/ui/unified/library",
13
- "sap/ui/core/Lib"
14
- ], function(Core,mlibrary,clibrary,ulibrary,Lib) {
13
+ "sap/ui/unified/library"
14
+ ], function(DataType,Lib,_mlibrary,_clibrary,_ulibrary) {
15
15
  "use strict";
16
16
 
17
17
  /**
@@ -20,7 +20,7 @@ sap.ui.define([
20
20
  * @namespace
21
21
  * @alias sap.ui.vbm
22
22
  * @author SAP SE
23
- * @version 1.135.0
23
+ * @version 1.138.0
24
24
  * @public
25
25
  */
26
26
 
@@ -29,8 +29,9 @@ sap.ui.define([
29
29
 
30
30
  var vbmLibrary = Lib.init({
31
31
  name: "sap.ui.vbm",
32
+ apiVersion: 2,
32
33
  types: [
33
- "sap.ui.vbm.ClusterInfoType", "sap.ui.vbm.SemanticType"
34
+ "sap.ui.vbm.ClusterInfoType", "sap.ui.vbm.SemanticType", "sap.ui.vbm.RouteType"
34
35
  ],
35
36
  controls: [
36
37
  "sap.ui.vbm.AnalyticMap", "sap.ui.vbm.GeoMap", "sap.ui.vbm.VBI", "sap.ui.vbm.Cluster", "sap.ui.vbm.Viewport","sap.ui.vbm.ContainerLegendItem",
@@ -45,7 +46,7 @@ sap.ui.define([
45
46
  "sap.ui.vbm.ClusterBase", "sap.ui.vbm.ClusterTree", "sap.ui.vbm.ClusterGrid", "sap.ui.vbm.ClusterDistance", "sap.ui.vbm.Heatmap",
46
47
  "sap.ui.vbm.HeatPoint", "sap.ui.vbm.ClusterContainer", "sap.ui.vbm.Adapter", "sap.ui.vbm.Adapter3D"
47
48
  ],
48
- version: "1.135.0"
49
+ version: "1.138.0"
49
50
  });
50
51
 
51
52
  sap.ui.loader.config({
@@ -132,6 +133,7 @@ sap.ui.define([
132
133
  Hidden: "Hidden"
133
134
 
134
135
  };
136
+ DataType.registerEnum("sap.ui.vbm.SemanticType", vbmLibrary.SemanticType);
135
137
 
136
138
  /**
137
139
  * Cluster Info Type
@@ -179,6 +181,7 @@ sap.ui.define([
179
181
  Edges: 11
180
182
 
181
183
  };
184
+ // As of 2025-05-23, this enum is not used in managed properties and therefore not registered
182
185
 
183
186
  /**
184
187
  * Route type, determining how line between start and endpoint should be drawn.
@@ -204,6 +207,7 @@ sap.ui.define([
204
207
  Geodesic: "Geodesic"
205
208
 
206
209
  };
210
+ DataType.registerEnum("sap.ui.vbm.RouteType", vbmLibrary.RouteType);
207
211
 
208
212
  vbmLibrary.getResourceBundle = function() {
209
213
  var oResourceBundle = Lib.getResourceBundleFor("sap.ui.vbm")
@@ -38,6 +38,8 @@ sap.ui.define([
38
38
  let spotid = 0;
39
39
  let fixedBounds;
40
40
  var containerID;
41
+ let previousCenter = null;
42
+ let previousZoom = null;
41
43
 
42
44
 
43
45
 
@@ -57,6 +59,12 @@ sap.ui.define([
57
59
  }
58
60
 
59
61
  VBI.MapRenderer.renderMap = () => {
62
+
63
+ if (this.map) {
64
+ previousCenter = this.map.getCenter();
65
+ previousZoom = this.map.getZoom();
66
+ this.map.remove();
67
+ }
60
68
 
61
69
  let geoJSON = VBI.VBITransformer.getTransformedJSON();
62
70
 
@@ -68,10 +76,23 @@ sap.ui.define([
68
76
  document.head.appendChild(styleSheet);
69
77
 
70
78
  const map = VectorUtils.createMap(geoJSON, map_container);
79
+
80
+ if (previousCenter && previousZoom !== null) {
81
+ map.jumpTo({
82
+ center: [previousCenter.lng, previousCenter.lat],
83
+ zoom: previousZoom
84
+
85
+ });
86
+ }
87
+
71
88
  const canvas = map.getCanvasContainer();
72
89
  const rectangularSelection = new RectangularSelection(map);
73
90
  const lassoSelection = new LassoSelection(map);
74
91
  const mapCanvas = map.getCanvas();
92
+ const popupLink = new maplibregl.Popup({
93
+ closeButton: false,
94
+ closeOnClick: false
95
+ });
75
96
  mapCanvas.id = VectorUtils._setcanvasid();
76
97
  // Set `true` to dispatch the event before other functions
77
98
  // call it. This is necessary for disabling the default map
@@ -129,7 +150,11 @@ sap.ui.define([
129
150
  // Create a popup, but don't add it to the map yet.
130
151
  const popup = new maplibregl.Popup({
131
152
  closeButton: false,
132
- closeOnClick: false
153
+ closeOnClick: false,
154
+ offset: {
155
+ 'top': [0, 0],
156
+ 'bottom': [0, -25]
157
+ }
133
158
  });
134
159
  // add markers to map only for Points
135
160
  const pointFeatures = [];
@@ -139,17 +164,18 @@ sap.ui.define([
139
164
  // create a DOM element for the marker (parent div)
140
165
  const el = VectorUtils.createSpotElement(marker);
141
166
  if (marker.properties.Icon) {
167
+ const iconColor = marker.properties.contentColor? marker.properties.contentColor : "#000000";
142
168
  // Create child element for the SAP icon (icon overlay)
143
- const child_el = VectorUtils.createIconElement(marker.properties.Icon);
144
- child_el = '__mapspot' + spotid++;
169
+ const child_el = VectorUtils.createIconElement(marker.properties.Icon, iconColor);
170
+ child_el.id = '__mapspot' + spotid++;
145
171
  // Append the icon inside the marker
146
172
  el.appendChild(child_el);
147
173
  }
148
174
  // add marker to map
149
175
  let spot = new maplibregl.Marker({
150
176
  element: el,
151
- draggable: true
152
- // offset: [0, -25]
177
+ draggable: true,
178
+ offset: [0, -20]
153
179
  }).setLngLat(marker.geometry.coordinates)
154
180
  .on('dragend', onDragEnd)
155
181
  .addTo(map);
@@ -370,7 +396,8 @@ sap.ui.define([
370
396
  if (that.Apressed || that.Rpressed) {
371
397
  el.style.cursor = 'crosshair';
372
398
  } else {
373
- var tooltip = marker.properties.ToolTip.replace(/\n/g, '<br>');
399
+ const tooltipContent = marker.properties.ToolTip.replace(/\n/g, '<br>');
400
+ const tooltip = `<div style="background-color: white; color: black;">${tooltipContent}</div>`;
374
401
  popup.setLngLat(marker.geometry.coordinates).setHTML(tooltip).addTo(map);
375
402
  }
376
403
  }
@@ -566,10 +593,15 @@ sap.ui.define([
566
593
 
567
594
  });
568
595
  // Change mouse cursor when hovering over the line
569
- map.on('mouseenter', 'geojson-source-route', function () {
596
+ map.on('mouseenter', 'geojson-source-route', function (event) {
570
597
  if (!that.Apressed && !that.Rpressed) {
571
598
  map.getCanvas().style.cursor = 'pointer';
572
599
  }
600
+ const coordinates = event.lngLat;
601
+ const description = event.features[0].properties.ToolTip;
602
+ const tooltipContent = description.replace(/\n/g, '<br>');
603
+ const tooltip = `<div style="background-color: white; color: black;">${tooltipContent}</div>`;
604
+ popupLink.setLngLat(coordinates).setHTML(tooltip).addTo(map);
573
605
  });
574
606
 
575
607
  // Revert mouse cursor back when not hovering
@@ -577,6 +609,7 @@ sap.ui.define([
577
609
  if (!that.Apressed && !that.Rpressed) {
578
610
  map.getCanvas().style.cursor = '';
579
611
  }
612
+ popupLink.remove();
580
613
  });
581
614
  map.on('click', 'geojson-source-route', function (e) {
582
615
  //Trigger payload
@@ -12,7 +12,7 @@ sap.ui.define([
12
12
  *
13
13
  * @private
14
14
  * @author SAP SE
15
- * @version 1.135.0
15
+ * @version 1.138.0
16
16
  * @alias sap.ui.vbm.vector.PayloadGenerator
17
17
  */
18
18
  var adapter = {};
@@ -12,7 +12,7 @@ sap.ui.define([
12
12
  *
13
13
  * @private
14
14
  * @author SAP SE
15
- * @version 1.135.0
15
+ * @version 1.138.0
16
16
  * @alias sap.ui.vbm.vector.RectangularSelection
17
17
  */
18
18
 
@@ -95,7 +95,7 @@ sap.ui.define([
95
95
  VBI.mapFlags.scaleVisible = obj.SAPVB.Scenes.Set.SceneGeo.scaleVisible ? JSON.parse(obj.SAPVB.Scenes.Set.SceneGeo.scaleVisible) : true;
96
96
 
97
97
  VBI.mapFlags.navControlVisible = obj.SAPVB.Scenes.Set.SceneGeo.navControlVisible ? JSON.parse(obj.SAPVB.Scenes.Set.SceneGeo.navControlVisible) : true;
98
-
98
+
99
99
  if (obj.SAPVB.Scenes.Set.SceneGeo.NavigationDisablement) {
100
100
  let navigationDisablement = obj.SAPVB.Scenes.Set.SceneGeo.NavigationDisablement;
101
101
  VBI.mapFlags.moveDisable = navigationDisablement.move ? JSON.parse(navigationDisablement.move) : true;
@@ -176,7 +176,7 @@ sap.ui.define([
176
176
  for (const MapProvider in MapProvidersArray) {
177
177
  if (MapProvidersArray.hasOwnProperty(MapProvider)) {
178
178
  let Provider = MapProvidersArray[MapProvider];
179
- if (Provider.name == currRefMap && Provider.type == "vector") {
179
+ if (Provider.name == currRefMap && Provider.type == "V") {
180
180
  mapProvider = {
181
181
  "type": "MapProvider",
182
182
  "provider": Provider.Source[0].url,
@@ -362,8 +362,13 @@ sap.ui.define([
362
362
  // "id" : currRoute['VB:ix'],
363
363
  "id": route_id++,
364
364
  };
365
-
366
- featureCollection.push(route_data);
365
+ let indexNum = featureCollection.findIndex(item => item.properties.Key === route_data.properties.Key)
366
+ if (indexNum !== -1) {
367
+ featureCollection[indexNum] = route_data
368
+ }
369
+ else {
370
+ featureCollection.push(route_data);
371
+ }
367
372
  }
368
373
  }
369
374
  } else {
@@ -416,7 +421,13 @@ sap.ui.define([
416
421
  // "id" : currRoute['VB:ix'],
417
422
  "id": route_id++,
418
423
  };
419
- featureCollection.push(route_data);
424
+ let indexNum = featureCollection.findIndex(item => item.properties.Key === route_data.properties.Key)
425
+ if (indexNum !== -1) {
426
+ featureCollection[indexNum] = route_data
427
+ }
428
+ else {
429
+ featureCollection.push(route_data);
430
+ }
420
431
  }
421
432
  }
422
433
  }
@@ -451,17 +462,20 @@ sap.ui.define([
451
462
  else {
452
463
  let currSpot = spots.E;
453
464
 
454
- for (const index in featureCollection) {
455
- if (featureCollection[index].properties.Key == currSpot.K) {
456
- // ind_del = featureCollection[index].id;
457
- ind_del = index;
458
- }
459
- else {
460
- console.log("error");
465
+ if (currSpot) {
466
+
467
+ for (const index in featureCollection) {
468
+ if (featureCollection[index].properties.Key == currSpot.K) {
469
+ // ind_del = featureCollection[index].id;
470
+ ind_del = index;
471
+ }
472
+ else {
473
+ console.log("error");
474
+ }
461
475
  }
462
- }
463
476
 
464
- featureCollection.splice(ind_del, 1);
477
+ featureCollection.splice(ind_del, 1);
478
+ }
465
479
  }
466
480
  }
467
481
 
@@ -490,17 +504,19 @@ sap.ui.define([
490
504
  else {
491
505
 
492
506
  let currRoute = routes.E;
507
+ if (currRoute) {
493
508
 
494
- for (const index in featureCollection) {
495
- if (featureCollection[index].properties.Key == currRoute.K) {
496
- ind_del = [index];
497
- }
498
- else {
499
- console.log("error");
509
+ for (const index in featureCollection) {
510
+ if (featureCollection[index].properties.Key == currRoute.K) {
511
+ ind_del = [index];
512
+ }
513
+ else {
514
+ console.log("error");
515
+ }
500
516
  }
501
- }
502
517
 
503
- featureCollection.splice(ind_del, 1);
518
+ featureCollection.splice(ind_del, 1);
519
+ }
504
520
  }
505
521
  }
506
522
  VBI.VBITransformer._processAutomation = function (Menus, data) {
@@ -697,68 +713,68 @@ sap.ui.define([
697
713
  }
698
714
  }
699
715
 
700
- else {
701
- if (obj.SAPVB.Data.Remove) {
702
-
703
- let del = obj.SAPVB.Data.Remove;
704
-
705
- if (Array.isArray(del)) {
706
- for (const vo in del) {
707
- if (del.hasOwnProperty(vo)) {
708
- let currItm = del[vo];
709
- // N->E->[]
710
- switch (currItm.name) {
711
- case "Spo ts":
712
- VBI.VBITransformer._deleteSpotsData(currItm.N);
713
- case "Links":
714
- VBI.VBITransformer._deleteRoutesData(currItm.N);
715
- break;
716
- default:
717
716
 
718
- }
717
+ if (obj.SAPVB.Data.Remove) {
718
+
719
+ let del = obj.SAPVB.Data.Remove;
720
+
721
+ if (Array.isArray(del)) {
722
+ for (const vo in del) {
723
+ if (del.hasOwnProperty(vo)) {
724
+ let currItm = del[vo];
725
+ // N->E->[]
726
+ switch (currItm.name) {
727
+ case "Spots":
728
+ VBI.VBITransformer._deleteSpotsData(currItm.N);
729
+ case "Links":
730
+ VBI.VBITransformer._deleteRoutesData(currItm.N);
731
+ break;
732
+ default:
733
+
719
734
  }
720
735
  }
721
736
  }
722
- else {
723
- if (obj.SAPVB.Data.Remove.N) {
724
- // E or A within each array object. ***************
725
- let D = obj.SAPVB.Data.Remove.N;
726
- // let C = obj.SAPVB.Data.Set.A;
727
- if (Array.isArray(D)) {
728
- for (const item in D) {
729
- if (D.hasOwnProperty(item)) {
730
- let currVO = D[item];
731
- switch (currVO.name) {
732
- case "Spots":
733
- VBI.VBITransformer._deleteSpotsData(currVO);
734
- break;
735
- case "Links":
736
- VBI.VBITransformer._deleteRoutesData(currVO);
737
- break;
738
-
739
- default:
740
-
741
- }
737
+ }
738
+ else {
739
+ if (obj.SAPVB.Data.Remove.N) {
740
+ // E or A within each array object. ***************
741
+ let D = obj.SAPVB.Data.Remove.N;
742
+ // let C = obj.SAPVB.Data.Set.A;
743
+ if (Array.isArray(D)) {
744
+ for (const item in D) {
745
+ if (D.hasOwnProperty(item)) {
746
+ let currVO = D[item];
747
+ switch (currVO.name) {
748
+ case "Spots":
749
+ VBI.VBITransformer._deleteSpotsData(currVO);
750
+ break;
751
+ case "Links":
752
+ VBI.VBITransformer._deleteRoutesData(currVO);
753
+ break;
754
+
755
+ default:
756
+
742
757
  }
743
758
  }
744
- } else {
745
- switch (D.name) {
746
- case "Spots":
747
- VBI.VBITransformer._deleteSpotsData(D);
748
- break;
749
- case "Links":
750
- VBI.VBITransformer._deleteRoutesData(D);
751
- break;
752
-
753
- default:
754
- // code block
755
- }
756
759
  }
757
- }
760
+ } else {
761
+ switch (D.name) {
762
+ case "Spots":
763
+ VBI.VBITransformer._deleteSpotsData(D);
764
+ break;
765
+ case "Links":
766
+ VBI.VBITransformer._deleteRoutesData(D);
767
+ break;
758
768
 
769
+ default:
770
+ // code block
771
+ }
772
+ }
759
773
  }
774
+
760
775
  }
761
776
  }
777
+
762
778
  }
763
779
 
764
780
  // Get the datatypes
@@ -50,7 +50,7 @@ sap.ui.define([
50
50
  var validDrop = drag.some(item => drop.includes(item));
51
51
  return validDrop;
52
52
  };
53
- VectorUtils.createIconElement = (Icon) => {
53
+ VectorUtils.createIconElement = (Icon, iconColor) => {
54
54
  const child_el = document.createElement('div');
55
55
  child_el.className = 'marker';
56
56
  child_el.style.position = 'absolute'; // Position it absolutely inside the parent
@@ -59,6 +59,7 @@ sap.ui.define([
59
59
  child_el.style.transform = 'translate(-50%, -50%)'; // Center the icon
60
60
  child_el.style.fontFamily = 'SAP-icons';
61
61
  child_el.style.fontSize = '20px'; // Adjust size as needed
62
+ child_el.style.color = iconColor;
62
63
  var iconInfo = sap.ui.core.IconPool.getIconInfo(Icon);
63
64
  child_el.innerHTML = iconInfo.content;
64
65
  return child_el;
package/ui5.yaml CHANGED
@@ -6,7 +6,7 @@ framework:
6
6
  name: SAPUI5
7
7
  libraries:
8
8
  - name: sap.ui.core
9
- - name: sap.ui.commons
9
+ - name: sap.m
10
10
  - name: sap.ui.unified
11
11
  - name: themelib_sap_horizon
12
12
  optional: true