bruce-models 4.6.2 → 4.6.3

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.
@@ -641,8 +641,21 @@ var MessageBroker;
641
641
  }
642
642
  }
643
643
  formatApiUri(uri) {
644
- const ws = !window.document || window.document.location.protocol === "https:" ? "wss" : "ws";
645
- return uri.replace(/^(https|http)/, ws) + "websocket";
644
+ const wsProtocol = window.document.location.protocol === "https:" ? "wss" : "ws";
645
+ const currentUrl = new URL(uri);
646
+ let full = wsProtocol + "://" + currentUrl.host + currentUrl.pathname + "websocket";
647
+ // Check if we have a queryParam for accountId.
648
+ const accountId = currentUrl.searchParams.get("accountId");
649
+ if (accountId) {
650
+ if (full.includes("?")) {
651
+ full += "&";
652
+ }
653
+ else {
654
+ full += "?";
655
+ }
656
+ full += "accountId=" + accountId;
657
+ }
658
+ return full;
646
659
  }
647
660
  onOpen(ev) {
648
661
  if (this.env === Api.EEnv.DEV) {
@@ -13781,7 +13794,7 @@ var DataSource;
13781
13794
  })(DataSource || (DataSource = {}));
13782
13795
 
13783
13796
  // This is updated with the package.json version on build.
13784
- const VERSION = "4.6.2";
13797
+ const VERSION = "4.6.3";
13785
13798
 
13786
13799
  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 };
13787
13800
  //# sourceMappingURL=bruce-models.es5.js.map