bruce-models 4.9.6 → 4.9.8
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 +43 -6
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +43 -6
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/bruce-models.js +1 -1
- package/dist/lib/entity/entity-attribute.js +2 -0
- package/dist/lib/entity/entity-attribute.js.map +1 -1
- package/dist/lib/entity/entity-type.js +40 -5
- package/dist/lib/entity/entity-type.js.map +1 -1
- package/dist/types/bruce-models.d.ts +1 -1
- package/dist/types/entity/entity-attribute.d.ts +2 -1
- package/dist/types/entity/entity-type.d.ts +8 -1
- package/package.json +1 -1
package/dist/bruce-models.es5.js
CHANGED
|
@@ -2295,6 +2295,8 @@ var EntityAttribute;
|
|
|
2295
2295
|
EType["Geometry"] = "Geometry";
|
|
2296
2296
|
// True/false attribute.
|
|
2297
2297
|
EType["Boolean"] = "Boolean";
|
|
2298
|
+
// String User ID.
|
|
2299
|
+
EType["User"] = "User";
|
|
2298
2300
|
})(EType = EntityAttribute.EType || (EntityAttribute.EType = {}));
|
|
2299
2301
|
/**
|
|
2300
2302
|
* Returns an attribute from a provided hierarchy of attributes.
|
|
@@ -2456,11 +2458,16 @@ var EntityType;
|
|
|
2456
2458
|
*/
|
|
2457
2459
|
function GetList(params) {
|
|
2458
2460
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2459
|
-
let { entityTypeIds, api, req: reqParams, parentTypeId } = params;
|
|
2461
|
+
let { entityTypeIds, api, req: reqParams, parentTypeId, expandSettings, search } = params;
|
|
2460
2462
|
if (!api) {
|
|
2461
2463
|
api = ENVIRONMENT.Api().GetBruceApi();
|
|
2462
2464
|
}
|
|
2463
|
-
const cache =
|
|
2465
|
+
const cache = yield api.GetCacheItem(GetListCacheKey({
|
|
2466
|
+
typeIds: entityTypeIds,
|
|
2467
|
+
parentTypeId,
|
|
2468
|
+
expandSettings,
|
|
2469
|
+
search
|
|
2470
|
+
}), reqParams);
|
|
2464
2471
|
if (cache === null || cache === void 0 ? void 0 : cache.found) {
|
|
2465
2472
|
return cache.data;
|
|
2466
2473
|
}
|
|
@@ -2479,6 +2486,12 @@ var EntityType;
|
|
|
2479
2486
|
if (parentTypeId) {
|
|
2480
2487
|
urlParams.append("parentEntityTypeID", parentTypeId);
|
|
2481
2488
|
}
|
|
2489
|
+
if (expandSettings) {
|
|
2490
|
+
urlParams.append("expandSettings", "true");
|
|
2491
|
+
}
|
|
2492
|
+
if (search) {
|
|
2493
|
+
urlParams.append("search", search);
|
|
2494
|
+
}
|
|
2482
2495
|
reqs.push(api.GET("entitytypes?" + urlParams.toString(), Api.PrepReqParams(reqParams)));
|
|
2483
2496
|
}
|
|
2484
2497
|
}
|
|
@@ -2487,6 +2500,12 @@ var EntityType;
|
|
|
2487
2500
|
if (parentTypeId) {
|
|
2488
2501
|
urlParams.append("parentEntityTypeID", parentTypeId);
|
|
2489
2502
|
}
|
|
2503
|
+
if (expandSettings) {
|
|
2504
|
+
urlParams.append("expandSettings", "true");
|
|
2505
|
+
}
|
|
2506
|
+
if (search) {
|
|
2507
|
+
urlParams.append("search", search);
|
|
2508
|
+
}
|
|
2490
2509
|
reqs.push(api.GET("entitytypes?" + urlParams.toString(), Api.PrepReqParams(reqParams)));
|
|
2491
2510
|
}
|
|
2492
2511
|
const data = yield Promise.all(reqs);
|
|
@@ -2510,7 +2529,12 @@ var EntityType;
|
|
|
2510
2529
|
}));
|
|
2511
2530
|
if (!parentTypeId) {
|
|
2512
2531
|
yield api.SetCacheItem({
|
|
2513
|
-
key: GetListCacheKey(
|
|
2532
|
+
key: GetListCacheKey({
|
|
2533
|
+
typeIds: entityTypeIds,
|
|
2534
|
+
parentTypeId,
|
|
2535
|
+
expandSettings,
|
|
2536
|
+
search
|
|
2537
|
+
}),
|
|
2514
2538
|
value: req,
|
|
2515
2539
|
req: reqParams,
|
|
2516
2540
|
duration: 60 * 5 // 5 minutes.
|
|
@@ -2624,11 +2648,24 @@ var EntityType;
|
|
|
2624
2648
|
* @param typeIds
|
|
2625
2649
|
* @returns
|
|
2626
2650
|
*/
|
|
2627
|
-
function GetListCacheKey(
|
|
2651
|
+
function GetListCacheKey(params) {
|
|
2652
|
+
if (!params) {
|
|
2653
|
+
params = {};
|
|
2654
|
+
}
|
|
2655
|
+
let { typeIds, expandSettings, parentTypeId, search } = params;
|
|
2656
|
+
let key = Api.ECacheKey.EntityType;
|
|
2628
2657
|
if (!typeIds) {
|
|
2629
2658
|
typeIds = [];
|
|
2630
2659
|
}
|
|
2631
|
-
|
|
2660
|
+
key += (typeIds.length ? Api.ECacheKey.Id : "") + typeIds.join(",");
|
|
2661
|
+
if (parentTypeId) {
|
|
2662
|
+
key += "_PARENT_" + parentTypeId;
|
|
2663
|
+
}
|
|
2664
|
+
if (!expandSettings) {
|
|
2665
|
+
expandSettings = false;
|
|
2666
|
+
}
|
|
2667
|
+
key += "_EXPAND_" + expandSettings;
|
|
2668
|
+
return key;
|
|
2632
2669
|
}
|
|
2633
2670
|
EntityType.GetListCacheKey = GetListCacheKey;
|
|
2634
2671
|
})(EntityType || (EntityType = {}));
|
|
@@ -14362,7 +14399,7 @@ var DataSource;
|
|
|
14362
14399
|
})(DataSource || (DataSource = {}));
|
|
14363
14400
|
|
|
14364
14401
|
// This is updated with the package.json version on build.
|
|
14365
|
-
const VERSION = "4.9.
|
|
14402
|
+
const VERSION = "4.9.8";
|
|
14366
14403
|
|
|
14367
14404
|
export { VERSION, 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, EntityTypeVisualSettings, EntityAttribute, EntityHistoricData, EntityTableView, 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, ImportAssembly, ImportCad, ImportCsv, ImportJson, ImportGeoJson, ImportKml, ImportedFile, Markup, Uploader, Plugin, ENVIRONMENT, DataSource };
|
|
14368
14405
|
//# sourceMappingURL=bruce-models.es5.js.map
|