bruce-models 2.1.9 → 2.2.1
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 +31 -0
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +31 -0
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/import/imported-file.js +31 -0
- package/dist/lib/import/imported-file.js.map +1 -1
- package/dist/lib/project/menu-item.js.map +1 -1
- package/dist/types/import/imported-file.d.ts +8 -0
- package/dist/types/project/menu-item.d.ts +7 -0
- package/package.json +1 -1
package/dist/bruce-models.es5.js
CHANGED
|
@@ -7625,6 +7625,10 @@ var ImportedFile;
|
|
|
7625
7625
|
return Api.ECacheKey.ImportedFile + Api.ECacheKey.Id + fileId;
|
|
7626
7626
|
}
|
|
7627
7627
|
ImportedFile.GetCacheKey = GetCacheKey;
|
|
7628
|
+
function GetCacheKeyByRootId(rootId) {
|
|
7629
|
+
return Api.ECacheKey.ImportedFile + Api.ECacheKey.Id + rootId;
|
|
7630
|
+
}
|
|
7631
|
+
ImportedFile.GetCacheKeyByRootId = GetCacheKeyByRootId;
|
|
7628
7632
|
function GetListCacheKey(type, pageIndex) {
|
|
7629
7633
|
return Api.ECacheKey.ImportedFile + type + pageIndex;
|
|
7630
7634
|
}
|
|
@@ -7677,6 +7681,33 @@ var ImportedFile;
|
|
|
7677
7681
|
});
|
|
7678
7682
|
}
|
|
7679
7683
|
ImportedFile.GetList = GetList;
|
|
7684
|
+
function GetListByRootId(params) {
|
|
7685
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
7686
|
+
const { api, rootId, req: reqParams } = params;
|
|
7687
|
+
const cacheData = yield api.GetCacheItem(GetCacheKeyByRootId(rootId), reqParams);
|
|
7688
|
+
if (cacheData) {
|
|
7689
|
+
return cacheData;
|
|
7690
|
+
}
|
|
7691
|
+
const prom = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
|
|
7692
|
+
try {
|
|
7693
|
+
const data = yield api.GET(`entityImportFiles?Entity.ID=${rootId}`, Api.PrepReqParams(reqParams));
|
|
7694
|
+
res({
|
|
7695
|
+
importedFiles: data.Items
|
|
7696
|
+
});
|
|
7697
|
+
}
|
|
7698
|
+
catch (e) {
|
|
7699
|
+
rej(e);
|
|
7700
|
+
}
|
|
7701
|
+
}));
|
|
7702
|
+
yield api.SetCacheItem({
|
|
7703
|
+
key: GetCacheKeyByRootId(rootId),
|
|
7704
|
+
value: prom,
|
|
7705
|
+
req: reqParams
|
|
7706
|
+
});
|
|
7707
|
+
return prom;
|
|
7708
|
+
});
|
|
7709
|
+
}
|
|
7710
|
+
ImportedFile.GetListByRootId = GetListByRootId;
|
|
7680
7711
|
function Get(params) {
|
|
7681
7712
|
return __awaiter(this, void 0, void 0, function* () {
|
|
7682
7713
|
const { api, importedFileId: fileId, req: reqParams } = params;
|