bruce-models 6.7.3 → 6.7.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.
- package/dist/bruce-models.es5.js +34 -15
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +34 -15
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/bruce-models.js +1 -1
- package/dist/lib/project/project-view-bookmark.js +14 -4
- package/dist/lib/project/project-view-bookmark.js.map +1 -1
- package/dist/lib/project/project-view.js +19 -10
- package/dist/lib/project/project-view.js.map +1 -1
- package/dist/types/bruce-models.d.ts +1 -1
- package/dist/types/project/project-view-bookmark.d.ts +1 -1
- package/dist/types/project/project-view.d.ts +10 -3
- package/package.json +1 -1
package/dist/bruce-models.es5.js
CHANGED
|
@@ -10976,8 +10976,8 @@ var ProjectViewBookmark;
|
|
|
10976
10976
|
function Get(params) {
|
|
10977
10977
|
return __awaiter(this, void 0, void 0, function* () {
|
|
10978
10978
|
let { api, viewId, bookmarkId, req: reqParams } = params;
|
|
10979
|
-
if (!
|
|
10980
|
-
throw ("
|
|
10979
|
+
if (!bookmarkId) {
|
|
10980
|
+
throw ("Bookmark ID is required.");
|
|
10981
10981
|
}
|
|
10982
10982
|
if (!api) {
|
|
10983
10983
|
api = ENVIRONMENT.Api().GetBruceApi();
|
|
@@ -10989,7 +10989,14 @@ var ProjectViewBookmark;
|
|
|
10989
10989
|
}
|
|
10990
10990
|
const prom = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
|
|
10991
10991
|
try {
|
|
10992
|
-
|
|
10992
|
+
let url;
|
|
10993
|
+
if (viewId) {
|
|
10994
|
+
url = `ui.view/${viewId}/slide/${bookmarkId}`;
|
|
10995
|
+
}
|
|
10996
|
+
else {
|
|
10997
|
+
url = `slide/${bookmarkId}`;
|
|
10998
|
+
}
|
|
10999
|
+
const data = yield api.GET(url, Api.PrepReqParams(reqParams));
|
|
10993
11000
|
res({
|
|
10994
11001
|
bookmark: data
|
|
10995
11002
|
});
|
|
@@ -11127,7 +11134,10 @@ var ProjectViewBookmark;
|
|
|
11127
11134
|
* @returns
|
|
11128
11135
|
*/
|
|
11129
11136
|
function GetCacheKey(viewId, bookmarkId) {
|
|
11130
|
-
|
|
11137
|
+
if (viewId) {
|
|
11138
|
+
return `${Api.ECacheKey.ProjectViewBookmark}${Api.ECacheKey.Id}${viewId}${Api.ECacheKey.Id}${bookmarkId}`;
|
|
11139
|
+
}
|
|
11140
|
+
return `${Api.ECacheKey.ProjectViewBookmark}${Api.ECacheKey.Id}${bookmarkId}`;
|
|
11131
11141
|
}
|
|
11132
11142
|
ProjectViewBookmark.GetCacheKey = GetCacheKey;
|
|
11133
11143
|
})(ProjectViewBookmark || (ProjectViewBookmark = {}));
|
|
@@ -11155,21 +11165,28 @@ var ProjectView;
|
|
|
11155
11165
|
*/
|
|
11156
11166
|
function Get(params) {
|
|
11157
11167
|
return __awaiter(this, void 0, void 0, function* () {
|
|
11158
|
-
let { api, viewId, req: reqParams } = params;
|
|
11159
|
-
if (!viewId) {
|
|
11160
|
-
throw ("View ID is required.");
|
|
11168
|
+
let { api, viewId, bookmarkId, expand, req: reqParams } = params;
|
|
11169
|
+
if (!viewId && !bookmarkId) {
|
|
11170
|
+
throw ("View ID or Bookmark ID is required.");
|
|
11161
11171
|
}
|
|
11162
11172
|
if (!api) {
|
|
11163
11173
|
api = ENVIRONMENT.Api().GetBruceApi();
|
|
11164
11174
|
}
|
|
11165
|
-
const key = GetCacheKey(viewId);
|
|
11175
|
+
const key = GetCacheKey(viewId, bookmarkId, expand);
|
|
11166
11176
|
const cache = api.GetCacheItem(key, reqParams);
|
|
11167
11177
|
if (cache === null || cache === void 0 ? void 0 : cache.found) {
|
|
11168
11178
|
return cache.data;
|
|
11169
11179
|
}
|
|
11170
11180
|
const prom = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
|
|
11171
11181
|
try {
|
|
11172
|
-
|
|
11182
|
+
let url = "ui.view/";
|
|
11183
|
+
if (viewId) {
|
|
11184
|
+
url += viewId;
|
|
11185
|
+
}
|
|
11186
|
+
else if (bookmarkId) {
|
|
11187
|
+
url += "?SlideID=" + encodeURIComponent(bookmarkId);
|
|
11188
|
+
}
|
|
11189
|
+
const data = yield api.GET(url, Api.PrepReqParams(reqParams));
|
|
11173
11190
|
res({
|
|
11174
11191
|
view: data
|
|
11175
11192
|
});
|
|
@@ -11251,7 +11268,7 @@ var ProjectView;
|
|
|
11251
11268
|
api = ENVIRONMENT.Api().GetBruceApi();
|
|
11252
11269
|
}
|
|
11253
11270
|
yield api.DELETE(`ui.view/${viewId}`, Api.PrepReqParams(reqParams));
|
|
11254
|
-
api.Cache.
|
|
11271
|
+
api.Cache.RemoveByStartsWith(Api.ECacheKey.ProjectView);
|
|
11255
11272
|
});
|
|
11256
11273
|
}
|
|
11257
11274
|
ProjectView.Delete = Delete;
|
|
@@ -11287,7 +11304,7 @@ var ProjectView;
|
|
|
11287
11304
|
else {
|
|
11288
11305
|
data = yield api.PUT(`ui.view/${data.ID}`, data, Api.PrepReqParams(reqParams));
|
|
11289
11306
|
}
|
|
11290
|
-
api.Cache.
|
|
11307
|
+
api.Cache.RemoveByStartsWith(Api.ECacheKey.ProjectView);
|
|
11291
11308
|
return {
|
|
11292
11309
|
view: data
|
|
11293
11310
|
};
|
|
@@ -11301,11 +11318,13 @@ var ProjectView;
|
|
|
11301
11318
|
* const key = GetCacheKey("abc");
|
|
11302
11319
|
* api.Cache.Remove(key);
|
|
11303
11320
|
* }
|
|
11304
|
-
* @param viewId
|
|
11321
|
+
* @param viewId ID of the project view to get.
|
|
11322
|
+
* @param bookmarkId Optional bookmark ID related to the view we want to find.
|
|
11323
|
+
* @param expand Optional expand parameter.
|
|
11305
11324
|
* @returns
|
|
11306
11325
|
*/
|
|
11307
|
-
function GetCacheKey(viewId) {
|
|
11308
|
-
return `${Api.ECacheKey.ProjectView}${Api.ECacheKey.Id}${viewId}`;
|
|
11326
|
+
function GetCacheKey(viewId, bookmarkId, expand) {
|
|
11327
|
+
return `${Api.ECacheKey.ProjectView}${Api.ECacheKey.Id}${viewId || ""}${Api.ECacheKey.ProjectViewBookmark}${bookmarkId || ""}${Api.ECacheKey.Id}${expand ? (expand === true ? "true" : expand) : "false"}`;
|
|
11309
11328
|
}
|
|
11310
11329
|
ProjectView.GetCacheKey = GetCacheKey;
|
|
11311
11330
|
})(ProjectView || (ProjectView = {}));
|
|
@@ -16423,7 +16442,7 @@ var Tracking;
|
|
|
16423
16442
|
})(Tracking || (Tracking = {}));
|
|
16424
16443
|
|
|
16425
16444
|
// This is updated with the package.json version on build.
|
|
16426
|
-
const VERSION = "6.7.
|
|
16445
|
+
const VERSION = "6.7.5";
|
|
16427
16446
|
|
|
16428
16447
|
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 };
|
|
16429
16448
|
//# sourceMappingURL=bruce-models.es5.js.map
|