bruce-models 3.5.2 → 3.5.3
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 +44 -33
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +44 -33
- 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 -1
- package/dist/lib/project/project-view-bookmark.js.map +1 -1
- package/dist/lib/project/project-view.js +42 -32
- package/dist/lib/project/project-view.js.map +1 -1
- package/dist/lib/project/zoom-control.js.map +1 -1
- package/dist/types/api/api.d.ts +1 -0
- package/dist/types/bruce-models.d.ts +1 -1
- package/dist/types/project/project-view.d.ts +27 -21
- package/dist/types/project/zoom-control.d.ts +9 -9
- package/package.json +1 -1
package/dist/bruce-models.umd.js
CHANGED
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
let ECacheKey;
|
|
40
40
|
(function (ECacheKey) {
|
|
41
41
|
ECacheKey["Id"] = ":";
|
|
42
|
+
ECacheKey["ListId"] = "::";
|
|
42
43
|
ECacheKey["Entity"] = "entity";
|
|
43
44
|
ECacheKey["EntityType"] = "entitytype";
|
|
44
45
|
ECacheKey["ProjectView"] = "projectview";
|
|
@@ -7932,36 +7933,15 @@
|
|
|
7932
7933
|
})(exports.ProjectViewBookmark || (exports.ProjectViewBookmark = {}));
|
|
7933
7934
|
|
|
7934
7935
|
(function (ProjectView) {
|
|
7935
|
-
/**
|
|
7936
|
-
* Returns cache identifier for a project view.
|
|
7937
|
-
* Example: {
|
|
7938
|
-
* const api: BruceApi.Api = ...;
|
|
7939
|
-
* const key = GetCacheKey("abc");
|
|
7940
|
-
* api.Cache.Remove(key);
|
|
7941
|
-
* }
|
|
7942
|
-
* @param viewId
|
|
7943
|
-
* @returns
|
|
7944
|
-
*/
|
|
7945
|
-
function GetCacheKey(viewId) {
|
|
7946
|
-
return `${exports.Api.ECacheKey.ProjectView}${exports.Api.ECacheKey.Id}${viewId}`;
|
|
7947
|
-
}
|
|
7948
|
-
ProjectView.GetCacheKey = GetCacheKey;
|
|
7949
|
-
/**
|
|
7950
|
-
* Returns cache identifier for a list of project views.
|
|
7951
|
-
* Example: {
|
|
7952
|
-
* const api: BruceApi.Api = ...;
|
|
7953
|
-
* const key = GetListCacheKey();
|
|
7954
|
-
* api.Cache.Remove(key);
|
|
7955
|
-
* }
|
|
7956
|
-
* @returns
|
|
7957
|
-
*/
|
|
7958
|
-
function GetListCacheKey() {
|
|
7959
|
-
return exports.Api.ECacheKey.ProjectView;
|
|
7960
|
-
}
|
|
7961
|
-
ProjectView.GetListCacheKey = GetListCacheKey;
|
|
7962
7936
|
// This is the expected default version for the DataVersion value.
|
|
7963
7937
|
// This value should NOT be changed without looking at our API and seeing what the default value is.
|
|
7964
7938
|
ProjectView.DEFAULT_DATA_VERSION = 2;
|
|
7939
|
+
// Our Cesium web navigator.
|
|
7940
|
+
ProjectView.TYPE_WEB_3D_NAVIGATOR = "WEB_3D_NAVIGATOR";
|
|
7941
|
+
// Our (currently WIP) 2D web navigator.
|
|
7942
|
+
ProjectView.TYPE_WEB_2D_NAVIGATOR = "WEB_2D_NAVIGATOR";
|
|
7943
|
+
// Defaulting to 3D navigator for backwards compatibility.
|
|
7944
|
+
ProjectView.DEFAULT_TYPE = ProjectView.TYPE_WEB_3D_NAVIGATOR;
|
|
7965
7945
|
/**
|
|
7966
7946
|
* Gets a project view record.
|
|
7967
7947
|
* @param params
|
|
@@ -8008,11 +7988,11 @@
|
|
|
8008
7988
|
*/
|
|
8009
7989
|
function GetList(params) {
|
|
8010
7990
|
return __awaiter(this, void 0, void 0, function* () {
|
|
8011
|
-
let { api, req: reqParams } = params;
|
|
7991
|
+
let { api, req: reqParams, type } = params;
|
|
8012
7992
|
if (!api) {
|
|
8013
7993
|
api = exports.ENVIRONMENT.Api().GetBruceApi();
|
|
8014
7994
|
}
|
|
8015
|
-
const cache = yield api.GetCacheItem(GetListCacheKey(), reqParams);
|
|
7995
|
+
const cache = yield api.GetCacheItem(GetListCacheKey(type), reqParams);
|
|
8016
7996
|
if (cache === null || cache === void 0 ? void 0 : cache.found) {
|
|
8017
7997
|
return cache.data;
|
|
8018
7998
|
}
|
|
@@ -8028,7 +8008,7 @@
|
|
|
8028
8008
|
}
|
|
8029
8009
|
}));
|
|
8030
8010
|
yield api.SetCacheItem({
|
|
8031
|
-
key: GetListCacheKey(),
|
|
8011
|
+
key: GetListCacheKey(type),
|
|
8032
8012
|
value: prom,
|
|
8033
8013
|
req: reqParams
|
|
8034
8014
|
});
|
|
@@ -8051,7 +8031,7 @@
|
|
|
8051
8031
|
}
|
|
8052
8032
|
yield api.DELETE(`ui.view/${viewId}`, exports.Api.PrepReqParams(reqParams));
|
|
8053
8033
|
api.Cache.Remove(GetCacheKey(viewId));
|
|
8054
|
-
api.Cache.
|
|
8034
|
+
api.Cache.RemoveByStartsWith(GetListCacheKey());
|
|
8055
8035
|
});
|
|
8056
8036
|
}
|
|
8057
8037
|
ProjectView.Delete = Delete;
|
|
@@ -8088,13 +8068,44 @@
|
|
|
8088
8068
|
data = yield api.PUT(`ui.view/${data.ID}`, data, exports.Api.PrepReqParams(reqParams));
|
|
8089
8069
|
}
|
|
8090
8070
|
api.Cache.Remove(GetCacheKey(data.ID));
|
|
8091
|
-
api.Cache.
|
|
8071
|
+
api.Cache.RemoveByStartsWith(GetListCacheKey());
|
|
8092
8072
|
return {
|
|
8093
8073
|
view: data
|
|
8094
8074
|
};
|
|
8095
8075
|
});
|
|
8096
8076
|
}
|
|
8097
8077
|
ProjectView.Update = Update;
|
|
8078
|
+
/**
|
|
8079
|
+
* Returns cache identifier for a project view.
|
|
8080
|
+
* Example: {
|
|
8081
|
+
* const api: BruceApi.Api = ...;
|
|
8082
|
+
* const key = GetCacheKey("abc");
|
|
8083
|
+
* api.Cache.Remove(key);
|
|
8084
|
+
* }
|
|
8085
|
+
* @param viewId
|
|
8086
|
+
* @returns
|
|
8087
|
+
*/
|
|
8088
|
+
function GetCacheKey(viewId) {
|
|
8089
|
+
return `${exports.Api.ECacheKey.ProjectView}${exports.Api.ECacheKey.Id}${viewId}`;
|
|
8090
|
+
}
|
|
8091
|
+
ProjectView.GetCacheKey = GetCacheKey;
|
|
8092
|
+
/**
|
|
8093
|
+
* Returns cache identifier for a list of project views.
|
|
8094
|
+
* Example: {
|
|
8095
|
+
* const api: BruceApi.Api = ...;
|
|
8096
|
+
* const key = GetListCacheKey();
|
|
8097
|
+
* api.Cache.Remove(key);
|
|
8098
|
+
* }
|
|
8099
|
+
* @param type optional filter for the type of project view.
|
|
8100
|
+
* @returns
|
|
8101
|
+
*/
|
|
8102
|
+
function GetListCacheKey(type) {
|
|
8103
|
+
if (type) {
|
|
8104
|
+
return `${exports.Api.ECacheKey.ProjectView}${exports.Api.ECacheKey.ListId}${type}`;
|
|
8105
|
+
}
|
|
8106
|
+
return `${exports.Api.ECacheKey.ProjectView}${exports.Api.ECacheKey.ListId}`;
|
|
8107
|
+
}
|
|
8108
|
+
ProjectView.GetListCacheKey = GetListCacheKey;
|
|
8098
8109
|
})(exports.ProjectView || (exports.ProjectView = {}));
|
|
8099
8110
|
|
|
8100
8111
|
function getTemplateSettings(apiGetter, reqParams) {
|
|
@@ -10587,7 +10598,7 @@
|
|
|
10587
10598
|
})(exports.DataSource || (exports.DataSource = {}));
|
|
10588
10599
|
|
|
10589
10600
|
// This is updated with the package.json version on build.
|
|
10590
|
-
const VERSION = "3.5.
|
|
10601
|
+
const VERSION = "3.5.3";
|
|
10591
10602
|
|
|
10592
10603
|
exports.VERSION = VERSION;
|
|
10593
10604
|
exports.AbstractApi = AbstractApi;
|