bruce-models 4.6.3 → 4.6.5
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 +22 -14
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +22 -14
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/bruce-models.js +1 -1
- package/dist/lib/calculator/calculator.js +10 -4
- package/dist/lib/calculator/calculator.js.map +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/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
|
@@ -3934,16 +3934,18 @@
|
|
|
3934
3934
|
// All properties.
|
|
3935
3935
|
if (includeUserData != false) {
|
|
3936
3936
|
properties = cloneObj(entity);
|
|
3937
|
-
//
|
|
3938
|
-
delete properties.
|
|
3937
|
+
// The GeoJSON is supposed to represent the geometry attribute.
|
|
3938
|
+
delete properties.Bruce.VectorGeometry;
|
|
3939
|
+
delete properties.Bruce.Boundaries;
|
|
3939
3940
|
}
|
|
3940
3941
|
// Only specific internal properties.
|
|
3941
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;
|
|
3942
3947
|
properties = {
|
|
3943
|
-
Bruce:
|
|
3944
|
-
location: entity.location ? cloneObj(entity.location) : null,
|
|
3945
|
-
transform: entity.transform ? cloneObj(entity.transform) : null,
|
|
3946
|
-
boundaries: entity.boundaries ? cloneObj(entity.boundaries) : null,
|
|
3948
|
+
Bruce: bClone
|
|
3947
3949
|
};
|
|
3948
3950
|
}
|
|
3949
3951
|
feature.properties = properties;
|
|
@@ -4009,10 +4011,10 @@
|
|
|
4009
4011
|
if (!((_a = entity === null || entity === void 0 ? void 0 : entity.Bruce) === null || _a === void 0 ? void 0 : _a.ID)) {
|
|
4010
4012
|
return;
|
|
4011
4013
|
}
|
|
4012
|
-
let geometry = entity.
|
|
4013
|
-
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))) {
|
|
4014
4016
|
geometry = {
|
|
4015
|
-
Point: `${entity.
|
|
4017
|
+
Point: `${entity.Bruce.Location.longitude},${entity.Bruce.Location.latitude}` + (entity.Bruce.Location.altitude != null ? `,${entity.Bruce.Location.altitude}` : ""),
|
|
4016
4018
|
};
|
|
4017
4019
|
}
|
|
4018
4020
|
if (geometry) {
|
|
@@ -4159,12 +4161,12 @@
|
|
|
4159
4161
|
path = path.replace("${", "");
|
|
4160
4162
|
path = path.replace("}", "");
|
|
4161
4163
|
}
|
|
4164
|
+
// Split by backslashes.
|
|
4165
|
+
paths.push(exports.PathUtils.Parse(path));
|
|
4162
4166
|
// Split by dots.
|
|
4163
4167
|
paths.push(exports.PathUtils.ParseLegacy(path));
|
|
4164
4168
|
// Take string as is.
|
|
4165
4169
|
paths.push([path]);
|
|
4166
|
-
// Split by backslashes.
|
|
4167
|
-
paths.push(exports.PathUtils.Parse(path));
|
|
4168
4170
|
// Remove duplicates.
|
|
4169
4171
|
const tmpPaths = [];
|
|
4170
4172
|
for (let i = 0; i < paths.length; i++) {
|
|
@@ -4453,11 +4455,17 @@
|
|
|
4453
4455
|
entity: entity,
|
|
4454
4456
|
path: attrPath
|
|
4455
4457
|
});
|
|
4456
|
-
|
|
4458
|
+
let isValueNum = !isNaN(+eValue);
|
|
4459
|
+
if (eValue == null) {
|
|
4460
|
+
isValueNum = false;
|
|
4461
|
+
}
|
|
4457
4462
|
for (let i = 0; i < value.values.length; i++) {
|
|
4458
4463
|
const option = value.values[i];
|
|
4459
4464
|
const mapValue = option.fieldValue;
|
|
4460
|
-
|
|
4465
|
+
let isMapValueNum = !isNaN(+mapValue);
|
|
4466
|
+
if (isMapValueNum == null) {
|
|
4467
|
+
isMapValueNum = false;
|
|
4468
|
+
}
|
|
4461
4469
|
if (isValueNum && (isMapValueNum || mapValue.includes("-"))) {
|
|
4462
4470
|
if (+mapValue == +eValue) {
|
|
4463
4471
|
return option.appliedValue;
|
|
@@ -13523,7 +13531,7 @@
|
|
|
13523
13531
|
})(exports.DataSource || (exports.DataSource = {}));
|
|
13524
13532
|
|
|
13525
13533
|
// This is updated with the package.json version on build.
|
|
13526
|
-
const VERSION = "4.6.
|
|
13534
|
+
const VERSION = "4.6.5";
|
|
13527
13535
|
|
|
13528
13536
|
exports.VERSION = VERSION;
|
|
13529
13537
|
exports.AbstractApi = AbstractApi;
|