bruce-models 7.1.100 → 7.1.102
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 +53 -11
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +53 -11
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/account/account-concept.js +4 -0
- package/dist/lib/account/account-concept.js.map +1 -1
- package/dist/lib/bruce-models.js +1 -1
- package/dist/lib/entity/entity-historic-data.js +14 -2
- package/dist/lib/entity/entity-historic-data.js.map +1 -1
- package/dist/lib/project/menu-item.js.map +1 -1
- package/dist/lib/server/record-change-feed.js +34 -8
- package/dist/lib/server/record-change-feed.js.map +1 -1
- package/dist/types/account/account-concept.d.ts +5 -1
- package/dist/types/bruce-models.d.ts +1 -1
- package/dist/types/project/menu-item.d.ts +3 -0
- package/dist/types/server/record-change-feed.d.ts +14 -3
- package/package.json +1 -1
package/dist/bruce-models.es5.js
CHANGED
|
@@ -364,6 +364,10 @@ var AccountConcept;
|
|
|
364
364
|
EConcept["UI_SLIDE"] = "pvs";
|
|
365
365
|
EConcept["UI_SLIDE_GROUP"] = "sg";
|
|
366
366
|
EConcept["UI_TABLE_VIEW"] = "tv";
|
|
367
|
+
EConcept["WORKFLOW_ITEM"] = "wi";
|
|
368
|
+
EConcept["WORKFLOW_ITEM_STATUS"] = "wis";
|
|
369
|
+
EConcept["WORKFLOW_ITEM_TYPE"] = "wit";
|
|
370
|
+
EConcept["WORKFLOW_QUEUE"] = "wq";
|
|
367
371
|
})(EConcept = AccountConcept.EConcept || (AccountConcept.EConcept = {}));
|
|
368
372
|
let EAction;
|
|
369
373
|
(function (EAction) {
|
|
@@ -584,14 +588,17 @@ var RecordChangeFeed;
|
|
|
584
588
|
};
|
|
585
589
|
};
|
|
586
590
|
/**
|
|
587
|
-
* Returns true if the given
|
|
591
|
+
* Returns true if the given internal ID falls within the reported range string.
|
|
592
|
+
*
|
|
593
|
+
* Every concept whose records carry a numeric identity reports them this way, as runs rather than
|
|
594
|
+
* as one ID per record, so that a change touching thousands of rows is still a short message.
|
|
588
595
|
*
|
|
589
596
|
* @example
|
|
590
|
-
*
|
|
591
|
-
*
|
|
597
|
+
* isInternalIdInRangeString("100-200,305,400-450", 150) // true
|
|
598
|
+
* isInternalIdInRangeString("100-200,305,400-450", 301) // false
|
|
592
599
|
*/
|
|
593
|
-
RecordChangeFeed.
|
|
594
|
-
if (!rangeString || !Number.isInteger(
|
|
600
|
+
RecordChangeFeed.isInternalIdInRangeString = (rangeString, internalId) => {
|
|
601
|
+
if (!rangeString || !Number.isInteger(internalId)) {
|
|
595
602
|
return false;
|
|
596
603
|
}
|
|
597
604
|
for (const part of rangeString.split(",")) {
|
|
@@ -607,12 +614,20 @@ var RecordChangeFeed;
|
|
|
607
614
|
}
|
|
608
615
|
const min = Math.min(start, end);
|
|
609
616
|
const max = Math.max(start, end);
|
|
610
|
-
if (
|
|
617
|
+
if (internalId >= min && internalId <= max) {
|
|
611
618
|
return true;
|
|
612
619
|
}
|
|
613
620
|
}
|
|
614
621
|
return false;
|
|
615
622
|
};
|
|
623
|
+
/**
|
|
624
|
+
* Returns true if the given Entity internal ID falls within the reported range string.
|
|
625
|
+
*
|
|
626
|
+
* The Entity-named form of {@link isInternalIdInRangeString}, kept because it is what the Entity
|
|
627
|
+
* callers already read as. Ranges are not an Entity idea: a Workflow Item reports its own IDs the
|
|
628
|
+
* same way.
|
|
629
|
+
*/
|
|
630
|
+
RecordChangeFeed.isEntityInternalIdInRangeString = (rangeString, entityInternalId) => RecordChangeFeed.isInternalIdInRangeString(rangeString, entityInternalId);
|
|
616
631
|
/**
|
|
617
632
|
* Returns true if the given record ID appears in a comma-separated list string.
|
|
618
633
|
*
|
|
@@ -820,8 +835,23 @@ var RecordChangeFeed;
|
|
|
820
835
|
}
|
|
821
836
|
const isEntityConcept = event.concept === ENTITY_CONCEPT;
|
|
822
837
|
if (!isEntityConcept && params.recordId !== undefined) {
|
|
823
|
-
const
|
|
824
|
-
|
|
838
|
+
const data = typeof event.data === "string" ? event.data : "";
|
|
839
|
+
const numericId = Number(params.recordId);
|
|
840
|
+
const isNumericIdentity = Number.isInteger(numericId)
|
|
841
|
+
&& String(params.recordId).trim() === String(numericId);
|
|
842
|
+
/*
|
|
843
|
+
* A NUMERIC identity is reported as runs, so it is matched against the runs: a Workflow
|
|
844
|
+
* Item asking about ID 7 has to see itself in "5-9" and not only in a list that spells
|
|
845
|
+
* out every ID. Matching runs still finds a plain numeric ID, since one ID is a run of
|
|
846
|
+
* one, so this is what every numeric concept wants.
|
|
847
|
+
*
|
|
848
|
+
* A STRING identity (a Bookmark, a Project View) has no runs to fall inside and arrives
|
|
849
|
+
* as a plain list, which is matched as one.
|
|
850
|
+
*/
|
|
851
|
+
const matched = isNumericIdentity
|
|
852
|
+
? RecordChangeFeed.isInternalIdInRangeString(data, numericId)
|
|
853
|
+
: RecordChangeFeed.isRecordIdInListString(data, params.recordId);
|
|
854
|
+
if (!matched) {
|
|
825
855
|
return false;
|
|
826
856
|
}
|
|
827
857
|
}
|
|
@@ -5617,9 +5647,21 @@ var EntityHistoricData;
|
|
|
5617
5647
|
body["Scenario"] = scenario;
|
|
5618
5648
|
}
|
|
5619
5649
|
const res = yield api.POST("v3/entities/historic", body, Api.PrepReqParams(req));
|
|
5620
|
-
const
|
|
5650
|
+
const seenIds = new Set();
|
|
5651
|
+
const entityIds = records.map(r => r["Entity.ID"]).filter(v => {
|
|
5652
|
+
if (!v || seenIds.has(v))
|
|
5653
|
+
return false;
|
|
5654
|
+
seenIds.add(v);
|
|
5655
|
+
return true;
|
|
5656
|
+
});
|
|
5621
5657
|
ClearCacheByEntityIds(api, entityIds);
|
|
5622
|
-
|
|
5658
|
+
const seenKeys = new Set();
|
|
5659
|
+
for (const attrKey of records.map(r => r.AttrKey).filter(v => {
|
|
5660
|
+
if (!v || seenKeys.has(v))
|
|
5661
|
+
return false;
|
|
5662
|
+
seenKeys.add(v);
|
|
5663
|
+
return true;
|
|
5664
|
+
})) {
|
|
5623
5665
|
api.Cache.RemoveByContains(Entity.GetHistoricContainsKey(attrKey));
|
|
5624
5666
|
}
|
|
5625
5667
|
return {
|
|
@@ -24069,7 +24111,7 @@ function getFirstWrappedArray(data, wrapperKeys) {
|
|
|
24069
24111
|
}
|
|
24070
24112
|
|
|
24071
24113
|
// This is updated with the package.json version on build.
|
|
24072
|
-
const VERSION = "7.1.
|
|
24114
|
+
const VERSION = "7.1.102";
|
|
24073
24115
|
|
|
24074
24116
|
export { VERSION, Account, AccountAudit, AccountConcept, AccountFeatures, AccountInvite, AccountLimits, AccountTemplate, AccountType, AnnDocument, AbstractApi, Api, ApiGetters, BruceApi, GlobalApi, GuardianApi, Assembly, Calculator, ChangeSet, ClientFile, ClientFileValueMap, Bounds, BruceEvent, BruceVariable, CacheControl, Camera, Cartes, Carto, Color, DelayQueue, GeoJson, Geometry, LRUCache, UTC, CustomForm, DashboardView, DataFeed, DataLab, DataLabGroup, DataSource, DataTransform, Comment, Entity, EntityAttachment, EntityAttachmentType, EntityAttribute, EntityComment, EntityCoords, EntityHistoricData, EntityLink, EntityLod, EntityLodCategory, EntityRelation, EntityRelationType, EntitySource, EntityTableView, EntityTag, EntityType, EntityTypeRelation, EntityTypeTrigger, Ontology, OntologyDocument, ENVIRONMENT, ExportBrz, ExportCsv, ExportNsx, ExportUsd, Hexbin, ImportAssembly, ImportCad, ImportCsv, ImportGeoJson, ImportJson, ImportKml, ImportLcc, ImportTif, ImportedFile, Uploader, Markup, UIMarkup, NAVIGATOR_CHAT_EVENT_ENTITY_HIGHLIGHT_APPLIED, NAVIGATOR_CHAT_EVENT_SCENE_CONTEXT_PREFETCHED, NavigatorChatClient, NavigatorMcpWebSocketClient, Plugin, PluginAiTool, ProgramKey, MenuItem, ProjectView, ProjectViewBookmark, ProjectViewBookmarkGroup, ProjectViewLegacy, ProjectViewLegacyBookmark, ProjectViewLegacyTile, ProjectViewTile, ZoomControl, Scenario, HostingLocation, MessageBroker, PendingAction, RecordChangeFeed, Style, Tileset, Tracking, Permission, Session, User, UserGroup, UserMfaMethod, EncryptUtils, MathUtils, ObjectUtils, PathUtils, UrlUtils, WorkflowType, WorkflowItemType };
|
|
24075
24117
|
//# sourceMappingURL=bruce-models.es5.js.map
|