@sapui5/sap.ui.vbm 1.97.0 → 1.98.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 +1 -1
- package/src/sap/ui/vbm/.library +1 -1
- package/src/sap/ui/vbm/Adapter.js +45 -7
- package/src/sap/ui/vbm/Adapter3D.js +1 -1
- package/src/sap/ui/vbm/GeoMap.js +15 -5
- package/src/sap/ui/vbm/Viewport.js +1 -1
- package/src/sap/ui/vbm/adapter3d/ModelHandler.js +1 -1
- package/src/sap/ui/vbm/adapter3d/ObjectFactory.js +1 -1
- package/src/sap/ui/vbm/adapter3d/PolygonHandler.js +1 -1
- package/src/sap/ui/vbm/adapter3d/SceneBuilder.js +3 -1
- package/src/sap/ui/vbm/adapter3d/VBIJSONParser.js +1 -1
- package/src/sap/ui/vbm/lib/sapscene.js +1 -1
- package/src/sap/ui/vbm/lib/saputilities.js +7 -7
- package/src/sap/ui/vbm/lib/sapvbi.js +1 -1
- package/src/sap/ui/vbm/library.js +2 -2
package/package.json
CHANGED
package/src/sap/ui/vbm/.library
CHANGED
|
@@ -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.
|
|
6
|
+
<version>1.98.0</version>
|
|
7
7
|
|
|
8
8
|
<documentation>SAP UI library: sap.ui.vbm</documentation>
|
|
9
9
|
|
|
@@ -22,13 +22,12 @@ sap.ui.define([
|
|
|
22
22
|
* @param {string} [sId] id for the new control, generated automatically if no id is given
|
|
23
23
|
* @param {object} [mSettings] initial settings for the new object
|
|
24
24
|
* @author SAP SE
|
|
25
|
-
* @version 1.
|
|
25
|
+
* @version 1.98.0
|
|
26
26
|
* @extends sap.ui.core.Element
|
|
27
27
|
* @constructor
|
|
28
28
|
* @public
|
|
29
29
|
* @alias sap.ui.vbm.Adapter
|
|
30
30
|
* @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel
|
|
31
|
-
* @experimental Since 1.48.0 This class is experimental and might be modified or removed in future versions.
|
|
32
31
|
*/
|
|
33
32
|
var Adapter = Element.extend("sap.ui.vbm.Adapter", /** @lends sap.ui.vbm.Adapter.prototype */ {
|
|
34
33
|
metadata: {
|
|
@@ -102,6 +101,32 @@ sap.ui.define([
|
|
|
102
101
|
"start",
|
|
103
102
|
"tooltip"];
|
|
104
103
|
|
|
104
|
+
this._areaProperties = [
|
|
105
|
+
"key", //K: VoBase
|
|
106
|
+
"color", //C: Area, OBJECT_BASE_DATA->FILL_COLOR
|
|
107
|
+
"colorBorder", //D/CB: Area, OBJECT_BASE_DATA->BORDER_COLOR
|
|
108
|
+
"posarray", //H, PM (multipart) /P: Area, AREA_EXTENSION->BORDER_POINTS
|
|
109
|
+
"selectColor", //SC: OBJECT_BASE_DATA->SELECT_COLOR
|
|
110
|
+
"dragdata", //DD: VoAggregation, OBJECT_BASE_DATA->DRAG_DATA
|
|
111
|
+
"VB:s", //VB:s: elected, OBJECT_BASE_DATA->SELECTED
|
|
112
|
+
"VB:c", //H/VB:c: VoAggregation (changeable) OBJECT_BASE_DATA->CHANGEABLE
|
|
113
|
+
"hotScale", //HS: VoAggregation
|
|
114
|
+
"hotDeltaColor", //HC/HDC: VoAggregation, OBJECT_BASE_DATA->HOT_COLOR
|
|
115
|
+
"borderDash", //BD: Area
|
|
116
|
+
"selectColor", //SC: VoAggregation
|
|
117
|
+
"fxdir", //FD: VoAggregation
|
|
118
|
+
"fxsize", //FS: VoAggregation
|
|
119
|
+
"entity", //ET: VoAggregation
|
|
120
|
+
"labelBgColor", //LC/LBC: VoAggregation
|
|
121
|
+
"labelBorderColor", //LBBC: VoAggregation
|
|
122
|
+
"labelPos", //LP: VoAggregation
|
|
123
|
+
"labelText", //LT: VoAggregation
|
|
124
|
+
"labelArrow", //??VOBase
|
|
125
|
+
"label", //L
|
|
126
|
+
"labelAlignment", //"LA"
|
|
127
|
+
"tooltip" //B/TT: VoAggregation
|
|
128
|
+
];
|
|
129
|
+
|
|
105
130
|
// Allowed Spot properties
|
|
106
131
|
this._spotProperties = [
|
|
107
132
|
"alignment",
|
|
@@ -474,6 +499,7 @@ sap.ui.define([
|
|
|
474
499
|
* "Set": [
|
|
475
500
|
* { "name": "Spots", "type": "N", ....},
|
|
476
501
|
* { "name": "Links", "type": "N", ....},
|
|
502
|
+
* { "name": "Areas", "type": "N", ....},
|
|
477
503
|
* ]
|
|
478
504
|
* }
|
|
479
505
|
*
|
|
@@ -483,6 +509,7 @@ sap.ui.define([
|
|
|
483
509
|
* "N": [
|
|
484
510
|
* { "name": "Spots", ... },
|
|
485
511
|
* { "name": "Links", ... },
|
|
512
|
+
* { "name": "Areas", ... },
|
|
486
513
|
* ]
|
|
487
514
|
* }
|
|
488
515
|
* }
|
|
@@ -787,13 +814,18 @@ sap.ui.define([
|
|
|
787
814
|
processDragAndDrop();
|
|
788
815
|
break;
|
|
789
816
|
case "{00100000-2012-0004-B001-F311DE491C77}": // Area
|
|
817
|
+
processProperties(this._areaProperties, this._propsAnomalies);
|
|
818
|
+
voTemplate = new sap.ui.vbm.Area(settings);
|
|
819
|
+
voAggregation = new sap.ui.vbm.Areas(this._ui5Id(definition.id));
|
|
820
|
+
processDragAndDrop();
|
|
821
|
+
break;
|
|
822
|
+
case "{00100000-2014-0004-BDA8-87B904609063}": // "ExtArea" GUID??? from sapvobase
|
|
823
|
+
case "{00100000-2014-0004-B001-9F1B43BE944A}": // "ExtLink" GUID??? from sapvobase
|
|
790
824
|
case "{00100000-2013-0004-B001-7EB3CCC039C4}": // Circle
|
|
791
825
|
case "{00100000-2013-0004-B001-686F01B57873}": // Geo Circle
|
|
792
826
|
case "{00100000-2012-0004-B001-BFED458C3076}": // Box
|
|
793
827
|
case "{00100000-2012-0004-B001-383477EA1DEB}": // Pie Chart
|
|
794
828
|
case "{388951f5-a66b-4423-a5ad-e0ee13c2246f}": // Decal
|
|
795
|
-
case "ExtLink": // GUID???
|
|
796
|
-
case "ExtArea": // GUID???
|
|
797
829
|
default:
|
|
798
830
|
Log.debug("unsupported VO type", definition.type, thisModule);
|
|
799
831
|
return;
|
|
@@ -917,6 +949,9 @@ sap.ui.define([
|
|
|
917
949
|
case "Drop":
|
|
918
950
|
this._event = "drop";
|
|
919
951
|
break;
|
|
952
|
+
case "CreateComplete":
|
|
953
|
+
this._event = "createComplete";
|
|
954
|
+
break;
|
|
920
955
|
case "Select":
|
|
921
956
|
this._event = "select";
|
|
922
957
|
break;
|
|
@@ -1473,12 +1508,15 @@ sap.ui.define([
|
|
|
1473
1508
|
}
|
|
1474
1509
|
if (oEventData.Action && oEventData.Action.object) {
|
|
1475
1510
|
// Whatever back-end refers to as Links, they are referred to as Routes by Geomap
|
|
1476
|
-
|
|
1477
|
-
|
|
1511
|
+
var routeName = "Route", linkName = "Link";
|
|
1512
|
+
var actionObjects = [oEventData.Action.object];
|
|
1513
|
+
if (oEventData.Action.object === routeName) {
|
|
1514
|
+
actionObjects.push(linkName);
|
|
1515
|
+
oEventData.Action.object = linkName;
|
|
1478
1516
|
}
|
|
1479
1517
|
|
|
1480
1518
|
var oAction = sap.ui.vbm.findInArray(this._actions, function(action) {
|
|
1481
|
-
return
|
|
1519
|
+
return (actionObjects.indexOf(action.refVO) != -1) && oEventData.Action.name.toLowerCase() === action.refEvent.toLowerCase();
|
|
1482
1520
|
});
|
|
1483
1521
|
|
|
1484
1522
|
if (oAction) {
|
|
@@ -41,7 +41,7 @@ sap.ui.define([
|
|
|
41
41
|
* @param {string} [sId] id for the new control, generated automatically if no id is given
|
|
42
42
|
* @param {object} [mSettings] initial settings for the new object
|
|
43
43
|
* @author SAP SE
|
|
44
|
-
* @version 1.
|
|
44
|
+
* @version 1.98.0
|
|
45
45
|
* @extends sap.ui.core.Element
|
|
46
46
|
* @constructor
|
|
47
47
|
* @public
|
package/src/sap/ui/vbm/GeoMap.js
CHANGED
|
@@ -1058,7 +1058,8 @@ sap.ui.define([
|
|
|
1058
1058
|
case "click":
|
|
1059
1059
|
// fire the click..................................................//
|
|
1060
1060
|
this.fireClick({
|
|
1061
|
-
pos: datEvent.Action.AddActionProperties.AddActionProperty[0]['#']
|
|
1061
|
+
pos: datEvent.Action.AddActionProperties.AddActionProperty[0]['#'],
|
|
1062
|
+
data: datEvent //include VBI data to the UI5 event payload
|
|
1062
1063
|
});
|
|
1063
1064
|
break;
|
|
1064
1065
|
case "contextMenu":
|
|
@@ -1073,7 +1074,8 @@ sap.ui.define([
|
|
|
1073
1074
|
case "drop":
|
|
1074
1075
|
// fire the drop..................................................//
|
|
1075
1076
|
this.fireDrop({
|
|
1076
|
-
pos: datEvent.Action.AddActionProperties.AddActionProperty[0]['#']
|
|
1077
|
+
pos: datEvent.Action.AddActionProperties.AddActionProperty[0]['#'],
|
|
1078
|
+
data: datEvent //include VBI data to the UI5 event payload
|
|
1077
1079
|
});
|
|
1078
1080
|
break;
|
|
1079
1081
|
case "zoomChanged":
|
|
@@ -1084,7 +1086,8 @@ sap.ui.define([
|
|
|
1084
1086
|
viewportBB: {
|
|
1085
1087
|
upperLeft: datEvent.Action.Params.Param[3]['#'],
|
|
1086
1088
|
lowerRight: datEvent.Action.Params.Param[4]['#']
|
|
1087
|
-
}
|
|
1089
|
+
},
|
|
1090
|
+
data: datEvent //include VBI data to the UI5 event payload
|
|
1088
1091
|
});
|
|
1089
1092
|
break;
|
|
1090
1093
|
case "centerChanged":
|
|
@@ -1095,7 +1098,8 @@ sap.ui.define([
|
|
|
1095
1098
|
viewportBB: {
|
|
1096
1099
|
upperLeft: datEvent.Action.Params.Param[3]['#'],
|
|
1097
1100
|
lowerRight: datEvent.Action.Params.Param[4]['#']
|
|
1098
|
-
}
|
|
1101
|
+
},
|
|
1102
|
+
data: datEvent //include VBI data to the UI5 event payload
|
|
1099
1103
|
});
|
|
1100
1104
|
break;
|
|
1101
1105
|
case "select":
|
|
@@ -1121,6 +1125,12 @@ sap.ui.define([
|
|
|
1121
1125
|
this.mIACreateCB = null;
|
|
1122
1126
|
throw exc;
|
|
1123
1127
|
}
|
|
1128
|
+
} else {
|
|
1129
|
+
// If interactive editing was triggered indirectly (e.g. via vbiJSON load) then fire event
|
|
1130
|
+
datEvent.Action.name = "CreateComplete";
|
|
1131
|
+
//include VBI data to the UI5 event payload
|
|
1132
|
+
this.fireEvent("createComplete", {data: datEvent}, true);
|
|
1133
|
+
e.preventDefault();
|
|
1124
1134
|
}
|
|
1125
1135
|
break;
|
|
1126
1136
|
case "keydown":
|
|
@@ -2226,4 +2236,4 @@ sap.ui.define([
|
|
|
2226
2236
|
|
|
2227
2237
|
return GeoMap;
|
|
2228
2238
|
|
|
2229
|
-
}, /* bExport= */true);
|
|
2239
|
+
}, /* bExport= */true);
|
|
@@ -29,7 +29,7 @@ sap.ui.define([
|
|
|
29
29
|
*
|
|
30
30
|
* @private
|
|
31
31
|
* @author SAP SE
|
|
32
|
-
* @version 1.
|
|
32
|
+
* @version 1.98.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.
|
|
380
|
+
* @version 1.98.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.
|
|
35
|
+
* @version 1.98.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 */ {
|
|
@@ -46,7 +46,7 @@ sap.ui.define([
|
|
|
46
46
|
*
|
|
47
47
|
* @private
|
|
48
48
|
* @author SAP SE
|
|
49
|
-
* @version 1.
|
|
49
|
+
* @version 1.98.0
|
|
50
50
|
* @alias sap.ui.vbm.adapter3d.SceneBuilder
|
|
51
51
|
*/
|
|
52
52
|
var SceneBuilder = BaseObject.extend("sap.ui.vbm.adapter3d.SceneBuilder", /** @lends sap.ui.vbm.adapter3d.SceneBuilder.prototype */ {
|
|
@@ -351,6 +351,8 @@ sap.ui.define([
|
|
|
351
351
|
|
|
352
352
|
var iframe = document.createElement("iframe");
|
|
353
353
|
iframe.style.visibility = "hidden";
|
|
354
|
+
// use sandbox attribute to disable script execution and all other suspicious activities in iframe as we cannot affectively escape input HTML.
|
|
355
|
+
iframe.sandbox = "allow-same-origin";
|
|
354
356
|
iframe.width = width;
|
|
355
357
|
iframe.height = height;
|
|
356
358
|
document.body.appendChild(iframe);
|
|
@@ -56,7 +56,7 @@ sap.ui.define([
|
|
|
56
56
|
*
|
|
57
57
|
* @private
|
|
58
58
|
* @author SAP SE
|
|
59
|
-
* @version 1.
|
|
59
|
+
* @version 1.98.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 */ {
|
|
@@ -3351,7 +3351,7 @@ VBI.GeoScene = function(target, mapmanager, maplayerstack) {
|
|
|
3351
3351
|
}
|
|
3352
3352
|
var sCopyright = scene.m_MapLayerStack.GetCopyright();
|
|
3353
3353
|
if (sCopyright) {
|
|
3354
|
-
scene.m_DivCopyright.innerHTML = sCopyright;
|
|
3354
|
+
scene.m_DivCopyright.innerHTML = jQuery.sap.encodeHTML(sCopyright);
|
|
3355
3355
|
} else {
|
|
3356
3356
|
scene.m_DivCopyright.style.paddingRight = 0;
|
|
3357
3357
|
scene.m_DivCopyright.style.paddingLeft = 0;
|
|
@@ -270,7 +270,7 @@ VBI.Utilities.CreateCaption = function(id, text, left, top, right, bottom, toolt
|
|
|
270
270
|
}
|
|
271
271
|
|
|
272
272
|
newElement.className = "vbi-2d-caption vbi-2d-common";
|
|
273
|
-
newElement.innerHTML = text;
|
|
273
|
+
newElement.innerHTML = jQuery.sap.encodeHTML(text);
|
|
274
274
|
return newElement;
|
|
275
275
|
};
|
|
276
276
|
|
|
@@ -286,7 +286,7 @@ VBI.Utilities.CreateLabel = function(id, text, left, top, right, bottom, tooltip
|
|
|
286
286
|
newElement.style.textAlign = VBI.Utilities.Align[align];
|
|
287
287
|
newElement.style.title = tooltip;
|
|
288
288
|
newElement.className = "vbi-2d-label vbi-2d-common";
|
|
289
|
-
newElement.innerHTML = text;
|
|
289
|
+
newElement.innerHTML = jQuery.sap.encodeHTML(text);
|
|
290
290
|
return newElement;
|
|
291
291
|
};
|
|
292
292
|
|
|
@@ -303,7 +303,7 @@ VBI.Utilities.CreateLink = function(id, text, left, top, right, bottom, href, to
|
|
|
303
303
|
newElement.className = "vbi-2d-link vbi-2d-common";
|
|
304
304
|
newElement.href = href ? href : "javascrip" + "t:void(0)"; // separated to fool ESLint
|
|
305
305
|
newElement.title = tooltip;
|
|
306
|
-
newElement.innerHTML = text;
|
|
306
|
+
newElement.innerHTML = jQuery.sap.encodeHTML(text);
|
|
307
307
|
return newElement;
|
|
308
308
|
};
|
|
309
309
|
|
|
@@ -333,7 +333,7 @@ VBI.Utilities.CreateButton = function(id, text, left, top, right, bottom, toolti
|
|
|
333
333
|
newElement.style.height = (bottom - top).toString() + "px";
|
|
334
334
|
newElement.style.textAlign = VBI.Utilities.Align[align];
|
|
335
335
|
newElement.className = "vbi-2d-button vbi-2d-common";
|
|
336
|
-
newElement.innerHTML = text;
|
|
336
|
+
newElement.innerHTML = jQuery.sap.encodeHTML(text);
|
|
337
337
|
newElement.title = tooltip;
|
|
338
338
|
return newElement;
|
|
339
339
|
};
|
|
@@ -390,7 +390,7 @@ VBI.Utilities.CreateDetailPhone = function(id, left, top, width, height, titlete
|
|
|
390
390
|
title.setAttribute("role", sap.ui.core.AccessibleRole.Heading);
|
|
391
391
|
title.id = id + "-window-title";
|
|
392
392
|
title.className = "vbi-detail-title-phone";
|
|
393
|
-
title.innerHTML = titletext;
|
|
393
|
+
title.innerHTML = jQuery.sap.encodeHTML(titletext);
|
|
394
394
|
header.appendChild(title);
|
|
395
395
|
|
|
396
396
|
// create the close.......................................................//
|
|
@@ -476,7 +476,7 @@ VBI.Utilities.CreateDetail = function(id, left, top, width, height, titletext, p
|
|
|
476
476
|
title.setAttribute("role", sap.ui.core.AccessibleRole.Heading);
|
|
477
477
|
title.id = id + "-window-title";
|
|
478
478
|
title.className = "vbi-detail-title";
|
|
479
|
-
title.innerHTML = titletext;
|
|
479
|
+
title.innerHTML = jQuery.sap.encodeHTML(titletext);
|
|
480
480
|
header.appendChild(title);
|
|
481
481
|
|
|
482
482
|
// create the close.......................................................//
|
|
@@ -601,7 +601,7 @@ VBI.Utilities.CreateLegend = function(id, top, titletext, padding, bClickRow) {
|
|
|
601
601
|
title.setAttribute("role", sap.ui.core.AccessibleRole.Heading);
|
|
602
602
|
title.id = id + "-title";
|
|
603
603
|
title.className = "vbi-legend-title";
|
|
604
|
-
title.innerHTML = titletext;
|
|
604
|
+
title.innerHTML = jQuery.sap.encodeHTML(titletext);
|
|
605
605
|
header.appendChild(title);
|
|
606
606
|
|
|
607
607
|
// create the content.....................................................//
|
|
@@ -19,7 +19,7 @@ sap.ui.define([
|
|
|
19
19
|
* @namespace
|
|
20
20
|
* @name sap.ui.vbm
|
|
21
21
|
* @author SAP SE
|
|
22
|
-
* @version 1.
|
|
22
|
+
* @version 1.98.0
|
|
23
23
|
* @public
|
|
24
24
|
*/
|
|
25
25
|
|
|
@@ -42,7 +42,7 @@ sap.ui.define([
|
|
|
42
42
|
"sap.ui.vbm.ClusterBase", "sap.ui.vbm.ClusterTree", "sap.ui.vbm.ClusterGrid", "sap.ui.vbm.ClusterDistance", "sap.ui.vbm.Heatmap",
|
|
43
43
|
"sap.ui.vbm.HeatPoint", "sap.ui.vbm.ClusterContainer", "sap.ui.vbm.Adapter", "sap.ui.vbm.Adapter3D"
|
|
44
44
|
],
|
|
45
|
-
version: "1.
|
|
45
|
+
version: "1.98.0"
|
|
46
46
|
});
|
|
47
47
|
|
|
48
48
|
sap.ui.loader.config({
|