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.umd.js
CHANGED
|
@@ -2442,17 +2442,21 @@
|
|
|
2442
2442
|
*/
|
|
2443
2443
|
function GetList(params) {
|
|
2444
2444
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2445
|
-
let { api, req: reqParams } = params;
|
|
2445
|
+
let { api, req: reqParams, parentTypeId } = params;
|
|
2446
2446
|
if (!api) {
|
|
2447
2447
|
api = exports.ENVIRONMENT.Api().GetBruceApi();
|
|
2448
2448
|
}
|
|
2449
|
-
const cache = yield api.GetCacheItem(GetListCacheKey(), reqParams);
|
|
2449
|
+
const cache = parentTypeId ? null : yield api.GetCacheItem(GetListCacheKey(), reqParams);
|
|
2450
2450
|
if (cache === null || cache === void 0 ? void 0 : cache.found) {
|
|
2451
2451
|
return cache.data;
|
|
2452
2452
|
}
|
|
2453
2453
|
const req = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
|
|
2454
2454
|
try {
|
|
2455
|
-
const
|
|
2455
|
+
const urlParams = new URLSearchParams();
|
|
2456
|
+
if (parentTypeId) {
|
|
2457
|
+
urlParams.append("parentEntityTypeID", parentTypeId);
|
|
2458
|
+
}
|
|
2459
|
+
const data = yield api.GET("entitytypes?" + urlParams.toString(), exports.Api.PrepReqParams(reqParams));
|
|
2456
2460
|
res({
|
|
2457
2461
|
entityTypes: data.Items
|
|
2458
2462
|
});
|
|
@@ -2461,12 +2465,14 @@
|
|
|
2461
2465
|
rej(e);
|
|
2462
2466
|
}
|
|
2463
2467
|
}));
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2468
|
+
if (!parentTypeId) {
|
|
2469
|
+
yield api.SetCacheItem({
|
|
2470
|
+
key: GetListCacheKey(),
|
|
2471
|
+
value: req,
|
|
2472
|
+
req: reqParams,
|
|
2473
|
+
duration: 60 * 5 // 5 minutes.
|
|
2474
|
+
});
|
|
2475
|
+
}
|
|
2470
2476
|
return req;
|
|
2471
2477
|
});
|
|
2472
2478
|
}
|
|
@@ -7712,7 +7718,9 @@
|
|
|
7712
7718
|
}
|
|
7713
7719
|
const isNew = !data.ID;
|
|
7714
7720
|
if (!data.ID) {
|
|
7715
|
-
|
|
7721
|
+
// Short ID to keep the URL short.
|
|
7722
|
+
// 8 length = 4,294,967,296 combinations.
|
|
7723
|
+
data.ID = exports.ObjectUtils.UId(8);
|
|
7716
7724
|
}
|
|
7717
7725
|
if (!data.Name) {
|
|
7718
7726
|
data.Name = data.ID;
|
|
@@ -10221,7 +10229,7 @@
|
|
|
10221
10229
|
DataSource.GetList = GetList;
|
|
10222
10230
|
})(exports.DataSource || (exports.DataSource = {}));
|
|
10223
10231
|
|
|
10224
|
-
const VERSION = "3.2.
|
|
10232
|
+
const VERSION = "3.2.4";
|
|
10225
10233
|
|
|
10226
10234
|
exports.VERSION = VERSION;
|
|
10227
10235
|
exports.AbstractApi = AbstractApi;
|