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.
@@ -3979,16 +3979,18 @@ var Entity;
3979
3979
  // All properties.
3980
3980
  if (includeUserData != false) {
3981
3981
  properties = cloneObj(entity);
3982
- // We exclude geometry since the geojson is supposed to represent that attribute.
3983
- delete properties.geometry;
3982
+ // The GeoJSON is supposed to represent the geometry attribute.
3983
+ delete properties.Bruce.VectorGeometry;
3984
+ delete properties.Bruce.Boundaries;
3984
3985
  }
3985
3986
  // Only specific internal properties.
3986
3987
  else {
3988
+ const bClone = cloneObj(entity.Bruce);
3989
+ // The GeoJSON is supposed to represent the geometry attribute.
3990
+ delete bClone.VectorGeometry;
3991
+ delete bClone.Boundaries;
3987
3992
  properties = {
3988
- Bruce: entity.Bruce ? cloneObj(entity.Bruce) : null,
3989
- location: entity.location ? cloneObj(entity.location) : null,
3990
- transform: entity.transform ? cloneObj(entity.transform) : null,
3991
- boundaries: entity.boundaries ? cloneObj(entity.boundaries) : null,
3993
+ Bruce: bClone
3992
3994
  };
3993
3995
  }
3994
3996
  feature.properties = properties;
@@ -4054,10 +4056,10 @@ var Entity;
4054
4056
  if (!((_a = entity === null || entity === void 0 ? void 0 : entity.Bruce) === null || _a === void 0 ? void 0 : _a.ID)) {
4055
4057
  return;
4056
4058
  }
4057
- let geometry = entity.geometry;
4058
- if (!geometry && (((_b = entity.location) === null || _b === void 0 ? void 0 : _b.longitude) && ((_c = entity.location) === null || _c === void 0 ? void 0 : _c.latitude))) {
4059
+ let geometry = entity.Bruce.VectorGeometry;
4060
+ 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))) {
4059
4061
  geometry = {
4060
- Point: `${entity.location.longitude},${entity.location.latitude}` + (entity.location.altitude != null ? `,${entity.location.altitude}` : ""),
4062
+ Point: `${entity.Bruce.Location.longitude},${entity.Bruce.Location.latitude}` + (entity.Bruce.Location.altitude != null ? `,${entity.Bruce.Location.altitude}` : ""),
4061
4063
  };
4062
4064
  }
4063
4065
  if (geometry) {
@@ -4211,12 +4213,12 @@ function parseLegacyPath(path) {
4211
4213
  path = path.replace("${", "");
4212
4214
  path = path.replace("}", "");
4213
4215
  }
4216
+ // Split by backslashes.
4217
+ paths.push(PathUtils.Parse(path));
4214
4218
  // Split by dots.
4215
4219
  paths.push(PathUtils.ParseLegacy(path));
4216
4220
  // Take string as is.
4217
4221
  paths.push([path]);
4218
- // Split by backslashes.
4219
- paths.push(PathUtils.Parse(path));
4220
4222
  // Remove duplicates.
4221
4223
  const tmpPaths = [];
4222
4224
  for (let i = 0; i < paths.length; i++) {
@@ -4510,11 +4512,17 @@ var Calculator;
4510
4512
  entity: entity,
4511
4513
  path: attrPath
4512
4514
  });
4513
- const isValueNum = !isNaN(+eValue);
4515
+ let isValueNum = !isNaN(+eValue);
4516
+ if (eValue == null) {
4517
+ isValueNum = false;
4518
+ }
4514
4519
  for (let i = 0; i < value.values.length; i++) {
4515
4520
  const option = value.values[i];
4516
4521
  const mapValue = option.fieldValue;
4517
- const isMapValueNum = !isNaN(+mapValue);
4522
+ let isMapValueNum = !isNaN(+mapValue);
4523
+ if (isMapValueNum == null) {
4524
+ isMapValueNum = false;
4525
+ }
4518
4526
  if (isValueNum && (isMapValueNum || mapValue.includes("-"))) {
4519
4527
  if (+mapValue == +eValue) {
4520
4528
  return option.appliedValue;
@@ -13794,7 +13802,7 @@ var DataSource;
13794
13802
  })(DataSource || (DataSource = {}));
13795
13803
 
13796
13804
  // This is updated with the package.json version on build.
13797
- const VERSION = "4.6.3";
13805
+ const VERSION = "4.6.5";
13798
13806
 
13799
13807
  export { VERSION, AnnDocument, CustomForm, AbstractApi, Api, BruceApi, GlobalApi, GuardianApi, ApiGetters, Calculator, Bounds, BruceEvent, CacheControl, Camera, Cartes, Carto, Color, DelayQueue, Geometry, UTC, BruceVariable, LRUCache, EntityAttachmentType, EntityAttachment, EntityComment, EntityLink, EntityLod, EntityLodCategory, EntityRelationType, EntityRelation, EntitySource, EntityTag, EntityType, Entity, EntityCoords, EntityTypeVisualSettings, EntityAttribute, EntityHistoricData, EntityTableView, Comment, ClientFile, ProgramKey, ZoomControl, MenuItem, ProjectViewBookmark, ProjectView, ProjectViewLegacyTile, ProjectViewTile, ProjectViewLegacy, ProjectViewLegacyBookmark, PendingAction, MessageBroker, HostingLocation, Style, Tileset, Permission, Session, UserGroup, User, Account, AccountInvite, AccountFeatures, AccountLimits, EncryptUtils, MathUtils, ObjectUtils, PathUtils, UrlUtils, DataLab, ImportCad, ImportCsv, ImportJson, ImportKml, ImportedFile, Markup, Uploader, Plugin, ENVIRONMENT, DataSource };
13800
13808
  //# sourceMappingURL=bruce-models.es5.js.map