bruce-models 4.9.7 → 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 +41 -6
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +41 -6
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/bruce-models.js +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-type.d.ts +8 -1
- package/package.json +1 -1
package/dist/bruce-models.es5.js
CHANGED
|
@@ -2458,11 +2458,16 @@ var EntityType;
|
|
|
2458
2458
|
*/
|
|
2459
2459
|
function GetList(params) {
|
|
2460
2460
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2461
|
-
let { entityTypeIds, api, req: reqParams, parentTypeId } = params;
|
|
2461
|
+
let { entityTypeIds, api, req: reqParams, parentTypeId, expandSettings, search } = params;
|
|
2462
2462
|
if (!api) {
|
|
2463
2463
|
api = ENVIRONMENT.Api().GetBruceApi();
|
|
2464
2464
|
}
|
|
2465
|
-
const cache =
|
|
2465
|
+
const cache = yield api.GetCacheItem(GetListCacheKey({
|
|
2466
|
+
typeIds: entityTypeIds,
|
|
2467
|
+
parentTypeId,
|
|
2468
|
+
expandSettings,
|
|
2469
|
+
search
|
|
2470
|
+
}), reqParams);
|
|
2466
2471
|
if (cache === null || cache === void 0 ? void 0 : cache.found) {
|
|
2467
2472
|
return cache.data;
|
|
2468
2473
|
}
|
|
@@ -2481,6 +2486,12 @@ var EntityType;
|
|
|
2481
2486
|
if (parentTypeId) {
|
|
2482
2487
|
urlParams.append("parentEntityTypeID", parentTypeId);
|
|
2483
2488
|
}
|
|
2489
|
+
if (expandSettings) {
|
|
2490
|
+
urlParams.append("expandSettings", "true");
|
|
2491
|
+
}
|
|
2492
|
+
if (search) {
|
|
2493
|
+
urlParams.append("search", search);
|
|
2494
|
+
}
|
|
2484
2495
|
reqs.push(api.GET("entitytypes?" + urlParams.toString(), Api.PrepReqParams(reqParams)));
|
|
2485
2496
|
}
|
|
2486
2497
|
}
|
|
@@ -2489,6 +2500,12 @@ var EntityType;
|
|
|
2489
2500
|
if (parentTypeId) {
|
|
2490
2501
|
urlParams.append("parentEntityTypeID", parentTypeId);
|
|
2491
2502
|
}
|
|
2503
|
+
if (expandSettings) {
|
|
2504
|
+
urlParams.append("expandSettings", "true");
|
|
2505
|
+
}
|
|
2506
|
+
if (search) {
|
|
2507
|
+
urlParams.append("search", search);
|
|
2508
|
+
}
|
|
2492
2509
|
reqs.push(api.GET("entitytypes?" + urlParams.toString(), Api.PrepReqParams(reqParams)));
|
|
2493
2510
|
}
|
|
2494
2511
|
const data = yield Promise.all(reqs);
|
|
@@ -2512,7 +2529,12 @@ var EntityType;
|
|
|
2512
2529
|
}));
|
|
2513
2530
|
if (!parentTypeId) {
|
|
2514
2531
|
yield api.SetCacheItem({
|
|
2515
|
-
key: GetListCacheKey(
|
|
2532
|
+
key: GetListCacheKey({
|
|
2533
|
+
typeIds: entityTypeIds,
|
|
2534
|
+
parentTypeId,
|
|
2535
|
+
expandSettings,
|
|
2536
|
+
search
|
|
2537
|
+
}),
|
|
2516
2538
|
value: req,
|
|
2517
2539
|
req: reqParams,
|
|
2518
2540
|
duration: 60 * 5 // 5 minutes.
|
|
@@ -2626,11 +2648,24 @@ var EntityType;
|
|
|
2626
2648
|
* @param typeIds
|
|
2627
2649
|
* @returns
|
|
2628
2650
|
*/
|
|
2629
|
-
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;
|
|
2630
2657
|
if (!typeIds) {
|
|
2631
2658
|
typeIds = [];
|
|
2632
2659
|
}
|
|
2633
|
-
|
|
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;
|
|
2634
2669
|
}
|
|
2635
2670
|
EntityType.GetListCacheKey = GetListCacheKey;
|
|
2636
2671
|
})(EntityType || (EntityType = {}));
|
|
@@ -14364,7 +14399,7 @@ var DataSource;
|
|
|
14364
14399
|
})(DataSource || (DataSource = {}));
|
|
14365
14400
|
|
|
14366
14401
|
// This is updated with the package.json version on build.
|
|
14367
|
-
const VERSION = "4.9.
|
|
14402
|
+
const VERSION = "4.9.8";
|
|
14368
14403
|
|
|
14369
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 };
|
|
14370
14405
|
//# sourceMappingURL=bruce-models.es5.js.map
|