bruce-models 1.9.0 → 1.9.2
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 -1
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +71 -0
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/api/api.js +1 -0
- package/dist/lib/api/api.js.map +1 -1
- package/dist/lib/bruce-models.js +1 -0
- package/dist/lib/bruce-models.js.map +1 -1
- package/dist/lib/plugin/plugin.js +84 -0
- package/dist/lib/plugin/plugin.js.map +1 -0
- package/dist/lib/project/project-view.js.map +1 -1
- package/dist/types/api/api.d.ts +2 -1
- package/dist/types/bruce-models.d.ts +1 -0
- package/dist/types/plugin/plugin.d.ts +37 -0
- package/dist/types/project/project-view.d.ts +4 -0
- package/package.json +1 -1
package/dist/bruce-models.es5.js
CHANGED
|
@@ -62,6 +62,7 @@ var Api;
|
|
|
62
62
|
ECacheKey["DatabaseRegion"] = "databaseregion";
|
|
63
63
|
ECacheKey["CustomForm"] = "customform";
|
|
64
64
|
ECacheKey["ImportedFile"] = "importedfile";
|
|
65
|
+
ECacheKey["Plugin"] = "plugin";
|
|
65
66
|
})(ECacheKey = Api.ECacheKey || (Api.ECacheKey = {}));
|
|
66
67
|
Api.DEFAULT_CACHE_DURATION = 60 * 5; // 5 minutes.
|
|
67
68
|
Api.TEMPLATE_ACCOUNT_ID = "template";
|
|
@@ -7459,5 +7460,76 @@ var Markup;
|
|
|
7459
7460
|
})(Circle = Markup.Circle || (Markup.Circle = {}));
|
|
7460
7461
|
})(Markup || (Markup = {}));
|
|
7461
7462
|
|
|
7462
|
-
|
|
7463
|
+
var Plugin;
|
|
7464
|
+
(function (Plugin$$1) {
|
|
7465
|
+
function GetCacheKey(pluginId) {
|
|
7466
|
+
return `${Api.ECacheKey.Plugin}${Api.ECacheKey.Id}${pluginId}`;
|
|
7467
|
+
}
|
|
7468
|
+
Plugin$$1.GetCacheKey = GetCacheKey;
|
|
7469
|
+
function GetListCacheKey() {
|
|
7470
|
+
return Api.ECacheKey.Plugin;
|
|
7471
|
+
}
|
|
7472
|
+
Plugin$$1.GetListCacheKey = GetListCacheKey;
|
|
7473
|
+
function Get(params) {
|
|
7474
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
7475
|
+
const { api, pluginId, req } = params;
|
|
7476
|
+
if (!pluginId) {
|
|
7477
|
+
throw ("Plugin ID is required.");
|
|
7478
|
+
}
|
|
7479
|
+
const cacheData = api.GetCacheItem(GetCacheKey(pluginId), req);
|
|
7480
|
+
if (cacheData) {
|
|
7481
|
+
return cacheData;
|
|
7482
|
+
}
|
|
7483
|
+
const prom = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
|
|
7484
|
+
try {
|
|
7485
|
+
const data = yield api.GET(`ui.plugin/${pluginId}`, Api.PrepReqParams(req));
|
|
7486
|
+
res({
|
|
7487
|
+
plugin: data
|
|
7488
|
+
});
|
|
7489
|
+
}
|
|
7490
|
+
catch (e) {
|
|
7491
|
+
rej(e);
|
|
7492
|
+
}
|
|
7493
|
+
}));
|
|
7494
|
+
api.Cache.Set(GetCacheKey(pluginId), prom, Api.DEFAULT_CACHE_DURATION);
|
|
7495
|
+
return prom;
|
|
7496
|
+
});
|
|
7497
|
+
}
|
|
7498
|
+
Plugin$$1.Get = Get;
|
|
7499
|
+
function GetList(params) {
|
|
7500
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
7501
|
+
const { api, req } = params;
|
|
7502
|
+
const cacheData = api.GetCacheItem(GetListCacheKey(), req);
|
|
7503
|
+
if (cacheData) {
|
|
7504
|
+
return cacheData;
|
|
7505
|
+
}
|
|
7506
|
+
const prom = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
|
|
7507
|
+
try {
|
|
7508
|
+
const data = yield api.GET("ui.plugins", Api.PrepReqParams(req));
|
|
7509
|
+
res({
|
|
7510
|
+
plugins: data.Items
|
|
7511
|
+
});
|
|
7512
|
+
}
|
|
7513
|
+
catch (e) {
|
|
7514
|
+
rej(e);
|
|
7515
|
+
}
|
|
7516
|
+
}));
|
|
7517
|
+
api.Cache.Set(GetListCacheKey(), prom, Api.DEFAULT_CACHE_DURATION);
|
|
7518
|
+
return prom;
|
|
7519
|
+
});
|
|
7520
|
+
}
|
|
7521
|
+
Plugin$$1.GetList = GetList;
|
|
7522
|
+
function GetLoadUrl(params) {
|
|
7523
|
+
let { api, pluginId, req, cacheKey } = params;
|
|
7524
|
+
if (!cacheKey) {
|
|
7525
|
+
cacheKey = 0;
|
|
7526
|
+
}
|
|
7527
|
+
return {
|
|
7528
|
+
indexFileUrl: `${api.GetBaseUrl()}ui.plugin/${pluginId}/file/index.jsc?version=${cacheKey}`
|
|
7529
|
+
};
|
|
7530
|
+
}
|
|
7531
|
+
Plugin$$1.GetLoadUrl = GetLoadUrl;
|
|
7532
|
+
})(Plugin || (Plugin = {}));
|
|
7533
|
+
|
|
7534
|
+
export { AnnDocument, CustomForm, CustomFormContent, AbstractApi, Api, BruceApi, CamApi, IdmApi, GlobalApi, ApiGetters, Calculator, Bounds, BruceEvent, CacheControl, Camera, Cartes, Carto, Color, DelayQueue, Geometry, UTC, BruceVariable, EntityAttachmentType, EntityAttachment, EntityComment, EntityLink, EntityLod, EntityLodCategory, EntityRelationType, EntityRelation, EntitySource, EntityTag, EntityType, Entity, EntityGlobe, EntityFilterGetter, BatchedDataGetter, EntityCoords, EntityTypeVisualSettings, EntityAttribute, ClientFile, ProgramKey, ZoomControl, MenuItem, ProjectViewBookmark, ProjectView, ProjectViewLegacyTile, ProjectViewTile, PendingAction, MessageBroker, Style, Tileset, Permission, Session, UserGroup, User, Account, EncryptUtils, MathUtils, ObjectUtils, PathUtils, UrlUtils, DataLab, ImportCad, ImportCsv, ImportJson, ImportKml, ImportedFile, Markup, Uploader, Plugin };
|
|
7463
7535
|
//# sourceMappingURL=bruce-models.es5.js.map
|