bruce-models 4.6.2 → 4.6.4
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/dist/bruce-models.es5.js +27 -12
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +27 -12
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/bruce-models.js +1 -1
- package/dist/lib/entity/entity.js +11 -9
- package/dist/lib/entity/entity.js.map +1 -1
- package/dist/lib/project/menu-item.js.map +1 -1
- package/dist/lib/server/message-broker.js +15 -2
- package/dist/lib/server/message-broker.js.map +1 -1
- package/dist/types/bruce-models.d.ts +1 -1
- package/dist/types/project/menu-item.d.ts +3 -0
- package/package.json +1 -1
package/dist/bruce-models.umd.js
CHANGED
|
@@ -642,8 +642,21 @@
|
|
|
642
642
|
}
|
|
643
643
|
}
|
|
644
644
|
formatApiUri(uri) {
|
|
645
|
-
const
|
|
646
|
-
|
|
645
|
+
const wsProtocol = window.document.location.protocol === "https:" ? "wss" : "ws";
|
|
646
|
+
const currentUrl = new URL(uri);
|
|
647
|
+
let full = wsProtocol + "://" + currentUrl.host + currentUrl.pathname + "websocket";
|
|
648
|
+
// Check if we have a queryParam for accountId.
|
|
649
|
+
const accountId = currentUrl.searchParams.get("accountId");
|
|
650
|
+
if (accountId) {
|
|
651
|
+
if (full.includes("?")) {
|
|
652
|
+
full += "&";
|
|
653
|
+
}
|
|
654
|
+
else {
|
|
655
|
+
full += "?";
|
|
656
|
+
}
|
|
657
|
+
full += "accountId=" + accountId;
|
|
658
|
+
}
|
|
659
|
+
return full;
|
|
647
660
|
}
|
|
648
661
|
onOpen(ev) {
|
|
649
662
|
if (this.env === exports.Api.EEnv.DEV) {
|
|
@@ -3921,16 +3934,18 @@
|
|
|
3921
3934
|
// All properties.
|
|
3922
3935
|
if (includeUserData != false) {
|
|
3923
3936
|
properties = cloneObj(entity);
|
|
3924
|
-
//
|
|
3925
|
-
delete properties.
|
|
3937
|
+
// The GeoJSON is supposed to represent the geometry attribute.
|
|
3938
|
+
delete properties.Bruce.VectorGeometry;
|
|
3939
|
+
delete properties.Bruce.Boundaries;
|
|
3926
3940
|
}
|
|
3927
3941
|
// Only specific internal properties.
|
|
3928
3942
|
else {
|
|
3943
|
+
const bClone = cloneObj(entity.Bruce);
|
|
3944
|
+
// The GeoJSON is supposed to represent the geometry attribute.
|
|
3945
|
+
delete bClone.VectorGeometry;
|
|
3946
|
+
delete bClone.Boundaries;
|
|
3929
3947
|
properties = {
|
|
3930
|
-
Bruce:
|
|
3931
|
-
location: entity.location ? cloneObj(entity.location) : null,
|
|
3932
|
-
transform: entity.transform ? cloneObj(entity.transform) : null,
|
|
3933
|
-
boundaries: entity.boundaries ? cloneObj(entity.boundaries) : null,
|
|
3948
|
+
Bruce: bClone
|
|
3934
3949
|
};
|
|
3935
3950
|
}
|
|
3936
3951
|
feature.properties = properties;
|
|
@@ -3996,10 +4011,10 @@
|
|
|
3996
4011
|
if (!((_a = entity === null || entity === void 0 ? void 0 : entity.Bruce) === null || _a === void 0 ? void 0 : _a.ID)) {
|
|
3997
4012
|
return;
|
|
3998
4013
|
}
|
|
3999
|
-
let geometry = entity.
|
|
4000
|
-
if (!geometry && (((_b = entity.
|
|
4014
|
+
let geometry = entity.Bruce.VectorGeometry;
|
|
4015
|
+
if (!geometry && (((_b = entity.Bruce.Location) === null || _b === void 0 ? void 0 : _b.longitude) && ((_c = entity.Bruce.Location) === null || _c === void 0 ? void 0 : _c.latitude))) {
|
|
4001
4016
|
geometry = {
|
|
4002
|
-
Point: `${entity.
|
|
4017
|
+
Point: `${entity.Bruce.Location.longitude},${entity.Bruce.Location.latitude}` + (entity.Bruce.Location.altitude != null ? `,${entity.Bruce.Location.altitude}` : ""),
|
|
4003
4018
|
};
|
|
4004
4019
|
}
|
|
4005
4020
|
if (geometry) {
|
|
@@ -13510,7 +13525,7 @@
|
|
|
13510
13525
|
})(exports.DataSource || (exports.DataSource = {}));
|
|
13511
13526
|
|
|
13512
13527
|
// This is updated with the package.json version on build.
|
|
13513
|
-
const VERSION = "4.6.
|
|
13528
|
+
const VERSION = "4.6.4";
|
|
13514
13529
|
|
|
13515
13530
|
exports.VERSION = VERSION;
|
|
13516
13531
|
exports.AbstractApi = AbstractApi;
|