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.
@@ -3934,16 +3934,18 @@
3934
3934
  // All properties.
3935
3935
  if (includeUserData != false) {
3936
3936
  properties = cloneObj(entity);
3937
- // We exclude geometry since the geojson is supposed to represent that attribute.
3938
- delete properties.geometry;
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: entity.Bruce ? cloneObj(entity.Bruce) : null,
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.geometry;
4013
- if (!geometry && (((_b = entity.location) === null || _b === void 0 ? void 0 : _b.longitude) && ((_c = entity.location) === null || _c === void 0 ? void 0 : _c.latitude))) {
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.location.longitude},${entity.location.latitude}` + (entity.location.altitude != null ? `,${entity.location.altitude}` : ""),
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
- const isValueNum = !isNaN(+eValue);
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
- const isMapValueNum = !isNaN(+mapValue);
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.3";
13534
+ const VERSION = "4.6.5";
13527
13535
 
13528
13536
  exports.VERSION = VERSION;
13529
13537
  exports.AbstractApi = AbstractApi;