bruce-models 4.3.1 → 4.3.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.
- package/dist/bruce-models.es5.js +21 -10
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +21 -10
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/bruce-models.js +1 -1
- package/dist/lib/entity/entity-type.js +16 -7
- package/dist/lib/entity/entity-type.js.map +1 -1
- package/dist/lib/entity/entity.js +2 -1
- package/dist/lib/entity/entity.js.map +1 -1
- package/dist/lib/entity-type-model/comment.js +2 -1
- package/dist/lib/entity-type-model/comment.js.map +1 -1
- package/dist/types/bruce-models.d.ts +1 -1
- package/dist/types/entity/entity-type.d.ts +3 -1
- package/package.json +1 -1
package/dist/bruce-models.es5.js
CHANGED
|
@@ -2836,7 +2836,7 @@ var EntityType;
|
|
|
2836
2836
|
}
|
|
2837
2837
|
yield api.DELETE(`entitytype/${typeId}`, Api.PrepReqParams(reqParams));
|
|
2838
2838
|
api.Cache.Remove(GetCacheKey(typeId));
|
|
2839
|
-
api.Cache.
|
|
2839
|
+
api.Cache.RemoveByStartsWith(GetListCacheKey());
|
|
2840
2840
|
});
|
|
2841
2841
|
}
|
|
2842
2842
|
EntityType.Delete = Delete;
|
|
@@ -2847,11 +2847,11 @@ var EntityType;
|
|
|
2847
2847
|
*/
|
|
2848
2848
|
function GetList(params) {
|
|
2849
2849
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2850
|
-
let { api, req: reqParams, parentTypeId } = params;
|
|
2850
|
+
let { entityTypeIds, api, req: reqParams, parentTypeId } = params;
|
|
2851
2851
|
if (!api) {
|
|
2852
2852
|
api = ENVIRONMENT.Api().GetBruceApi();
|
|
2853
2853
|
}
|
|
2854
|
-
const cache = parentTypeId ? null : yield api.GetCacheItem(GetListCacheKey(), reqParams);
|
|
2854
|
+
const cache = parentTypeId ? null : yield api.GetCacheItem(GetListCacheKey(entityTypeIds), reqParams);
|
|
2855
2855
|
if (cache === null || cache === void 0 ? void 0 : cache.found) {
|
|
2856
2856
|
return cache.data;
|
|
2857
2857
|
}
|
|
@@ -2861,6 +2861,11 @@ var EntityType;
|
|
|
2861
2861
|
if (parentTypeId) {
|
|
2862
2862
|
urlParams.append("parentEntityTypeID", parentTypeId);
|
|
2863
2863
|
}
|
|
2864
|
+
if (entityTypeIds) {
|
|
2865
|
+
for (const id of entityTypeIds) {
|
|
2866
|
+
urlParams.append("typeId", id);
|
|
2867
|
+
}
|
|
2868
|
+
}
|
|
2864
2869
|
const data = yield api.GET("entitytypes?" + urlParams.toString(), Api.PrepReqParams(reqParams));
|
|
2865
2870
|
res({
|
|
2866
2871
|
entityTypes: data.Items
|
|
@@ -2872,7 +2877,7 @@ var EntityType;
|
|
|
2872
2877
|
}));
|
|
2873
2878
|
if (!parentTypeId) {
|
|
2874
2879
|
yield api.SetCacheItem({
|
|
2875
|
-
key: GetListCacheKey(),
|
|
2880
|
+
key: GetListCacheKey(entityTypeIds),
|
|
2876
2881
|
value: req,
|
|
2877
2882
|
req: reqParams,
|
|
2878
2883
|
duration: 60 * 5 // 5 minutes.
|
|
@@ -2904,7 +2909,7 @@ var EntityType;
|
|
|
2904
2909
|
}
|
|
2905
2910
|
const res = yield api.POST(`entitytype/${data.ID}`, data, Api.PrepReqParams(reqParams));
|
|
2906
2911
|
api.Cache.Remove(GetCacheKey(data.ID));
|
|
2907
|
-
api.Cache.
|
|
2912
|
+
api.Cache.RemoveByStartsWith(GetListCacheKey());
|
|
2908
2913
|
return {
|
|
2909
2914
|
entityType: res
|
|
2910
2915
|
};
|
|
@@ -2979,10 +2984,14 @@ var EntityType;
|
|
|
2979
2984
|
* const key = GetListCacheKey();
|
|
2980
2985
|
* api.Cache.Remove(key);
|
|
2981
2986
|
* }
|
|
2987
|
+
* @param typeIds
|
|
2982
2988
|
* @returns
|
|
2983
2989
|
*/
|
|
2984
|
-
function GetListCacheKey() {
|
|
2985
|
-
|
|
2990
|
+
function GetListCacheKey(typeIds) {
|
|
2991
|
+
if (!typeIds) {
|
|
2992
|
+
typeIds = [];
|
|
2993
|
+
}
|
|
2994
|
+
return Api.ECacheKey.EntityType + (typeIds.length ? Api.ECacheKey.Id : "") + typeIds.join(",");
|
|
2986
2995
|
}
|
|
2987
2996
|
EntityType.GetListCacheKey = GetListCacheKey;
|
|
2988
2997
|
})(EntityType || (EntityType = {}));
|
|
@@ -3804,7 +3813,8 @@ var Entity;
|
|
|
3804
3813
|
const { entity: data } = yield Get({
|
|
3805
3814
|
api,
|
|
3806
3815
|
entityId,
|
|
3807
|
-
entityTypeId: typeId
|
|
3816
|
+
entityTypeId: typeId,
|
|
3817
|
+
migrated: true
|
|
3808
3818
|
});
|
|
3809
3819
|
entity = data;
|
|
3810
3820
|
}
|
|
@@ -7651,7 +7661,8 @@ var Comment;
|
|
|
7651
7661
|
pageIndex: filter.index == null ? 0 : filter.index,
|
|
7652
7662
|
entityTypeConditions: reqFilter,
|
|
7653
7663
|
orderBy: "lastUpdateTime"
|
|
7654
|
-
}
|
|
7664
|
+
},
|
|
7665
|
+
migrated: true
|
|
7655
7666
|
})).entities;
|
|
7656
7667
|
return {
|
|
7657
7668
|
comments: records
|
|
@@ -13339,7 +13350,7 @@ var DataSource;
|
|
|
13339
13350
|
})(DataSource || (DataSource = {}));
|
|
13340
13351
|
|
|
13341
13352
|
// This is updated with the package.json version on build.
|
|
13342
|
-
const VERSION = "4.3.
|
|
13353
|
+
const VERSION = "4.3.3";
|
|
13343
13354
|
|
|
13344
13355
|
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 };
|
|
13345
13356
|
//# sourceMappingURL=bruce-models.es5.js.map
|