bruce-models 4.1.7 → 4.1.9
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 +57 -12
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +57 -12
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/bruce-models.js +1 -1
- package/dist/lib/entity/entity.js +52 -10
- package/dist/lib/entity/entity.js.map +1 -1
- package/dist/lib/tileset/tileset.js +4 -1
- package/dist/lib/tileset/tileset.js.map +1 -1
- package/dist/types/bruce-models.d.ts +1 -1
- package/dist/types/entity/entity.d.ts +4 -0
- package/package.json +1 -1
package/dist/bruce-models.es5.js
CHANGED
|
@@ -3307,11 +3307,18 @@ var Entity;
|
|
|
3307
3307
|
const prom = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
|
|
3308
3308
|
try {
|
|
3309
3309
|
const urlParams = new URLSearchParams();
|
|
3310
|
+
let expand;
|
|
3310
3311
|
if (expandLocation) {
|
|
3311
|
-
|
|
3312
|
+
expand = "location";
|
|
3312
3313
|
}
|
|
3313
3314
|
if (expandRelations) {
|
|
3314
|
-
|
|
3315
|
+
if (expand) {
|
|
3316
|
+
expand += ",";
|
|
3317
|
+
}
|
|
3318
|
+
expand += "relation";
|
|
3319
|
+
}
|
|
3320
|
+
if (expand) {
|
|
3321
|
+
urlParams.append("$expand", expand);
|
|
3315
3322
|
}
|
|
3316
3323
|
if (entityTypeId) {
|
|
3317
3324
|
urlParams.append("BruceEntityType", entityTypeId);
|
|
@@ -3356,7 +3363,7 @@ var Entity;
|
|
|
3356
3363
|
*/
|
|
3357
3364
|
function GetListByIds(params) {
|
|
3358
3365
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3359
|
-
let { api, entityIds, schemaId, req: reqParams, expandRelations, expandLocation, historicFrom, historicKey, historicTo, historicPoint } = params;
|
|
3366
|
+
let { api, entityIds, schemaId, req: reqParams, expandRelations, expandLocation, historicFrom, historicKey, historicTo, historicPoint, expandSources } = params;
|
|
3360
3367
|
if (!entityIds.length) {
|
|
3361
3368
|
throw ("Entity IDs are required.");
|
|
3362
3369
|
}
|
|
@@ -3387,8 +3394,16 @@ var Entity;
|
|
|
3387
3394
|
if (expandRelations) {
|
|
3388
3395
|
reqData["Expand"] = "relation";
|
|
3389
3396
|
}
|
|
3390
|
-
|
|
3391
|
-
reqData["Expand"]
|
|
3397
|
+
if (expandLocation) {
|
|
3398
|
+
if (reqData["Expand"]) {
|
|
3399
|
+
reqData["Expand"] += ",location";
|
|
3400
|
+
}
|
|
3401
|
+
else {
|
|
3402
|
+
reqData["Expand"] = "location";
|
|
3403
|
+
}
|
|
3404
|
+
}
|
|
3405
|
+
if (expandSources) {
|
|
3406
|
+
reqData["ExpandSources"] = true;
|
|
3392
3407
|
}
|
|
3393
3408
|
if (historicKey) {
|
|
3394
3409
|
reqData["historicKey"] = historicKey;
|
|
@@ -3416,6 +3431,7 @@ var Entity;
|
|
|
3416
3431
|
entityId,
|
|
3417
3432
|
expandLocation,
|
|
3418
3433
|
expandRelations,
|
|
3434
|
+
expandSources,
|
|
3419
3435
|
entityTypeId: null,
|
|
3420
3436
|
historicFrom: historicFrom,
|
|
3421
3437
|
historicKey: historicKey,
|
|
@@ -3706,7 +3722,7 @@ var Entity;
|
|
|
3706
3722
|
function GetList(params) {
|
|
3707
3723
|
var _a;
|
|
3708
3724
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3709
|
-
let { api, filter, schemaId, req: reqParams, viaCdn, viaCdnCacheToken, analysis, expandRelations, historicFrom, historicKey, historicTo, historicPoint } = params;
|
|
3725
|
+
let { api, filter, schemaId, req: reqParams, viaCdn, viaCdnCacheToken, analysis, expandRelations, historicFrom, historicKey, historicTo, historicPoint, expandLocation, expandSources } = params;
|
|
3710
3726
|
if (!api) {
|
|
3711
3727
|
api = ENVIRONMENT.Api().GetBruceApi();
|
|
3712
3728
|
}
|
|
@@ -3746,8 +3762,24 @@ var Entity;
|
|
|
3746
3762
|
historicKey: historicKey,
|
|
3747
3763
|
historicFrom: historicFrom,
|
|
3748
3764
|
historicTo: historicTo,
|
|
3749
|
-
historicPoint: historicPoint
|
|
3765
|
+
historicPoint: historicPoint,
|
|
3766
|
+
ExpandSources: expandSources
|
|
3750
3767
|
};
|
|
3768
|
+
if (expandLocation || expandRelations) {
|
|
3769
|
+
let expand = "";
|
|
3770
|
+
if (expandLocation) {
|
|
3771
|
+
expand += "location";
|
|
3772
|
+
}
|
|
3773
|
+
if (expandRelations) {
|
|
3774
|
+
if (expand) {
|
|
3775
|
+
expand += ",";
|
|
3776
|
+
}
|
|
3777
|
+
expand += "relation";
|
|
3778
|
+
}
|
|
3779
|
+
if (expand) {
|
|
3780
|
+
body["Expand"] = expand;
|
|
3781
|
+
}
|
|
3782
|
+
}
|
|
3751
3783
|
let totalCount;
|
|
3752
3784
|
let entities = [];
|
|
3753
3785
|
if (analysis || expandRelations || (viaCdn && api.EntityCdnUrl)) {
|
|
@@ -3787,6 +3819,12 @@ var Entity;
|
|
|
3787
3819
|
if (expandRelations) {
|
|
3788
3820
|
urlParams.append("$expand", "relation");
|
|
3789
3821
|
}
|
|
3822
|
+
if (expandLocation) {
|
|
3823
|
+
urlParams.append("$expand", "location");
|
|
3824
|
+
}
|
|
3825
|
+
if (expandSources) {
|
|
3826
|
+
urlParams.append("ExpandSources", "true");
|
|
3827
|
+
}
|
|
3790
3828
|
if (historicKey) {
|
|
3791
3829
|
urlParams.set("historicKey", historicKey);
|
|
3792
3830
|
}
|
|
@@ -3815,6 +3853,9 @@ var Entity;
|
|
|
3815
3853
|
if (expandRelations) {
|
|
3816
3854
|
urlParams.append("$expand", "relation");
|
|
3817
3855
|
}
|
|
3856
|
+
if (expandLocation) {
|
|
3857
|
+
urlParams.append("$expand", "location");
|
|
3858
|
+
}
|
|
3818
3859
|
if (schemaId) {
|
|
3819
3860
|
urlParams.set("schema", schemaId);
|
|
3820
3861
|
}
|
|
@@ -3830,7 +3871,8 @@ var Entity;
|
|
|
3830
3871
|
key: GetCacheKey({
|
|
3831
3872
|
entityId: id,
|
|
3832
3873
|
expandRelations,
|
|
3833
|
-
expandLocation
|
|
3874
|
+
expandLocation,
|
|
3875
|
+
expandSources,
|
|
3834
3876
|
entityTypeId: filter.entityTypeId,
|
|
3835
3877
|
historicFrom: historicFrom,
|
|
3836
3878
|
historicKey: historicKey,
|
|
@@ -3983,7 +4025,7 @@ var Entity;
|
|
|
3983
4025
|
* @returns
|
|
3984
4026
|
*/
|
|
3985
4027
|
function GetCacheKey(params) {
|
|
3986
|
-
let { entityId, entityTypeId, schemaId, expandLocation, expandRelations, historicFrom, historicKey, historicTo, historicPoint } = params;
|
|
4028
|
+
let { entityId, entityTypeId, schemaId, expandLocation, expandRelations, expandSources, historicFrom, historicKey, historicTo, historicPoint } = params;
|
|
3987
4029
|
if (!entityTypeId) {
|
|
3988
4030
|
entityTypeId = "";
|
|
3989
4031
|
}
|
|
@@ -4003,7 +4045,7 @@ var Entity;
|
|
|
4003
4045
|
schemaId = "";
|
|
4004
4046
|
}
|
|
4005
4047
|
let key = `${Api.ECacheKey.Entity}${Api.ECacheKey.Id}${entityId}${String(entityTypeId)}${schemaId}`;
|
|
4006
|
-
key += `${String(Boolean(expandLocation))}${String(Boolean(expandRelations))}`;
|
|
4048
|
+
key += `${String(Boolean(expandLocation))}${String(Boolean(expandRelations))}${String(Boolean(expandSources))}`;
|
|
4007
4049
|
key += `${Api.ECacheKey.EntityHistoricData}${Api.ECacheKey.Id}${historicKey}-${historicFrom}-${historicTo}-${historicPoint}`;
|
|
4008
4050
|
return key;
|
|
4009
4051
|
}
|
|
@@ -8915,7 +8957,10 @@ var Tileset;
|
|
|
8915
8957
|
yield api.POST(`ui.tileset/${data.id}`, legacy, Api.PrepReqParams(reqParams));
|
|
8916
8958
|
}
|
|
8917
8959
|
else {
|
|
8918
|
-
|
|
8960
|
+
// We avoid saving again if there are no settings and it is new.
|
|
8961
|
+
if (!isNew || (data.settings && Object.keys(data.settings).length > 0)) {
|
|
8962
|
+
yield api.POST(`tileset/update/${data.id}`, data, Api.PrepReqParams(reqParams));
|
|
8963
|
+
}
|
|
8919
8964
|
}
|
|
8920
8965
|
yield api.Cache.RemoveByStartsWith(Api.ECacheKey.Tileset + Api.ECacheKey.Id + data.id);
|
|
8921
8966
|
yield api.Cache.RemoveByStartsWith(Api.ECacheKey.Tileset);
|
|
@@ -13116,7 +13161,7 @@ var DataSource;
|
|
|
13116
13161
|
})(DataSource || (DataSource = {}));
|
|
13117
13162
|
|
|
13118
13163
|
// This is updated with the package.json version on build.
|
|
13119
|
-
const VERSION = "4.1.
|
|
13164
|
+
const VERSION = "4.1.9";
|
|
13120
13165
|
|
|
13121
13166
|
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 };
|
|
13122
13167
|
//# sourceMappingURL=bruce-models.es5.js.map
|