bruce-models 3.9.5 → 3.9.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 +30 -10
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +30 -10
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/bruce-models.js +1 -1
- package/dist/lib/entity/entity.js +29 -9
- package/dist/lib/entity/entity.js.map +1 -1
- package/dist/lib/project/menu-item.js.map +1 -1
- package/dist/types/bruce-models.d.ts +1 -1
- package/dist/types/entity/entity.d.ts +5 -0
- package/dist/types/project/menu-item.d.ts +1 -0
- package/dist/types/project/project-view-selection.d.ts +1 -0
- package/package.json +1 -1
package/dist/bruce-models.es5.js
CHANGED
|
@@ -3256,7 +3256,7 @@ var Entity;
|
|
|
3256
3256
|
*/
|
|
3257
3257
|
function Get(params) {
|
|
3258
3258
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3259
|
-
let { api, entityId, req: reqParams, expandLocation, expandRelations, entityTypeId, historicFrom, historicKey, historicTo, historicPoint } = params;
|
|
3259
|
+
let { api, entityId, schemaId, req: reqParams, expandLocation, expandRelations, entityTypeId, historicFrom, historicKey, historicTo, historicPoint } = params;
|
|
3260
3260
|
if (!entityId) {
|
|
3261
3261
|
throw ("Entity ID is required.");
|
|
3262
3262
|
}
|
|
@@ -3271,7 +3271,8 @@ var Entity;
|
|
|
3271
3271
|
historicFrom,
|
|
3272
3272
|
historicKey,
|
|
3273
3273
|
historicTo,
|
|
3274
|
-
historicPoint
|
|
3274
|
+
historicPoint,
|
|
3275
|
+
schemaId
|
|
3275
3276
|
});
|
|
3276
3277
|
const cache = api.GetCacheItem(key, reqParams);
|
|
3277
3278
|
if (cache === null || cache === void 0 ? void 0 : cache.found) {
|
|
@@ -3301,6 +3302,9 @@ var Entity;
|
|
|
3301
3302
|
if (historicPoint) {
|
|
3302
3303
|
urlParams.set("historicPoint", historicPoint);
|
|
3303
3304
|
}
|
|
3305
|
+
if (schemaId) {
|
|
3306
|
+
urlParams.set("schema", schemaId);
|
|
3307
|
+
}
|
|
3304
3308
|
const data = yield api.GET(`entity/${entityId}?${urlParams.toString()}`, Api.PrepReqParams(reqParams));
|
|
3305
3309
|
res({
|
|
3306
3310
|
entity: data
|
|
@@ -3326,7 +3330,7 @@ var Entity;
|
|
|
3326
3330
|
*/
|
|
3327
3331
|
function GetListByIds(params) {
|
|
3328
3332
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3329
|
-
let { api, entityIds, req: reqParams, expandRelations, expandLocation, historicFrom, historicKey, historicTo, historicPoint } = params;
|
|
3333
|
+
let { api, entityIds, schemaId, req: reqParams, expandRelations, expandLocation, historicFrom, historicKey, historicTo, historicPoint } = params;
|
|
3330
3334
|
if (!entityIds.length) {
|
|
3331
3335
|
throw ("Entity IDs are required.");
|
|
3332
3336
|
}
|
|
@@ -3372,9 +3376,14 @@ var Entity;
|
|
|
3372
3376
|
if (historicPoint) {
|
|
3373
3377
|
reqData["historicPoint"] = historicPoint;
|
|
3374
3378
|
}
|
|
3379
|
+
const urlParams = new URLSearchParams();
|
|
3380
|
+
if (schemaId) {
|
|
3381
|
+
urlParams.set("schema", schemaId);
|
|
3382
|
+
}
|
|
3383
|
+
const url = `entities?${urlParams.toString()}`;
|
|
3375
3384
|
const reqs = [];
|
|
3376
3385
|
if (reqIds.length > 0) {
|
|
3377
|
-
const req = api.POST(
|
|
3386
|
+
const req = api.POST(url, reqData, Api.PrepReqParams(reqParams));
|
|
3378
3387
|
for (let i = 0; i < reqIds.length; i++) {
|
|
3379
3388
|
const entityId = reqIds[i];
|
|
3380
3389
|
const key = GetCacheKey({
|
|
@@ -3385,7 +3394,8 @@ var Entity;
|
|
|
3385
3394
|
historicFrom: historicFrom,
|
|
3386
3395
|
historicKey: historicKey,
|
|
3387
3396
|
historicTo: historicTo,
|
|
3388
|
-
historicPoint: historicPoint
|
|
3397
|
+
historicPoint: historicPoint,
|
|
3398
|
+
schemaId: schemaId
|
|
3389
3399
|
});
|
|
3390
3400
|
const prom = new Promise((res) => __awaiter(this, void 0, void 0, function* () {
|
|
3391
3401
|
try {
|
|
@@ -3670,7 +3680,7 @@ var Entity;
|
|
|
3670
3680
|
function GetList(params) {
|
|
3671
3681
|
var _a;
|
|
3672
3682
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3673
|
-
let { api, filter, req: reqParams, viaCdn, viaCdnCacheToken, analysis, expandRelations, historicFrom, historicKey, historicTo, historicPoint } = params;
|
|
3683
|
+
let { api, filter, schemaId, req: reqParams, viaCdn, viaCdnCacheToken, analysis, expandRelations, historicFrom, historicKey, historicTo, historicPoint } = params;
|
|
3674
3684
|
if (!api) {
|
|
3675
3685
|
api = ENVIRONMENT.Api().GetBruceApi();
|
|
3676
3686
|
}
|
|
@@ -3763,6 +3773,9 @@ var Entity;
|
|
|
3763
3773
|
if (historicPoint) {
|
|
3764
3774
|
urlParams.set("historicPoint", historicPoint);
|
|
3765
3775
|
}
|
|
3776
|
+
if (schemaId) {
|
|
3777
|
+
urlParams.set("schema", schemaId);
|
|
3778
|
+
}
|
|
3766
3779
|
const urlStr = url.toString() + "?" + urlParams.toString();
|
|
3767
3780
|
const data = yield api.get(urlStr, Api.PrepReqParams(reqParams));
|
|
3768
3781
|
if (!analysis) {
|
|
@@ -3776,6 +3789,9 @@ var Entity;
|
|
|
3776
3789
|
if (expandRelations) {
|
|
3777
3790
|
urlParams.append("$expand", "relation");
|
|
3778
3791
|
}
|
|
3792
|
+
if (schemaId) {
|
|
3793
|
+
urlParams.set("schema", schemaId);
|
|
3794
|
+
}
|
|
3779
3795
|
const urlStr = url.toString() + "?" + urlParams.toString();
|
|
3780
3796
|
const data = yield api.post(urlStr, body, Api.PrepReqParams(reqParams));
|
|
3781
3797
|
if (!analysis) {
|
|
@@ -3792,7 +3808,8 @@ var Entity;
|
|
|
3792
3808
|
entityTypeId: filter.entityTypeId,
|
|
3793
3809
|
historicFrom: historicFrom,
|
|
3794
3810
|
historicKey: historicKey,
|
|
3795
|
-
historicTo: historicTo
|
|
3811
|
+
historicTo: historicTo,
|
|
3812
|
+
schemaId: schemaId
|
|
3796
3813
|
}),
|
|
3797
3814
|
value: {
|
|
3798
3815
|
entity: entity
|
|
@@ -3940,7 +3957,7 @@ var Entity;
|
|
|
3940
3957
|
* @returns
|
|
3941
3958
|
*/
|
|
3942
3959
|
function GetCacheKey(params) {
|
|
3943
|
-
let { entityId, entityTypeId, expandLocation, expandRelations, historicFrom, historicKey, historicTo, historicPoint } = params;
|
|
3960
|
+
let { entityId, entityTypeId, schemaId, expandLocation, expandRelations, historicFrom, historicKey, historicTo, historicPoint } = params;
|
|
3944
3961
|
if (!entityTypeId) {
|
|
3945
3962
|
entityTypeId = "";
|
|
3946
3963
|
}
|
|
@@ -3956,7 +3973,10 @@ var Entity;
|
|
|
3956
3973
|
if (!historicPoint) {
|
|
3957
3974
|
historicPoint = "";
|
|
3958
3975
|
}
|
|
3959
|
-
|
|
3976
|
+
if (!schemaId) {
|
|
3977
|
+
schemaId = "";
|
|
3978
|
+
}
|
|
3979
|
+
let key = `${Api.ECacheKey.Entity}${Api.ECacheKey.Id}${entityId}${String(entityTypeId)}${schemaId}`;
|
|
3960
3980
|
key += `${String(Boolean(expandLocation))}${String(Boolean(expandRelations))}`;
|
|
3961
3981
|
key += `${Api.ECacheKey.EntityHistoricData}${Api.ECacheKey.Id}${historicKey}-${historicFrom}-${historicTo}-${historicPoint}`;
|
|
3962
3982
|
return key;
|
|
@@ -11510,7 +11530,7 @@ var DataSource;
|
|
|
11510
11530
|
})(DataSource || (DataSource = {}));
|
|
11511
11531
|
|
|
11512
11532
|
// This is updated with the package.json version on build.
|
|
11513
|
-
const VERSION = "3.9.
|
|
11533
|
+
const VERSION = "3.9.7";
|
|
11514
11534
|
|
|
11515
11535
|
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, ClientFile, ProgramKey, ZoomControl, MenuItem, ProjectViewBookmark, ProjectView, ProjectViewLegacyTile, ProjectViewTile, ProjectViewLegacy, ProjectViewLegacyBookmark, PendingAction, MessageBroker, HostingLocation, Style, Tileset, Permission, Session, UserGroup, User, Account, AccountInvite, AccountFeatures, EncryptUtils, MathUtils, ObjectUtils, PathUtils, UrlUtils, DataLab, ImportCad, ImportCsv, ImportJson, ImportKml, ImportedFile, Markup, Uploader, Plugin, ENVIRONMENT, DataSource };
|
|
11516
11536
|
//# sourceMappingURL=bruce-models.es5.js.map
|