bruce-models 4.2.7 → 4.2.8

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.
@@ -3665,7 +3665,10 @@ var Entity;
3665
3665
  else if (path[0] == "boundaries") {
3666
3666
  value = checkForValue(["Bruce"].concat(path));
3667
3667
  }
3668
- else if (path[0] == "position") {
3668
+ else if (path[0] == "geometryPivot") {
3669
+ value = checkForValue(["Bruce"].concat(path));
3670
+ }
3671
+ else if (path[0] == "worldPivot") {
3669
3672
  value = checkForValue(["Bruce"].concat(path));
3670
3673
  }
3671
3674
  else if (path[0] == "worldPosition") {
@@ -3691,7 +3694,10 @@ var Entity;
3691
3694
  else if (path[1] == "boundaries") {
3692
3695
  value = checkForValue(path.slice(1));
3693
3696
  }
3694
- else if (path[1] == "position") {
3697
+ else if (path[1] == "geometryPivot") {
3698
+ value = checkForValue(path.slice(1));
3699
+ }
3700
+ else if (path[1] == "worldPivot") {
3695
3701
  value = checkForValue(path.slice(1));
3696
3702
  }
3697
3703
  else if (path[1] == "worldPosition") {
@@ -3978,6 +3984,39 @@ var Entity;
3978
3984
  });
3979
3985
  }
3980
3986
  Entity.GetList = GetList;
3987
+ /**
3988
+ * Helper method that returns an Entity object.
3989
+ * This will ensure the basics exist ("Bruce" structure).
3990
+ * @param params
3991
+ */
3992
+ function Assert(params) {
3993
+ var _a, _b;
3994
+ let { entityId, entityTypeId, baseEntity } = params ? params : {};
3995
+ if (!entityId) {
3996
+ entityId = (_a = baseEntity === null || baseEntity === void 0 ? void 0 : baseEntity["Bruce"]) === null || _a === void 0 ? void 0 : _a["ID"];
3997
+ }
3998
+ if (!entityId) {
3999
+ entityId = ObjectUtils.UId();
4000
+ }
4001
+ if (!entityTypeId) {
4002
+ entityTypeId = (_b = baseEntity === null || baseEntity === void 0 ? void 0 : baseEntity["Bruce"]) === null || _b === void 0 ? void 0 : _b["EntityType.ID"];
4003
+ }
4004
+ let bruce = baseEntity === null || baseEntity === void 0 ? void 0 : baseEntity["Bruce"];
4005
+ if (!bruce) {
4006
+ bruce = {
4007
+ "EntityType.ID": null
4008
+ };
4009
+ }
4010
+ bruce["ID"] = entityId;
4011
+ bruce["EntityType.ID"] = entityTypeId;
4012
+ return Object.assign(Object.assign({}, baseEntity), { "Bruce": bruce });
4013
+ }
4014
+ Entity.Assert = Assert;
4015
+ /**
4016
+ * Helper method that returns a geojson object for a given set of Entities.
4017
+ * @param params
4018
+ * @returns
4019
+ */
3981
4020
  function ToGeoJson(params) {
3982
4021
  const { entities, excludeAltitude, altitude, includeUserData, allowedDisplayTypes } = params;
3983
4022
  const features = [];
@@ -13269,7 +13308,7 @@ var DataSource;
13269
13308
  })(DataSource || (DataSource = {}));
13270
13309
 
13271
13310
  // This is updated with the package.json version on build.
13272
- const VERSION = "4.2.7";
13311
+ const VERSION = "4.2.8";
13273
13312
 
13274
13313
  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, 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 };
13275
13314
  //# sourceMappingURL=bruce-models.es5.js.map