bruce-models 6.7.5 → 6.7.7
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 +28 -11
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +28 -11
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/api/bruce-api.js +16 -9
- package/dist/lib/api/bruce-api.js.map +1 -1
- package/dist/lib/bruce-models.js +1 -1
- package/dist/lib/project/project-view.js +11 -1
- package/dist/lib/project/project-view.js.map +1 -1
- package/dist/types/api/bruce-api.d.ts +5 -1
- package/dist/types/bruce-models.d.ts +1 -1
- package/package.json +1 -1
package/dist/bruce-models.es5.js
CHANGED
|
@@ -985,7 +985,7 @@ var BruceApi;
|
|
|
985
985
|
// Indicates if the init process has finished loading.
|
|
986
986
|
// While this is not resolved requests will be in a pending state.
|
|
987
987
|
this.loadProm = Promise.resolve();
|
|
988
|
-
let { accountId, env, guardian, loadRegionalBaseUrl, loadConfig, loadWebSocket, dummy } = params;
|
|
988
|
+
let { accountId, env, guardian, loadRegionalBaseUrl, loadConfig, loadWebSocket, dummy, account } = params;
|
|
989
989
|
this.accountId = accountId;
|
|
990
990
|
this.env = env !== null && env !== void 0 ? env : Api.EEnv.PROD;
|
|
991
991
|
if (!dummy) {
|
|
@@ -997,16 +997,20 @@ var BruceApi;
|
|
|
997
997
|
// Mark it as attempted right away because we don't want any external calls while it gets to that async point.
|
|
998
998
|
this.configLoadAttempted = true;
|
|
999
999
|
}
|
|
1000
|
-
this.loadProm = this.init(guardian, loadConfig, loadWebSocket);
|
|
1000
|
+
this.loadProm = this.init(guardian, loadConfig, loadWebSocket, account);
|
|
1001
1001
|
}
|
|
1002
1002
|
}
|
|
1003
1003
|
/**
|
|
1004
1004
|
* Loads regional base url and sets up message broker.
|
|
1005
1005
|
* @param guardian Required for loading regional base url.
|
|
1006
1006
|
* @param loadConfig
|
|
1007
|
+
* @param loadWebSocket
|
|
1008
|
+
* @param account
|
|
1007
1009
|
* @returns
|
|
1008
1010
|
*/
|
|
1009
|
-
init(guardian, loadConfig, loadWebSocket
|
|
1011
|
+
init(guardian, loadConfig, loadWebSocket,
|
|
1012
|
+
// Preloaded account to save doing an API call.
|
|
1013
|
+
account) {
|
|
1010
1014
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1011
1015
|
if (!this.accountId) {
|
|
1012
1016
|
throw ("accountId is required.");
|
|
@@ -1020,7 +1024,8 @@ var BruceApi;
|
|
|
1020
1024
|
guardian: guardian,
|
|
1021
1025
|
// We marked it as attempted to load outside this method to fight any external calls.
|
|
1022
1026
|
// So we'll force load it now.
|
|
1023
|
-
forceLoad: true
|
|
1027
|
+
forceLoad: true,
|
|
1028
|
+
account: account
|
|
1024
1029
|
});
|
|
1025
1030
|
}
|
|
1026
1031
|
// Get the version.
|
|
@@ -1075,7 +1080,7 @@ var BruceApi;
|
|
|
1075
1080
|
*/
|
|
1076
1081
|
LoadConfig(params) {
|
|
1077
1082
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1078
|
-
let { guardian, forceLoad } = (params !== null && params !== void 0 ? params : {});
|
|
1083
|
+
let { guardian, forceLoad, account } = (params !== null && params !== void 0 ? params : {});
|
|
1079
1084
|
if (this.configLoadAttempted && forceLoad != true) {
|
|
1080
1085
|
return;
|
|
1081
1086
|
}
|
|
@@ -1086,10 +1091,12 @@ var BruceApi;
|
|
|
1086
1091
|
env: this.env
|
|
1087
1092
|
});
|
|
1088
1093
|
}
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1094
|
+
if (!account) {
|
|
1095
|
+
account = (yield Account.GetBySubdomain({
|
|
1096
|
+
subdomain: this.accountId,
|
|
1097
|
+
api: guardian
|
|
1098
|
+
})).account;
|
|
1099
|
+
}
|
|
1093
1100
|
if (!this.loadCancelled) {
|
|
1094
1101
|
// Set the calculated base url.
|
|
1095
1102
|
// If this is not available then this is considered a critical failure.
|
|
@@ -11172,6 +11179,10 @@ var ProjectView;
|
|
|
11172
11179
|
if (!api) {
|
|
11173
11180
|
api = ENVIRONMENT.Api().GetBruceApi();
|
|
11174
11181
|
}
|
|
11182
|
+
// Same thing but keeps cache keys consistent.
|
|
11183
|
+
if (expand === true) {
|
|
11184
|
+
expand = "*";
|
|
11185
|
+
}
|
|
11175
11186
|
const key = GetCacheKey(viewId, bookmarkId, expand);
|
|
11176
11187
|
const cache = api.GetCacheItem(key, reqParams);
|
|
11177
11188
|
if (cache === null || cache === void 0 ? void 0 : cache.found) {
|
|
@@ -11183,8 +11194,14 @@ var ProjectView;
|
|
|
11183
11194
|
if (viewId) {
|
|
11184
11195
|
url += viewId;
|
|
11185
11196
|
}
|
|
11186
|
-
|
|
11197
|
+
let added = false;
|
|
11198
|
+
if (bookmarkId) {
|
|
11187
11199
|
url += "?SlideID=" + encodeURIComponent(bookmarkId);
|
|
11200
|
+
added = true;
|
|
11201
|
+
}
|
|
11202
|
+
if (expand) {
|
|
11203
|
+
url += (added ? "&" : "?") + "Expand=" + encodeURIComponent(expand);
|
|
11204
|
+
added = true;
|
|
11188
11205
|
}
|
|
11189
11206
|
const data = yield api.GET(url, Api.PrepReqParams(reqParams));
|
|
11190
11207
|
res({
|
|
@@ -16442,7 +16459,7 @@ var Tracking;
|
|
|
16442
16459
|
})(Tracking || (Tracking = {}));
|
|
16443
16460
|
|
|
16444
16461
|
// This is updated with the package.json version on build.
|
|
16445
|
-
const VERSION = "6.7.
|
|
16462
|
+
const VERSION = "6.7.7";
|
|
16446
16463
|
|
|
16447
16464
|
export { VERSION, Assembly, AnnDocument, CustomForm, AbstractApi, Api, BruceApi, GlobalApi, GuardianApi, ApiGetters, Calculator, Bounds, BruceEvent, CacheControl, Camera, Cartes, Carto, Color, DelayQueue, Geometry, UTC, BruceVariable, LRUCache, GeoJson, EntityAttachmentType, EntityAttachment, EntityComment, EntityLink, EntityLod, EntityLodCategory, EntityRelationType, EntityRelation, EntitySource, EntityTag, EntityType, Entity, EntityCoords, EntityAttribute, EntityHistoricData, EntityTableView, Comment, ClientFile, ProgramKey, ZoomControl, MenuItem, ProjectViewBookmark, ProjectView, ProjectViewLegacyTile, ProjectViewTile, ProjectViewLegacy, ProjectViewLegacyBookmark, ProjectViewBookmarkGroup, PendingAction, MessageBroker, HostingLocation, Style, Tileset, Permission, Session, UserGroup, User, UserMfaMethod, Account, AccountInvite, AccountFeatures, AccountLimits, AccountTemplate, AccountType, EncryptUtils, MathUtils, ObjectUtils, PathUtils, UrlUtils, DataLab, DataLabGroup, ImportAssembly, ImportCad, ImportCsv, ImportJson, ImportGeoJson, ImportKml, ImportedFile, ExportBrz, ExportUsd, Markup, Uploader, Plugin, ENVIRONMENT, DataSource, Scenario, Tracking };
|
|
16448
16465
|
//# sourceMappingURL=bruce-models.es5.js.map
|