bruce-models 7.1.38 → 7.1.39
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 +185 -2
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +183 -1
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/account/account-concept.js +196 -0
- package/dist/lib/account/account-concept.js.map +1 -0
- package/dist/lib/ann-document/ann-document.js.map +1 -1
- package/dist/lib/bruce-models.js +2 -1
- package/dist/lib/bruce-models.js.map +1 -1
- package/dist/lib/dashboard/dashboard-view.js.map +1 -1
- package/dist/lib/entity/entity-lod.js.map +1 -1
- package/dist/lib/entity/entity-table-view.js.map +1 -1
- package/dist/lib/entity/entity-type.js.map +1 -1
- package/dist/lib/entity/entity.js.map +1 -1
- package/dist/lib/program-key/program-key.js.map +1 -1
- package/dist/lib/project/project-view-bookmark-group.js.map +1 -1
- package/dist/lib/project/project-view-bookmark.js.map +1 -1
- package/dist/lib/project/project-view.js.map +1 -1
- package/dist/lib/tileset/tileset.js +1 -0
- package/dist/lib/tileset/tileset.js.map +1 -1
- package/dist/types/account/account-concept.d.ts +90 -0
- package/dist/types/ann-document/ann-document.d.ts +2 -0
- package/dist/types/bruce-models.d.ts +2 -1
- package/dist/types/dashboard/dashboard-view.d.ts +2 -0
- package/dist/types/entity/entity-lod.d.ts +2 -0
- package/dist/types/entity/entity-table-view.d.ts +2 -0
- package/dist/types/entity/entity-type.d.ts +2 -0
- package/dist/types/entity/entity.d.ts +2 -0
- package/dist/types/program-key/program-key.d.ts +2 -0
- package/dist/types/project/project-view-bookmark-group.d.ts +2 -0
- package/dist/types/project/project-view-bookmark.d.ts +2 -0
- package/dist/types/project/project-view.d.ts +2 -0
- package/dist/types/tileset/tileset.d.ts +2 -0
- package/package.json +1 -2
package/dist/bruce-models.es5.js
CHANGED
|
@@ -10933,6 +10933,7 @@ function convertLegacyRec(record, newer) {
|
|
|
10933
10933
|
ExternalTilesetURL: (_l = (_k = record.Settings) === null || _k === void 0 ? void 0 : _k.etc) === null || _l === void 0 ? void 0 : _l.ExternalTilesetURL,
|
|
10934
10934
|
showAdvancedSettings: (_o = (_m = record.Settings) === null || _m === void 0 ? void 0 : _m.etc) === null || _o === void 0 ? void 0 : _o.showAdvancedSettings
|
|
10935
10935
|
},
|
|
10936
|
+
permission: record.Permission,
|
|
10936
10937
|
// Not returned in legacy data.
|
|
10937
10938
|
creationTime: newer === null || newer === void 0 ? void 0 : newer.creationTime,
|
|
10938
10939
|
// Not returned in legacy data.
|
|
@@ -14809,6 +14810,188 @@ var UserMfaMethod;
|
|
|
14809
14810
|
UserMfaMethod.Verify = Verify;
|
|
14810
14811
|
})(UserMfaMethod || (UserMfaMethod = {}));
|
|
14811
14812
|
|
|
14813
|
+
var AccountConcept;
|
|
14814
|
+
(function (AccountConcept) {
|
|
14815
|
+
let EConcept;
|
|
14816
|
+
(function (EConcept) {
|
|
14817
|
+
EConcept["ASSEMBLY"] = "a";
|
|
14818
|
+
EConcept["ATTACHMENT_TYPE"] = "at";
|
|
14819
|
+
EConcept["CHANGE_SET"] = "cs";
|
|
14820
|
+
EConcept["CLIENT_FILE"] = "clf";
|
|
14821
|
+
EConcept["CUSTOM_FORM"] = "csf";
|
|
14822
|
+
EConcept["DATA_FEED"] = "df";
|
|
14823
|
+
EConcept["DATA_LAB_QUERY"] = "q";
|
|
14824
|
+
EConcept["DATA_LAB_QUERY_GROUP"] = "qg";
|
|
14825
|
+
EConcept["DATA_SOURCE"] = "ds";
|
|
14826
|
+
EConcept["DATA_TRANSFORM"] = "dt";
|
|
14827
|
+
EConcept["DATA_VALIDATION"] = "dval";
|
|
14828
|
+
EConcept["DOCUMENT_VIEW"] = "dv";
|
|
14829
|
+
EConcept["ENTITY"] = "e";
|
|
14830
|
+
EConcept["ENTITY_LOD"] = "el";
|
|
14831
|
+
EConcept["ENTITY_RELATION"] = "er";
|
|
14832
|
+
EConcept["ENTITY_TYPE"] = "et";
|
|
14833
|
+
EConcept["ENTITY_TYPE_LOD"] = "etl";
|
|
14834
|
+
EConcept["LAYER"] = "l";
|
|
14835
|
+
EConcept["LOD_CATEGORY"] = "lc";
|
|
14836
|
+
EConcept["PROGRAM_KEY"] = "pk";
|
|
14837
|
+
EConcept["PROJECT_VIEW"] = "pv";
|
|
14838
|
+
EConcept["RELATION_TYPE"] = "rt";
|
|
14839
|
+
EConcept["SCENARIO"] = "sc";
|
|
14840
|
+
EConcept["TILESET"] = "ts";
|
|
14841
|
+
EConcept["UI_DASHBOARD_VIEW"] = "dbv";
|
|
14842
|
+
EConcept["UI_ENTITY_DISPLAY_SETTING"] = "s";
|
|
14843
|
+
EConcept["UI_PLUGIN"] = "pg";
|
|
14844
|
+
EConcept["UI_SLIDE"] = "pvs";
|
|
14845
|
+
EConcept["UI_SLIDE_GROUP"] = "sg";
|
|
14846
|
+
EConcept["UI_TABLE_VIEW"] = "tv";
|
|
14847
|
+
})(EConcept = AccountConcept.EConcept || (AccountConcept.EConcept = {}));
|
|
14848
|
+
let EAction;
|
|
14849
|
+
(function (EAction) {
|
|
14850
|
+
// Manage is a squashed version of all CRUD perms.
|
|
14851
|
+
// Helps avoid specifying all 4 CRUD perms as separate permission strings in a User Group.
|
|
14852
|
+
EAction["MANAGE"] = "MANAGE";
|
|
14853
|
+
// Manage own records only (eg: own draft bookmarks within a Project View).
|
|
14854
|
+
// Only implemented for Bookmarks at the moment.
|
|
14855
|
+
EAction["MANAGE_OWN"] = "MANAGE_OWN";
|
|
14856
|
+
EAction["VIEW"] = "VIEW";
|
|
14857
|
+
EAction["CREATE"] = "CREATE";
|
|
14858
|
+
EAction["EDIT"] = "EDIT";
|
|
14859
|
+
EAction["DELETE"] = "DELETE";
|
|
14860
|
+
})(EAction = AccountConcept.EAction || (AccountConcept.EAction = {}));
|
|
14861
|
+
function canCreate(perm) {
|
|
14862
|
+
var _a;
|
|
14863
|
+
return (_a = perm === null || perm === void 0 ? void 0 : perm.includes("C")) !== null && _a !== void 0 ? _a : false;
|
|
14864
|
+
}
|
|
14865
|
+
AccountConcept.canCreate = canCreate;
|
|
14866
|
+
function canRead(perm) {
|
|
14867
|
+
var _a;
|
|
14868
|
+
return (_a = perm === null || perm === void 0 ? void 0 : perm.includes("R")) !== null && _a !== void 0 ? _a : false;
|
|
14869
|
+
}
|
|
14870
|
+
AccountConcept.canRead = canRead;
|
|
14871
|
+
function canUpdate(perm) {
|
|
14872
|
+
var _a;
|
|
14873
|
+
return (_a = perm === null || perm === void 0 ? void 0 : perm.includes("U")) !== null && _a !== void 0 ? _a : false;
|
|
14874
|
+
}
|
|
14875
|
+
AccountConcept.canUpdate = canUpdate;
|
|
14876
|
+
function canDelete(perm) {
|
|
14877
|
+
var _a;
|
|
14878
|
+
return (_a = perm === null || perm === void 0 ? void 0 : perm.includes("D")) !== null && _a !== void 0 ? _a : false;
|
|
14879
|
+
}
|
|
14880
|
+
AccountConcept.canDelete = canDelete;
|
|
14881
|
+
AccountConcept.CONCEPTS = [
|
|
14882
|
+
{ concept: EConcept.ASSEMBLY, label: "Assembly", description: undefined },
|
|
14883
|
+
{ concept: EConcept.ATTACHMENT_TYPE, label: "Attachment Type", description: undefined },
|
|
14884
|
+
{ concept: EConcept.CHANGE_SET, label: "Change Set", description: undefined },
|
|
14885
|
+
{ concept: EConcept.CLIENT_FILE, label: "Client File", description: undefined },
|
|
14886
|
+
{ concept: EConcept.CUSTOM_FORM, label: "Custom Form", description: undefined },
|
|
14887
|
+
{ concept: EConcept.DATA_FEED, label: "Data Feed", description: undefined },
|
|
14888
|
+
{ concept: EConcept.DATA_LAB_QUERY, label: "DataLab Query", description: undefined },
|
|
14889
|
+
{ concept: EConcept.DATA_LAB_QUERY_GROUP, label: "DataLab Query Group", description: undefined },
|
|
14890
|
+
{ concept: EConcept.DATA_SOURCE, label: "Data Source", description: undefined },
|
|
14891
|
+
{ concept: EConcept.DATA_TRANSFORM, label: "Data Transform", description: undefined },
|
|
14892
|
+
{ concept: EConcept.DATA_VALIDATION, label: "Data Validation", description: undefined },
|
|
14893
|
+
{ concept: EConcept.DOCUMENT_VIEW, label: "Document View", description: undefined },
|
|
14894
|
+
{ concept: EConcept.ENTITY, label: "Entity", description: "Entities and their owned records (Attachments, Links, LODs, Relationships)" },
|
|
14895
|
+
{ concept: EConcept.ENTITY_LOD, label: "Entity LOD", description: undefined },
|
|
14896
|
+
{ concept: EConcept.ENTITY_RELATION, label: "Entity Relation", description: undefined },
|
|
14897
|
+
{ concept: EConcept.ENTITY_TYPE, label: "Entity Type", description: "Entity Types and their owned records (Entities, Relationships, LODs)" },
|
|
14898
|
+
{ concept: EConcept.ENTITY_TYPE_LOD, label: "Entity Type LOD", description: undefined },
|
|
14899
|
+
{ concept: EConcept.LAYER, label: "Tag", description: undefined },
|
|
14900
|
+
{ concept: EConcept.LOD_CATEGORY, label: "LOD Category", description: undefined },
|
|
14901
|
+
{ concept: EConcept.PROGRAM_KEY, label: "Third Party Key", description: undefined },
|
|
14902
|
+
{ concept: EConcept.RELATION_TYPE, label: "Relation Type", description: undefined },
|
|
14903
|
+
{ concept: EConcept.SCENARIO, label: "Scenario", description: undefined },
|
|
14904
|
+
{ concept: EConcept.PROJECT_VIEW, label: "Project View", description: undefined },
|
|
14905
|
+
{ concept: EConcept.TILESET, label: "Tileset", description: undefined },
|
|
14906
|
+
{ concept: EConcept.UI_DASHBOARD_VIEW, label: "Dashboard View", description: undefined },
|
|
14907
|
+
{ concept: EConcept.UI_ENTITY_DISPLAY_SETTING, label: "Style", description: undefined },
|
|
14908
|
+
{ concept: EConcept.UI_PLUGIN, label: "Plugin", description: undefined },
|
|
14909
|
+
{ concept: EConcept.UI_SLIDE, label: "Bookmark", description: undefined },
|
|
14910
|
+
{ concept: EConcept.UI_SLIDE_GROUP, label: "Bookmark Group", description: undefined },
|
|
14911
|
+
{ concept: EConcept.UI_TABLE_VIEW, label: "Tabular View", description: undefined },
|
|
14912
|
+
];
|
|
14913
|
+
/**
|
|
14914
|
+
* Builds a concept permission string.
|
|
14915
|
+
* Omit recordId for an account-wide permission, eg: "view:pv".
|
|
14916
|
+
* Pass recordId for a record-specific permission, eg: "view:pv:abc123".
|
|
14917
|
+
*/
|
|
14918
|
+
function buildPermission(action, concept, recordId) {
|
|
14919
|
+
const base = `${action.toLowerCase()}:${concept}`;
|
|
14920
|
+
return recordId ? `${base}:${recordId}` : base;
|
|
14921
|
+
}
|
|
14922
|
+
AccountConcept.buildPermission = buildPermission;
|
|
14923
|
+
/**
|
|
14924
|
+
* Parses a concept permission string back to its components.
|
|
14925
|
+
* Returns null for legacy permissions (no ':') or unrecognised strings.
|
|
14926
|
+
*/
|
|
14927
|
+
function parsePermission(perm) {
|
|
14928
|
+
if (!perm || !perm.includes(":")) {
|
|
14929
|
+
return null;
|
|
14930
|
+
}
|
|
14931
|
+
const lower = perm.toLowerCase().trim();
|
|
14932
|
+
const firstColon = lower.indexOf(":");
|
|
14933
|
+
const actionStr = lower.substring(0, firstColon);
|
|
14934
|
+
let matchedAction;
|
|
14935
|
+
for (const a of Object.values(EAction)) {
|
|
14936
|
+
if (a.toLowerCase() === actionStr) {
|
|
14937
|
+
matchedAction = a;
|
|
14938
|
+
break;
|
|
14939
|
+
}
|
|
14940
|
+
}
|
|
14941
|
+
if (!matchedAction) {
|
|
14942
|
+
return null;
|
|
14943
|
+
}
|
|
14944
|
+
const rest = lower.substring(firstColon + 1);
|
|
14945
|
+
// Longest-match prevents "e" matching the start of "el:abc".
|
|
14946
|
+
let matchedConcept;
|
|
14947
|
+
let matchedLen = 0;
|
|
14948
|
+
for (const token of Object.values(EConcept)) {
|
|
14949
|
+
if (token.length > matchedLen && (rest === token || rest.startsWith(token + ":"))) {
|
|
14950
|
+
matchedConcept = token;
|
|
14951
|
+
matchedLen = token.length;
|
|
14952
|
+
}
|
|
14953
|
+
}
|
|
14954
|
+
if (!matchedConcept) {
|
|
14955
|
+
return null;
|
|
14956
|
+
}
|
|
14957
|
+
const recordId = rest.length > matchedLen ? rest.substring(matchedLen + 1) : undefined;
|
|
14958
|
+
return {
|
|
14959
|
+
action: matchedAction,
|
|
14960
|
+
concept: matchedConcept,
|
|
14961
|
+
recordId
|
|
14962
|
+
};
|
|
14963
|
+
}
|
|
14964
|
+
AccountConcept.parsePermission = parsePermission;
|
|
14965
|
+
/**
|
|
14966
|
+
* Returns the concept-level CRUD permission rubric for the current session.
|
|
14967
|
+
* Only concepts where the user has at least one permission are included.
|
|
14968
|
+
*/
|
|
14969
|
+
function GetPermissions(params) {
|
|
14970
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
14971
|
+
if (!params)
|
|
14972
|
+
params = {};
|
|
14973
|
+
let { api, req } = params;
|
|
14974
|
+
if (!api) {
|
|
14975
|
+
api = ENVIRONMENT.Api().GetBruceApi();
|
|
14976
|
+
}
|
|
14977
|
+
req = Api.PrepReqParams(req);
|
|
14978
|
+
const rubric = {};
|
|
14979
|
+
const data = yield api.GET("permissions", req);
|
|
14980
|
+
if (data) {
|
|
14981
|
+
for (const [token, permStr] of Object.entries(data)) {
|
|
14982
|
+
if (typeof permStr === "string") {
|
|
14983
|
+
rubric[token] = permStr;
|
|
14984
|
+
}
|
|
14985
|
+
}
|
|
14986
|
+
}
|
|
14987
|
+
return {
|
|
14988
|
+
rubric
|
|
14989
|
+
};
|
|
14990
|
+
});
|
|
14991
|
+
}
|
|
14992
|
+
AccountConcept.GetPermissions = GetPermissions;
|
|
14993
|
+
})(AccountConcept || (AccountConcept = {}));
|
|
14994
|
+
|
|
14812
14995
|
/**
|
|
14813
14996
|
* An account-invite is an invitation to a user to join a client account.
|
|
14814
14997
|
* New users to Nextspace will setup their user account within the invitation process.
|
|
@@ -18309,7 +18492,7 @@ var ChangeSet;
|
|
|
18309
18492
|
})(ChangeSet || (ChangeSet = {}));
|
|
18310
18493
|
|
|
18311
18494
|
// This is updated with the package.json version on build.
|
|
18312
|
-
const VERSION = "7.1.
|
|
18495
|
+
const VERSION = "7.1.39";
|
|
18313
18496
|
|
|
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 };
|
|
18497
|
+
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, AccountConcept, 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 };
|
|
18315
18498
|
//# sourceMappingURL=bruce-models.es5.js.map
|