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.es5.js
CHANGED
|
@@ -2081,20 +2081,30 @@ var AnnDocument;
|
|
|
2081
2081
|
*/
|
|
2082
2082
|
function GetList(params) {
|
|
2083
2083
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2084
|
-
let { api, docType: type, req: reqParams } = params;
|
|
2084
|
+
let { api, docType: type, req: reqParams, entityId, expandSettings } = params;
|
|
2085
2085
|
if (!api) {
|
|
2086
2086
|
api = ENVIRONMENT.Api().GetBruceApi();
|
|
2087
2087
|
}
|
|
2088
2088
|
if (!type) {
|
|
2089
2089
|
type = "";
|
|
2090
2090
|
}
|
|
2091
|
-
const cache = yield api.GetCacheItem(GetListCacheKey(type), reqParams);
|
|
2091
|
+
const cache = yield api.GetCacheItem(GetListCacheKey(type, entityId, expandSettings), reqParams);
|
|
2092
2092
|
if (cache === null || cache === void 0 ? void 0 : cache.found) {
|
|
2093
2093
|
return cache.data;
|
|
2094
2094
|
}
|
|
2095
2095
|
const req = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
|
|
2096
2096
|
try {
|
|
2097
|
-
const
|
|
2097
|
+
const urlParams = new URLSearchParams();
|
|
2098
|
+
if (type) {
|
|
2099
|
+
urlParams.append("type", type);
|
|
2100
|
+
}
|
|
2101
|
+
if (entityId) {
|
|
2102
|
+
urlParams.append("entityId", entityId);
|
|
2103
|
+
}
|
|
2104
|
+
if (expandSettings) {
|
|
2105
|
+
urlParams.append("expandSettings", "true");
|
|
2106
|
+
}
|
|
2107
|
+
const url = "documentViews" + `?${urlParams.toString()}`;
|
|
2098
2108
|
const data = yield api.GET(url, Api.PrepReqParams(reqParams));
|
|
2099
2109
|
res({
|
|
2100
2110
|
documents: data.Items
|
|
@@ -2105,7 +2115,7 @@ var AnnDocument;
|
|
|
2105
2115
|
}
|
|
2106
2116
|
}));
|
|
2107
2117
|
yield api.SetCacheItem({
|
|
2108
|
-
key: GetListCacheKey(type),
|
|
2118
|
+
key: GetListCacheKey(type, entityId, expandSettings),
|
|
2109
2119
|
value: req,
|
|
2110
2120
|
req: reqParams
|
|
2111
2121
|
});
|
|
@@ -2135,10 +2145,18 @@ var AnnDocument;
|
|
|
2135
2145
|
* api.Cache.Remove(key);
|
|
2136
2146
|
* }
|
|
2137
2147
|
* @param type
|
|
2148
|
+
* @param entityId
|
|
2149
|
+
* @param expandSettings
|
|
2138
2150
|
* @returns
|
|
2139
2151
|
*/
|
|
2140
|
-
function GetListCacheKey(type) {
|
|
2141
|
-
|
|
2152
|
+
function GetListCacheKey(type, entityId, expandSettings) {
|
|
2153
|
+
if (!expandSettings) {
|
|
2154
|
+
expandSettings = false;
|
|
2155
|
+
}
|
|
2156
|
+
if (!entityId) {
|
|
2157
|
+
entityId = "";
|
|
2158
|
+
}
|
|
2159
|
+
return Api.ECacheKey.AnnDocument + type + entityId + expandSettings;
|
|
2142
2160
|
}
|
|
2143
2161
|
AnnDocument.GetListCacheKey = GetListCacheKey;
|
|
2144
2162
|
})(AnnDocument || (AnnDocument = {}));
|
|
@@ -11143,7 +11161,7 @@ var DataSource;
|
|
|
11143
11161
|
})(DataSource || (DataSource = {}));
|
|
11144
11162
|
|
|
11145
11163
|
// This is updated with the package.json version on build.
|
|
11146
|
-
const VERSION = "3.
|
|
11164
|
+
const VERSION = "3.8.0";
|
|
11147
11165
|
|
|
11148
11166
|
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, AccountFeatures, EncryptUtils, MathUtils, ObjectUtils, PathUtils, UrlUtils, DataLab, ImportCad, ImportCsv, ImportJson, ImportKml, ImportedFile, Markup, Uploader, Plugin, ENVIRONMENT, DataSource };
|
|
11149
11167
|
//# sourceMappingURL=bruce-models.es5.js.map
|