bruce-models 6.7.2 → 6.7.4
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 +20 -6
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +20 -6
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/bruce-models.js +1 -1
- package/dist/lib/entity/entity.js +5 -1
- package/dist/lib/entity/entity.js.map +1 -1
- package/dist/lib/project/project-view-bookmark.js +14 -4
- package/dist/lib/project/project-view-bookmark.js.map +1 -1
- package/dist/types/bruce-models.d.ts +1 -1
- package/dist/types/project/project-view-bookmark.d.ts +1 -1
- package/package.json +1 -1
package/dist/bruce-models.umd.js
CHANGED
|
@@ -4190,6 +4190,7 @@
|
|
|
4190
4190
|
* @returns
|
|
4191
4191
|
*/
|
|
4192
4192
|
function CalculateName(params) {
|
|
4193
|
+
var _a, _b;
|
|
4193
4194
|
const { entity, type, defaultToId = true } = params;
|
|
4194
4195
|
const attrStr = type.DisplayNameAttributePath;
|
|
4195
4196
|
if (attrStr) {
|
|
@@ -4198,7 +4199,7 @@
|
|
|
4198
4199
|
const pathStr = attrPaths[i];
|
|
4199
4200
|
const path = exports.PathUtils.Parse(pathStr);
|
|
4200
4201
|
const name = Entity.GetValue({
|
|
4201
|
-
entity: entity,
|
|
4202
|
+
entity: entity || {},
|
|
4202
4203
|
path
|
|
4203
4204
|
});
|
|
4204
4205
|
if (name && typeof name != "object") {
|
|
@@ -4206,6 +4207,9 @@
|
|
|
4206
4207
|
}
|
|
4207
4208
|
}
|
|
4208
4209
|
}
|
|
4210
|
+
if (((_a = entity === null || entity === void 0 ? void 0 : entity.Bruce) === null || _a === void 0 ? void 0 : _a.Name) && ((_b = entity === null || entity === void 0 ? void 0 : entity.Bruce) === null || _b === void 0 ? void 0 : _b.Name) !== "Unnamed Entity") {
|
|
4211
|
+
return entity.Bruce.Name;
|
|
4212
|
+
}
|
|
4209
4213
|
return defaultToId ? entity.Bruce.ID : null;
|
|
4210
4214
|
}
|
|
4211
4215
|
Entity.CalculateName = CalculateName;
|
|
@@ -10778,8 +10782,8 @@
|
|
|
10778
10782
|
function Get(params) {
|
|
10779
10783
|
return __awaiter(this, void 0, void 0, function* () {
|
|
10780
10784
|
let { api, viewId, bookmarkId, req: reqParams } = params;
|
|
10781
|
-
if (!
|
|
10782
|
-
throw ("
|
|
10785
|
+
if (!bookmarkId) {
|
|
10786
|
+
throw ("Bookmark ID is required.");
|
|
10783
10787
|
}
|
|
10784
10788
|
if (!api) {
|
|
10785
10789
|
api = exports.ENVIRONMENT.Api().GetBruceApi();
|
|
@@ -10791,7 +10795,14 @@
|
|
|
10791
10795
|
}
|
|
10792
10796
|
const prom = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
|
|
10793
10797
|
try {
|
|
10794
|
-
|
|
10798
|
+
let url;
|
|
10799
|
+
if (viewId) {
|
|
10800
|
+
url = `ui.view/${viewId}/slide/${bookmarkId}`;
|
|
10801
|
+
}
|
|
10802
|
+
else {
|
|
10803
|
+
url = `slide/${bookmarkId}`;
|
|
10804
|
+
}
|
|
10805
|
+
const data = yield api.GET(url, exports.Api.PrepReqParams(reqParams));
|
|
10795
10806
|
res({
|
|
10796
10807
|
bookmark: data
|
|
10797
10808
|
});
|
|
@@ -10929,7 +10940,10 @@
|
|
|
10929
10940
|
* @returns
|
|
10930
10941
|
*/
|
|
10931
10942
|
function GetCacheKey(viewId, bookmarkId) {
|
|
10932
|
-
|
|
10943
|
+
if (viewId) {
|
|
10944
|
+
return `${exports.Api.ECacheKey.ProjectViewBookmark}${exports.Api.ECacheKey.Id}${viewId}${exports.Api.ECacheKey.Id}${bookmarkId}`;
|
|
10945
|
+
}
|
|
10946
|
+
return `${exports.Api.ECacheKey.ProjectViewBookmark}${exports.Api.ECacheKey.Id}${bookmarkId}`;
|
|
10933
10947
|
}
|
|
10934
10948
|
ProjectViewBookmark.GetCacheKey = GetCacheKey;
|
|
10935
10949
|
})(exports.ProjectViewBookmark || (exports.ProjectViewBookmark = {}));
|
|
@@ -16104,7 +16118,7 @@
|
|
|
16104
16118
|
})(exports.Tracking || (exports.Tracking = {}));
|
|
16105
16119
|
|
|
16106
16120
|
// This is updated with the package.json version on build.
|
|
16107
|
-
const VERSION = "6.7.
|
|
16121
|
+
const VERSION = "6.7.4";
|
|
16108
16122
|
|
|
16109
16123
|
exports.VERSION = VERSION;
|
|
16110
16124
|
exports.AbstractApi = AbstractApi;
|