bruce-models 7.1.36 → 7.1.38
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 +73 -9
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +73 -9
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/ann-document/ann-document.js +58 -0
- package/dist/lib/ann-document/ann-document.js.map +1 -1
- package/dist/lib/assembly/assembly.js +11 -5
- package/dist/lib/assembly/assembly.js.map +1 -1
- package/dist/lib/bruce-models.js +1 -1
- package/dist/lib/entity/entity.js +3 -3
- package/dist/lib/entity/entity.js.map +1 -1
- package/dist/types/ann-document/ann-document.d.ts +28 -0
- package/dist/types/assembly/assembly.d.ts +1 -0
- package/dist/types/bruce-models.d.ts +1 -1
- package/package.json +1 -1
package/dist/bruce-models.es5.js
CHANGED
|
@@ -1948,7 +1948,8 @@ var Assembly;
|
|
|
1948
1948
|
parentId: params.parentId,
|
|
1949
1949
|
search: params.search,
|
|
1950
1950
|
withTilesets: params.withTilesets,
|
|
1951
|
-
rootEntityId: params.rootEntityId
|
|
1951
|
+
rootEntityId: params.rootEntityId,
|
|
1952
|
+
entityTypeId: params.entityTypeId
|
|
1952
1953
|
});
|
|
1953
1954
|
assemblies.push(...result.assemblies);
|
|
1954
1955
|
}
|
|
@@ -1982,10 +1983,10 @@ var Assembly;
|
|
|
1982
1983
|
for (let i = 0; i < params.ids.length; i++) {
|
|
1983
1984
|
urlParams.append("ID", String(params.ids[i]));
|
|
1984
1985
|
}
|
|
1985
|
-
if (params.pageIndex
|
|
1986
|
+
if (params.pageIndex == null) {
|
|
1986
1987
|
urlParams.append("PageIndex", String(0));
|
|
1987
1988
|
}
|
|
1988
|
-
if (params.pageSize
|
|
1989
|
+
if (params.pageSize == null) {
|
|
1989
1990
|
urlParams.append("PageSize", String(params.ids.length));
|
|
1990
1991
|
}
|
|
1991
1992
|
}
|
|
@@ -1993,13 +1994,18 @@ var Assembly;
|
|
|
1993
1994
|
for (let i = 0; i < params.rootEntityId.length; i++) {
|
|
1994
1995
|
urlParams.append("RootEntityID", params.rootEntityId[i]);
|
|
1995
1996
|
}
|
|
1996
|
-
if (params.pageIndex
|
|
1997
|
+
if (params.pageIndex == null) {
|
|
1997
1998
|
urlParams.append("PageIndex", String(0));
|
|
1998
1999
|
}
|
|
1999
|
-
if (params.pageSize
|
|
2000
|
+
if (params.pageSize == null) {
|
|
2000
2001
|
urlParams.append("PageSize", String(params.rootEntityId.length));
|
|
2001
2002
|
}
|
|
2002
2003
|
}
|
|
2004
|
+
if (params.entityTypeId != null) {
|
|
2005
|
+
for (let i = 0; i < params.entityTypeId.length; i++) {
|
|
2006
|
+
urlParams.append("EntityTypeID", params.entityTypeId[i]);
|
|
2007
|
+
}
|
|
2008
|
+
}
|
|
2003
2009
|
url += "?" + urlParams.toString();
|
|
2004
2010
|
const data = yield api.GET(url, Api.PrepReqParams(reqParams));
|
|
2005
2011
|
const result = {};
|
|
@@ -2249,6 +2255,31 @@ var AnnDocument;
|
|
|
2249
2255
|
EHotspotSource["OCR"] = "OCR";
|
|
2250
2256
|
EHotspotSource["AIImage"] = "AIImage";
|
|
2251
2257
|
})(EHotspotSource = AnnDocument.EHotspotSource || (AnnDocument.EHotspotSource = {}));
|
|
2258
|
+
/**
|
|
2259
|
+
* Uploads a PDF and creates a new annotated document.
|
|
2260
|
+
* Hotspot detection is opt-in and only runs when detectHotspots is true.
|
|
2261
|
+
*/
|
|
2262
|
+
function UploadPDF(params) {
|
|
2263
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2264
|
+
let { api, file, detectHotspots, req } = params;
|
|
2265
|
+
if (!api) {
|
|
2266
|
+
api = ENVIRONMENT.Api().GetBruceApi();
|
|
2267
|
+
}
|
|
2268
|
+
if (!file) {
|
|
2269
|
+
throw ("File is required.");
|
|
2270
|
+
}
|
|
2271
|
+
req = Api.PrepReqParams(req);
|
|
2272
|
+
if (detectHotspots) {
|
|
2273
|
+
req.formData = AddDetectHotspotsFormParam(req.formData);
|
|
2274
|
+
}
|
|
2275
|
+
const data = yield api.UPLOAD("documentView/new/uploadPDF", file, req);
|
|
2276
|
+
api.Cache.RemoveByStartsWith(Api.ECacheKey.AnnDocument);
|
|
2277
|
+
return {
|
|
2278
|
+
document: data
|
|
2279
|
+
};
|
|
2280
|
+
});
|
|
2281
|
+
}
|
|
2282
|
+
AnnDocument.UploadPDF = UploadPDF;
|
|
2252
2283
|
/**
|
|
2253
2284
|
* Returns an annotated document by ID.
|
|
2254
2285
|
* @param params
|
|
@@ -2344,6 +2375,32 @@ var AnnDocument;
|
|
|
2344
2375
|
});
|
|
2345
2376
|
}
|
|
2346
2377
|
AnnDocument.GetList = GetList;
|
|
2378
|
+
/**
|
|
2379
|
+
* Creates or updates an annotated document.
|
|
2380
|
+
* Hotspot detection is opt-in and only runs when detectHotspots is true.
|
|
2381
|
+
*/
|
|
2382
|
+
function Update(params) {
|
|
2383
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2384
|
+
let { api, document, detectHotspots, req: reqParams } = params;
|
|
2385
|
+
if (!api) {
|
|
2386
|
+
api = ENVIRONMENT.Api().GetBruceApi();
|
|
2387
|
+
}
|
|
2388
|
+
if (!document) {
|
|
2389
|
+
throw ("Document is required.");
|
|
2390
|
+
}
|
|
2391
|
+
const docId = document.ID || 0;
|
|
2392
|
+
let url = `documentView/${docId}`;
|
|
2393
|
+
if (detectHotspots) {
|
|
2394
|
+
url += "?DetectHotspots=true";
|
|
2395
|
+
}
|
|
2396
|
+
const data = yield api.POST(url, document, Api.PrepReqParams(reqParams));
|
|
2397
|
+
api.Cache.RemoveByStartsWith(Api.ECacheKey.AnnDocument);
|
|
2398
|
+
return {
|
|
2399
|
+
document: data
|
|
2400
|
+
};
|
|
2401
|
+
});
|
|
2402
|
+
}
|
|
2403
|
+
AnnDocument.Update = Update;
|
|
2347
2404
|
/**
|
|
2348
2405
|
* Suggests hotspots by scraping pages in a document view and matching by pattern.
|
|
2349
2406
|
*/
|
|
@@ -2429,6 +2486,13 @@ var AnnDocument;
|
|
|
2429
2486
|
return Api.ECacheKey.AnnDocument + type + entityId + expandSettings + pageIndex + "_" + pageSize + "_" + search;
|
|
2430
2487
|
}
|
|
2431
2488
|
AnnDocument.GetListCacheKey = GetListCacheKey;
|
|
2489
|
+
function AddDetectHotspotsFormParam(formData) {
|
|
2490
|
+
if (typeof FormData !== "undefined" && formData instanceof FormData) {
|
|
2491
|
+
formData.set("DetectHotspots", "true");
|
|
2492
|
+
return formData;
|
|
2493
|
+
}
|
|
2494
|
+
return Object.assign(Object.assign({}, formData), { DetectHotspots: "true" });
|
|
2495
|
+
}
|
|
2432
2496
|
})(AnnDocument || (AnnDocument = {}));
|
|
2433
2497
|
|
|
2434
2498
|
/**
|
|
@@ -5049,7 +5113,7 @@ var Entity;
|
|
|
5049
5113
|
if (!analysis) {
|
|
5050
5114
|
entities = data.Items;
|
|
5051
5115
|
}
|
|
5052
|
-
totalCount = data.TotalCount;
|
|
5116
|
+
totalCount = data.Count ? data.Count : data.TotalCount;
|
|
5053
5117
|
imports = data.Imports;
|
|
5054
5118
|
sources = data.Source;
|
|
5055
5119
|
entityTypeSources = data["EntityType.Source"];
|
|
@@ -5126,7 +5190,7 @@ var Entity;
|
|
|
5126
5190
|
});
|
|
5127
5191
|
}
|
|
5128
5192
|
}
|
|
5129
|
-
totalCount = data.TotalCount;
|
|
5193
|
+
totalCount = data.Count ? data.Count : data.TotalCount;
|
|
5130
5194
|
imports = data.Imports;
|
|
5131
5195
|
nextPage = data.NextPage;
|
|
5132
5196
|
nextPageUrl = data.NextPageURL;
|
|
@@ -5153,7 +5217,7 @@ var Entity;
|
|
|
5153
5217
|
nextPageUrl = data.NextPageURL;
|
|
5154
5218
|
return {
|
|
5155
5219
|
entities: data.Items,
|
|
5156
|
-
totalCount: data.TotalCount,
|
|
5220
|
+
totalCount: data.Count ? data.Count : data.TotalCount,
|
|
5157
5221
|
imports: data.Imports,
|
|
5158
5222
|
nextPage: data.NextPage,
|
|
5159
5223
|
nextPageUrl: data.NextPageURL,
|
|
@@ -18245,7 +18309,7 @@ var ChangeSet;
|
|
|
18245
18309
|
})(ChangeSet || (ChangeSet = {}));
|
|
18246
18310
|
|
|
18247
18311
|
// This is updated with the package.json version on build.
|
|
18248
|
-
const VERSION = "7.1.
|
|
18312
|
+
const VERSION = "7.1.38";
|
|
18249
18313
|
|
|
18250
18314
|
export { VERSION, Assembly, AnnDocument, CustomForm, AbstractApi, Api, BruceApi, GlobalApi, GuardianApi, ApiGetters, Calculator, Bounds, BruceEvent, CacheControl, Camera, Cartes, Carto, Color, DelayQueue, Geometry, UTC, BruceVariable, LRUCache, GeoJson, EntityAttachmentType, EntityAttachment, EntityComment, EntityLink, EntityLod, EntityLodCategory, EntityRelationType, EntityRelation, EntitySource, EntityTag, EntityTypeTrigger, EntityType, Entity, EntityCoords, EntityAttribute, EntityHistoricData, EntityTableView, DashboardView, Comment, ClientFile, ProgramKey, ZoomControl, MenuItem, ProjectViewBookmark, ProjectView, ProjectViewLegacyTile, ProjectViewTile, ProjectViewLegacy, ProjectViewLegacyBookmark, ProjectViewBookmarkGroup, PendingAction, MessageBroker, HostingLocation, Style, Tileset, Permission, Session, UserGroup, User, UserMfaMethod, Account, AccountInvite, AccountFeatures, AccountLimits, AccountTemplate, AccountType, EncryptUtils, MathUtils, ObjectUtils, PathUtils, UrlUtils, DataLab, DataTransform, DataLabGroup, DataFeed, ImportAssembly, ImportCad, ImportCsv, ImportJson, ImportGeoJson, ImportKml, ImportLcc, ImportedFile, ExportBrz, ExportUsd, Markup, Uploader, Plugin, ENVIRONMENT, DataSource, Scenario, Tracking, NAVIGATOR_CHAT_EVENT_ENTITY_HIGHLIGHT_APPLIED, NAVIGATOR_CHAT_EVENT_SCENE_CONTEXT_PREFETCHED, NavigatorChatClient, NavigatorMcpWebSocketClient, ChangeSet };
|
|
18251
18315
|
//# sourceMappingURL=bruce-models.es5.js.map
|