bruce-models 3.7.8 → 3.8.0
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 +25 -7
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +25 -7
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/ann-document/ann-document.js +24 -6
- package/dist/lib/ann-document/ann-document.js.map +1 -1
- package/dist/lib/bruce-models.js +1 -1
- package/dist/lib/project/menu-item.js.map +1 -1
- package/dist/types/ann-document/ann-document.d.ts +5 -1
- package/dist/types/bruce-models.d.ts +1 -1
- package/dist/types/project/menu-item.d.ts +1 -0
- package/package.json +1 -1
package/dist/bruce-models.umd.js
CHANGED
|
@@ -2050,20 +2050,30 @@
|
|
|
2050
2050
|
*/
|
|
2051
2051
|
function GetList(params) {
|
|
2052
2052
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2053
|
-
let { api, docType: type, req: reqParams } = params;
|
|
2053
|
+
let { api, docType: type, req: reqParams, entityId, expandSettings } = params;
|
|
2054
2054
|
if (!api) {
|
|
2055
2055
|
api = exports.ENVIRONMENT.Api().GetBruceApi();
|
|
2056
2056
|
}
|
|
2057
2057
|
if (!type) {
|
|
2058
2058
|
type = "";
|
|
2059
2059
|
}
|
|
2060
|
-
const cache = yield api.GetCacheItem(GetListCacheKey(type), reqParams);
|
|
2060
|
+
const cache = yield api.GetCacheItem(GetListCacheKey(type, entityId, expandSettings), reqParams);
|
|
2061
2061
|
if (cache === null || cache === void 0 ? void 0 : cache.found) {
|
|
2062
2062
|
return cache.data;
|
|
2063
2063
|
}
|
|
2064
2064
|
const req = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
|
|
2065
2065
|
try {
|
|
2066
|
-
const
|
|
2066
|
+
const urlParams = new URLSearchParams();
|
|
2067
|
+
if (type) {
|
|
2068
|
+
urlParams.append("type", type);
|
|
2069
|
+
}
|
|
2070
|
+
if (entityId) {
|
|
2071
|
+
urlParams.append("entityId", entityId);
|
|
2072
|
+
}
|
|
2073
|
+
if (expandSettings) {
|
|
2074
|
+
urlParams.append("expandSettings", "true");
|
|
2075
|
+
}
|
|
2076
|
+
const url = "documentViews" + `?${urlParams.toString()}`;
|
|
2067
2077
|
const data = yield api.GET(url, exports.Api.PrepReqParams(reqParams));
|
|
2068
2078
|
res({
|
|
2069
2079
|
documents: data.Items
|
|
@@ -2074,7 +2084,7 @@
|
|
|
2074
2084
|
}
|
|
2075
2085
|
}));
|
|
2076
2086
|
yield api.SetCacheItem({
|
|
2077
|
-
key: GetListCacheKey(type),
|
|
2087
|
+
key: GetListCacheKey(type, entityId, expandSettings),
|
|
2078
2088
|
value: req,
|
|
2079
2089
|
req: reqParams
|
|
2080
2090
|
});
|
|
@@ -2104,10 +2114,18 @@
|
|
|
2104
2114
|
* api.Cache.Remove(key);
|
|
2105
2115
|
* }
|
|
2106
2116
|
* @param type
|
|
2117
|
+
* @param entityId
|
|
2118
|
+
* @param expandSettings
|
|
2107
2119
|
* @returns
|
|
2108
2120
|
*/
|
|
2109
|
-
function GetListCacheKey(type) {
|
|
2110
|
-
|
|
2121
|
+
function GetListCacheKey(type, entityId, expandSettings) {
|
|
2122
|
+
if (!expandSettings) {
|
|
2123
|
+
expandSettings = false;
|
|
2124
|
+
}
|
|
2125
|
+
if (!entityId) {
|
|
2126
|
+
entityId = "";
|
|
2127
|
+
}
|
|
2128
|
+
return exports.Api.ECacheKey.AnnDocument + type + entityId + expandSettings;
|
|
2111
2129
|
}
|
|
2112
2130
|
AnnDocument.GetListCacheKey = GetListCacheKey;
|
|
2113
2131
|
})(exports.AnnDocument || (exports.AnnDocument = {}));
|
|
@@ -10885,7 +10903,7 @@
|
|
|
10885
10903
|
})(exports.DataSource || (exports.DataSource = {}));
|
|
10886
10904
|
|
|
10887
10905
|
// This is updated with the package.json version on build.
|
|
10888
|
-
const VERSION = "3.
|
|
10906
|
+
const VERSION = "3.8.0";
|
|
10889
10907
|
|
|
10890
10908
|
exports.VERSION = VERSION;
|
|
10891
10909
|
exports.AbstractApi = AbstractApi;
|