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.umd.js
CHANGED
|
@@ -2423,11 +2423,16 @@
|
|
|
2423
2423
|
*/
|
|
2424
2424
|
function GetList(params) {
|
|
2425
2425
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2426
|
-
let { entityTypeIds, api, req: reqParams, parentTypeId } = params;
|
|
2426
|
+
let { entityTypeIds, api, req: reqParams, parentTypeId, expandSettings, search } = params;
|
|
2427
2427
|
if (!api) {
|
|
2428
2428
|
api = exports.ENVIRONMENT.Api().GetBruceApi();
|
|
2429
2429
|
}
|
|
2430
|
-
const cache =
|
|
2430
|
+
const cache = yield api.GetCacheItem(GetListCacheKey({
|
|
2431
|
+
typeIds: entityTypeIds,
|
|
2432
|
+
parentTypeId,
|
|
2433
|
+
expandSettings,
|
|
2434
|
+
search
|
|
2435
|
+
}), reqParams);
|
|
2431
2436
|
if (cache === null || cache === void 0 ? void 0 : cache.found) {
|
|
2432
2437
|
return cache.data;
|
|
2433
2438
|
}
|
|
@@ -2446,6 +2451,12 @@
|
|
|
2446
2451
|
if (parentTypeId) {
|
|
2447
2452
|
urlParams.append("parentEntityTypeID", parentTypeId);
|
|
2448
2453
|
}
|
|
2454
|
+
if (expandSettings) {
|
|
2455
|
+
urlParams.append("expandSettings", "true");
|
|
2456
|
+
}
|
|
2457
|
+
if (search) {
|
|
2458
|
+
urlParams.append("search", search);
|
|
2459
|
+
}
|
|
2449
2460
|
reqs.push(api.GET("entitytypes?" + urlParams.toString(), exports.Api.PrepReqParams(reqParams)));
|
|
2450
2461
|
}
|
|
2451
2462
|
}
|
|
@@ -2454,6 +2465,12 @@
|
|
|
2454
2465
|
if (parentTypeId) {
|
|
2455
2466
|
urlParams.append("parentEntityTypeID", parentTypeId);
|
|
2456
2467
|
}
|
|
2468
|
+
if (expandSettings) {
|
|
2469
|
+
urlParams.append("expandSettings", "true");
|
|
2470
|
+
}
|
|
2471
|
+
if (search) {
|
|
2472
|
+
urlParams.append("search", search);
|
|
2473
|
+
}
|
|
2457
2474
|
reqs.push(api.GET("entitytypes?" + urlParams.toString(), exports.Api.PrepReqParams(reqParams)));
|
|
2458
2475
|
}
|
|
2459
2476
|
const data = yield Promise.all(reqs);
|
|
@@ -2477,7 +2494,12 @@
|
|
|
2477
2494
|
}));
|
|
2478
2495
|
if (!parentTypeId) {
|
|
2479
2496
|
yield api.SetCacheItem({
|
|
2480
|
-
key: GetListCacheKey(
|
|
2497
|
+
key: GetListCacheKey({
|
|
2498
|
+
typeIds: entityTypeIds,
|
|
2499
|
+
parentTypeId,
|
|
2500
|
+
expandSettings,
|
|
2501
|
+
search
|
|
2502
|
+
}),
|
|
2481
2503
|
value: req,
|
|
2482
2504
|
req: reqParams,
|
|
2483
2505
|
duration: 60 * 5 // 5 minutes.
|
|
@@ -2591,11 +2613,24 @@
|
|
|
2591
2613
|
* @param typeIds
|
|
2592
2614
|
* @returns
|
|
2593
2615
|
*/
|
|
2594
|
-
function GetListCacheKey(
|
|
2616
|
+
function GetListCacheKey(params) {
|
|
2617
|
+
if (!params) {
|
|
2618
|
+
params = {};
|
|
2619
|
+
}
|
|
2620
|
+
let { typeIds, expandSettings, parentTypeId, search } = params;
|
|
2621
|
+
let key = exports.Api.ECacheKey.EntityType;
|
|
2595
2622
|
if (!typeIds) {
|
|
2596
2623
|
typeIds = [];
|
|
2597
2624
|
}
|
|
2598
|
-
|
|
2625
|
+
key += (typeIds.length ? exports.Api.ECacheKey.Id : "") + typeIds.join(",");
|
|
2626
|
+
if (parentTypeId) {
|
|
2627
|
+
key += "_PARENT_" + parentTypeId;
|
|
2628
|
+
}
|
|
2629
|
+
if (!expandSettings) {
|
|
2630
|
+
expandSettings = false;
|
|
2631
|
+
}
|
|
2632
|
+
key += "_EXPAND_" + expandSettings;
|
|
2633
|
+
return key;
|
|
2599
2634
|
}
|
|
2600
2635
|
EntityType.GetListCacheKey = GetListCacheKey;
|
|
2601
2636
|
})(exports.EntityType || (exports.EntityType = {}));
|
|
@@ -14086,7 +14121,7 @@
|
|
|
14086
14121
|
})(exports.DataSource || (exports.DataSource = {}));
|
|
14087
14122
|
|
|
14088
14123
|
// This is updated with the package.json version on build.
|
|
14089
|
-
const VERSION = "4.9.
|
|
14124
|
+
const VERSION = "4.9.8";
|
|
14090
14125
|
|
|
14091
14126
|
exports.VERSION = VERSION;
|
|
14092
14127
|
exports.AbstractApi = AbstractApi;
|