bruce-models 3.2.2 → 3.2.4
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 +19 -11
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +19 -11
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/bruce-models.js +1 -1
- package/dist/lib/entity/entity-type.js +15 -9
- package/dist/lib/entity/entity-type.js.map +1 -1
- package/dist/lib/project/project-view.js +3 -1
- package/dist/lib/project/project-view.js.map +1 -1
- package/dist/types/bruce-models.d.ts +1 -1
- package/dist/types/entity/entity-type.d.ts +1 -0
- package/package.json +1 -1
package/dist/bruce-models.es5.js
CHANGED
|
@@ -2486,17 +2486,21 @@ var EntityType;
|
|
|
2486
2486
|
*/
|
|
2487
2487
|
function GetList(params) {
|
|
2488
2488
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2489
|
-
let { api, req: reqParams } = params;
|
|
2489
|
+
let { api, req: reqParams, parentTypeId } = params;
|
|
2490
2490
|
if (!api) {
|
|
2491
2491
|
api = ENVIRONMENT.Api().GetBruceApi();
|
|
2492
2492
|
}
|
|
2493
|
-
const cache = yield api.GetCacheItem(GetListCacheKey(), reqParams);
|
|
2493
|
+
const cache = parentTypeId ? null : yield api.GetCacheItem(GetListCacheKey(), reqParams);
|
|
2494
2494
|
if (cache === null || cache === void 0 ? void 0 : cache.found) {
|
|
2495
2495
|
return cache.data;
|
|
2496
2496
|
}
|
|
2497
2497
|
const req = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
|
|
2498
2498
|
try {
|
|
2499
|
-
const
|
|
2499
|
+
const urlParams = new URLSearchParams();
|
|
2500
|
+
if (parentTypeId) {
|
|
2501
|
+
urlParams.append("parentEntityTypeID", parentTypeId);
|
|
2502
|
+
}
|
|
2503
|
+
const data = yield api.GET("entitytypes?" + urlParams.toString(), Api.PrepReqParams(reqParams));
|
|
2500
2504
|
res({
|
|
2501
2505
|
entityTypes: data.Items
|
|
2502
2506
|
});
|
|
@@ -2505,12 +2509,14 @@ var EntityType;
|
|
|
2505
2509
|
rej(e);
|
|
2506
2510
|
}
|
|
2507
2511
|
}));
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2512
|
+
if (!parentTypeId) {
|
|
2513
|
+
yield api.SetCacheItem({
|
|
2514
|
+
key: GetListCacheKey(),
|
|
2515
|
+
value: req,
|
|
2516
|
+
req: reqParams,
|
|
2517
|
+
duration: 60 * 5 // 5 minutes.
|
|
2518
|
+
});
|
|
2519
|
+
}
|
|
2514
2520
|
return req;
|
|
2515
2521
|
});
|
|
2516
2522
|
}
|
|
@@ -7893,7 +7899,9 @@ var ProjectView;
|
|
|
7893
7899
|
}
|
|
7894
7900
|
const isNew = !data.ID;
|
|
7895
7901
|
if (!data.ID) {
|
|
7896
|
-
|
|
7902
|
+
// Short ID to keep the URL short.
|
|
7903
|
+
// 8 length = 4,294,967,296 combinations.
|
|
7904
|
+
data.ID = ObjectUtils.UId(8);
|
|
7897
7905
|
}
|
|
7898
7906
|
if (!data.Name) {
|
|
7899
7907
|
data.Name = data.ID;
|
|
@@ -10474,7 +10482,7 @@ var DataSource;
|
|
|
10474
10482
|
DataSource.GetList = GetList;
|
|
10475
10483
|
})(DataSource || (DataSource = {}));
|
|
10476
10484
|
|
|
10477
|
-
const VERSION = "3.2.
|
|
10485
|
+
const VERSION = "3.2.4";
|
|
10478
10486
|
|
|
10479
10487
|
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, ClientFile, ProgramKey, ZoomControl, MenuItem, ProjectViewBookmark, ProjectView, ProjectViewLegacyTile, ProjectViewTile, ProjectViewLegacy, ProjectViewLegacyBookmark, PendingAction, MessageBroker, HostingLocation, Style, Tileset, Permission, Session, UserGroup, User, Account, AccountInvite, EncryptUtils, MathUtils, ObjectUtils, PathUtils, UrlUtils, DataLab, ImportCad, ImportCsv, ImportJson, ImportKml, ImportedFile, Markup, Uploader, Plugin, ENVIRONMENT, DataSource };
|
|
10480
10488
|
//# sourceMappingURL=bruce-models.es5.js.map
|