bruce-cesium 5.6.2 → 5.6.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.
Files changed (26) hide show
  1. package/dist/bruce-cesium.es5.js +141 -81
  2. package/dist/bruce-cesium.es5.js.map +1 -1
  3. package/dist/bruce-cesium.umd.js +140 -80
  4. package/dist/bruce-cesium.umd.js.map +1 -1
  5. package/dist/lib/bruce-cesium.js +1 -1
  6. package/dist/lib/rendering/entity-render-engine.js +27 -16
  7. package/dist/lib/rendering/entity-render-engine.js.map +1 -1
  8. package/dist/lib/rendering/getters/entity-filter-getter.js +20 -5
  9. package/dist/lib/rendering/getters/entity-filter-getter.js.map +1 -1
  10. package/dist/lib/rendering/render-managers/common/entity-label.js +1 -1
  11. package/dist/lib/rendering/render-managers/common/entity-label.js.map +1 -1
  12. package/dist/lib/rendering/render-managers/entities/entities-render-manager.js +74 -39
  13. package/dist/lib/rendering/render-managers/entities/entities-render-manager.js.map +1 -1
  14. package/dist/lib/rendering/tileset-styler.js +14 -14
  15. package/dist/lib/rendering/tileset-styler.js.map +1 -1
  16. package/dist/lib/rendering/visual-register-culler.js +1 -2
  17. package/dist/lib/rendering/visual-register-culler.js.map +1 -1
  18. package/dist/lib/rendering/visuals-register.js.map +1 -1
  19. package/dist/lib/utils/entity-utils.js +3 -3
  20. package/dist/lib/utils/entity-utils.js.map +1 -1
  21. package/dist/types/bruce-cesium.d.ts +1 -1
  22. package/dist/types/rendering/entity-render-engine.d.ts +1 -1
  23. package/dist/types/rendering/getters/entity-filter-getter.d.ts +7 -2
  24. package/dist/types/rendering/render-managers/entities/entities-render-manager.d.ts +8 -0
  25. package/dist/types/rendering/visuals-register.d.ts +3 -6
  26. package/package.json +2 -2
@@ -3024,7 +3024,7 @@
3024
3024
  * Returns an array of positions from the entity's currently rendered graphics.
3025
3025
  */
3026
3026
  const evaluateRendered = async () => {
3027
- var _a, _b;
3027
+ var _a;
3028
3028
  const rego = visualRegister ? visualRegister.GetRego({
3029
3029
  entityId: sample.entityId,
3030
3030
  menuItemId: sample.menuItemId
@@ -3034,12 +3034,12 @@
3034
3034
  }
3035
3035
  // If this is a historic Entity but associated with a Tileset, we'll hack the movement in.
3036
3036
  // Our API doesn't account for this at the moment.
3037
- if (rego.visual instanceof Cesium.Cesium3DTileFeature && ((_a = rego.historicLayers) === null || _a === void 0 ? void 0 : _a.length)) {
3037
+ if (rego.visual instanceof Cesium.Cesium3DTileFeature && rego.outline && rego.outline.some(x => !!x.DateTime)) {
3038
3038
  // Get the Tileset.
3039
3039
  const tileset = rego.visual.tileset;
3040
3040
  if (tileset === null || tileset === void 0 ? void 0 : tileset._bruceCoords) {
3041
3041
  // The render logic currently swaps out the UCS location when the assembly is moving.
3042
- const location = (_b = tileset._bruceCoords.ucs) === null || _b === void 0 ? void 0 : _b.location;
3042
+ const location = (_a = tileset._bruceCoords.ucs) === null || _a === void 0 ? void 0 : _a.location;
3043
3043
  if (location) {
3044
3044
  const latitude = EnsureNumber(location.latitude);
3045
3045
  const longitude = EnsureNumber(location.longitude);
@@ -6276,7 +6276,6 @@
6276
6276
  * @returns
6277
6277
  */
6278
6278
  function isCullingIgnored(viewer, rego) {
6279
- var _a;
6280
6279
  if (
6281
6280
  // No rego or visual.
6282
6281
  // This is a safety check to avoid crashes.
@@ -6292,7 +6291,7 @@
6292
6291
  // Won't touch in case there is special logic.
6293
6292
  rego.collection ||
6294
6293
  // We won't cull historic records as they may be interpolating their locations.
6295
- Boolean((_a = rego.historicLayers) === null || _a === void 0 ? void 0 : _a.length)) {
6294
+ Boolean(rego.outline && rego.outline.some(x => !!x.DateTime))) {
6296
6295
  return true;
6297
6296
  }
6298
6297
  const visual = rego.visual;
@@ -8283,26 +8282,37 @@
8283
8282
  * @param rego
8284
8283
  * @param entity
8285
8284
  */
8286
- function isHistoricMetadataChanged(rego, entity) {
8287
- var _a, _b, _c, _d, _e, _f, _g;
8288
- // Different overlay amount.
8289
- if (((_a = rego.historicLayers) === null || _a === void 0 ? void 0 : _a.length) != ((_c = (_b = entity.Bruce) === null || _b === void 0 ? void 0 : _b.HistoricLayers) === null || _c === void 0 ? void 0 : _c.length)) {
8285
+ function isOutlineChanged(rego, entity) {
8286
+ var _a, _b, _c, _d, _e, _f;
8287
+ if (((_a = rego.outline) === null || _a === void 0 ? void 0 : _a.length) != ((_c = (_b = entity.Bruce) === null || _b === void 0 ? void 0 : _b.Outline) === null || _c === void 0 ? void 0 : _c.length)) {
8290
8288
  return true;
8291
8289
  }
8292
- // Both missing. Nothing to compare.
8293
- else if (!rego.historicLayers && !((_d = entity.Bruce) === null || _d === void 0 ? void 0 : _d.HistoricLayers)) {
8290
+ else if (!rego.outline && !((_d = entity.Bruce) === null || _d === void 0 ? void 0 : _d.Outline)) {
8294
8291
  return false;
8295
8292
  }
8296
- // One missing. Definitely different.
8297
- else if (!rego.historicLayers || !((_e = entity.Bruce) === null || _e === void 0 ? void 0 : _e.HistoricLayers)) {
8293
+ else if (!rego.outline || !((_e = entity.Bruce) === null || _e === void 0 ? void 0 : _e.Outline)) {
8298
8294
  return true;
8299
8295
  }
8300
- // Compare each layer.
8301
- for (let i = 0; i < rego.historicLayers.length; i++) {
8302
- if (rego.historicLayers[i].attrKey != ((_f = entity.Bruce) === null || _f === void 0 ? void 0 : _f.HistoricLayers[i].attrKey)) {
8296
+ // Compare each item.
8297
+ for (let i = 0; i < rego.outline.length; i++) {
8298
+ const rOutline = rego.outline[i];
8299
+ const eOutline = (_f = entity.Bruce) === null || _f === void 0 ? void 0 : _f.Outline[i];
8300
+ if (rOutline.Kind !== eOutline.Kind) {
8301
+ return true;
8302
+ }
8303
+ else if (rOutline.DateTime !== eOutline.DateTime) {
8304
+ return true;
8305
+ }
8306
+ else if (rOutline.Scenario !== eOutline.Scenario) {
8303
8307
  return true;
8304
8308
  }
8305
- if (rego.historicLayers[i].dateTime != ((_g = entity.Bruce) === null || _g === void 0 ? void 0 : _g.HistoricLayers[i].dateTime)) {
8309
+ else if (rOutline.Baseline !== eOutline.Baseline) {
8310
+ return true;
8311
+ }
8312
+ else if (rOutline["Source.ID"] !== eOutline["Source.ID"]) {
8313
+ return true;
8314
+ }
8315
+ else if (rOutline["EntityType.Source.ID"] !== eOutline["EntityType.Source.ID"]) {
8306
8316
  return true;
8307
8317
  }
8308
8318
  }
@@ -8400,7 +8410,7 @@
8400
8410
  if (!params.force &&
8401
8411
  newRenderId == oldRenderId &&
8402
8412
  !(existingRego === null || existingRego === void 0 ? void 0 : existingRego.stale) &&
8403
- !isHistoricMetadataChanged(existingRego, entity) &&
8413
+ !isOutlineChanged(existingRego, entity) &&
8404
8414
  ((existingRego === null || existingRego === void 0 ? void 0 : existingRego.scenario) == ((_b = entity.Bruce) === null || _b === void 0 ? void 0 : _b.Scenario))) {
8405
8415
  // No sorting category needed. Already rendered the way we want.
8406
8416
  cEntities.set(id, existingRego.visual);
@@ -8412,7 +8422,7 @@
8412
8422
  // Flag as no longer stale as we're unlikely to recreate the rego if we're reusing the graphic.
8413
8423
  existingRego.stale = false;
8414
8424
  // Update metadata for the same reason.
8415
- existingRego.historicLayers = (_c = entity.Bruce) === null || _c === void 0 ? void 0 : _c.HistoricLayers;
8425
+ existingRego.outline = (_c = entity.Bruce) === null || _c === void 0 ? void 0 : _c.Outline;
8416
8426
  existingRego.entityTypeId = entity.Bruce["EntityType.ID"];
8417
8427
  existingRego.scenario = (_d = entity.Bruce) === null || _d === void 0 ? void 0 : _d.Scenario;
8418
8428
  updated.set(id, true);
@@ -9635,7 +9645,7 @@
9635
9645
  entityId: this.rego.entityId,
9636
9646
  entityTypeId: this.rego.entityTypeId,
9637
9647
  scenario: this.rego.scenario,
9638
- schemaId: this.rego.schemaId,
9648
+ schemaId: this.rego.schema,
9639
9649
  migrated: true
9640
9650
  });
9641
9651
  for (let i = 0; i < attributes.length; i++) {
@@ -12685,8 +12695,7 @@
12685
12695
  // Scenario for retrieving Entities.
12686
12696
  this.scenario = null;
12687
12697
  // Type IDs that we'll allow to be rendered when receiving Entities.
12688
- // This is a band-aid for that fact that locally sourced Entities across Types are trickier to filter out.
12689
- // So we request source info and use that to figure the situation out.
12698
+ // This might be exactly the Menu Item Type ID because of local data sources.
12690
12699
  this.allowedTypeIDs = [];
12691
12700
  const { viewer, apiGetter, monitor, item, register: visualsManager, sharedGetters } = params;
12692
12701
  this.viewer = viewer;
@@ -12708,37 +12717,23 @@
12708
12717
  this.item = params.item;
12709
12718
  }
12710
12719
  (async () => {
12711
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
12720
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
12712
12721
  if (this.disposed) {
12713
12722
  return;
12714
12723
  }
12715
12724
  try {
12716
- // Get type sources to look for locally sourced entity types.
12717
- if ((_a = this.item.BruceEntity) === null || _a === void 0 ? void 0 : _a["EntityType.ID"]) {
12725
+ // Reset allowed list if there's change.
12726
+ if (((_a = this.item.BruceEntity) === null || _a === void 0 ? void 0 : _a["EntityType.ID"]) && !this.allowedTypeIDs.includes((_b = this.item.BruceEntity) === null || _b === void 0 ? void 0 : _b["EntityType.ID"])) {
12718
12727
  this.allowedTypeIDs = [];
12719
- this.allowedTypeIDs.push((_b = this.item.BruceEntity) === null || _b === void 0 ? void 0 : _b["EntityType.ID"]);
12720
- try {
12721
- const api = this.apiGetter.getApi();
12722
- const typeId = (_c = this.item.BruceEntity) === null || _c === void 0 ? void 0 : _c["EntityType.ID"];
12723
- const { Items: items } = await api.GET(`entitytype/${typeId}/sources`);
12724
- for (const item of items) {
12725
- if (item.Type == 0 && item["Source.EntityType.ID"] && (item.Kind == "ENTITY" || item.Kind == "UNSET")) {
12726
- const typeId = item["Source.EntityType.ID"];
12727
- if (typeId && !this.allowedTypeIDs.includes(typeId)) {
12728
- this.allowedTypeIDs.push(typeId);
12729
- }
12730
- }
12731
- }
12732
- }
12733
- catch (e) {
12734
- console.error(e);
12728
+ if ((_c = this.item.BruceEntity) === null || _c === void 0 ? void 0 : _c["EntityType.ID"]) {
12729
+ this.allowedTypeIDs.push((_d = this.item.BruceEntity) === null || _d === void 0 ? void 0 : _d["EntityType.ID"]);
12735
12730
  }
12736
12731
  }
12737
12732
  if (this.disposed) {
12738
12733
  return;
12739
12734
  }
12740
12735
  this.zoomControl = this.item.CameraZoomSettings;
12741
- if (!((_d = this.zoomControl) === null || _d === void 0 ? void 0 : _d.length)) {
12736
+ if (!((_e = this.zoomControl) === null || _e === void 0 ? void 0 : _e.length)) {
12742
12737
  this.zoomControl = [
12743
12738
  {
12744
12739
  MinZoom: 0,
@@ -12758,7 +12753,7 @@
12758
12753
  console.warn("Geojson rendering does not support multiple zoom controls. Only the first one will be used.");
12759
12754
  this.zoomControl = [this.zoomControl[0]];
12760
12755
  }
12761
- this.scenario = (_e = this.item.BruceEntity) === null || _e === void 0 ? void 0 : _e.Scenario;
12756
+ this.scenario = (_f = this.item.BruceEntity) === null || _f === void 0 ? void 0 : _f.Scenario;
12762
12757
  const isTagItem = Boolean(this.item.BruceEntity.ExpandLayers);
12763
12758
  let tagsToRender = isTagItem ? this.item.BruceEntity.SelectedExpandLayers : null;
12764
12759
  if (!tagsToRender) {
@@ -12767,9 +12762,9 @@
12767
12762
  tagsToRender = [].concat(tagsToRender);
12768
12763
  const shouldRender = !isTagItem || tagsToRender.length > 0;
12769
12764
  this.unsetGetter();
12770
- (_f = this.viewMonitorRemoval) === null || _f === void 0 ? void 0 : _f.call(this);
12765
+ (_g = this.viewMonitorRemoval) === null || _g === void 0 ? void 0 : _g.call(this);
12771
12766
  this.viewMonitorRemoval = null;
12772
- (_g = this.entityCheckQueue) === null || _g === void 0 ? void 0 : _g.Dispose();
12767
+ (_h = this.entityCheckQueue) === null || _h === void 0 ? void 0 : _h.Dispose();
12773
12768
  this.entityCheckQueue = null;
12774
12769
  clearInterval(this.renderQueueInterval);
12775
12770
  this.renderQueueInterval = null;
@@ -12781,17 +12776,17 @@
12781
12776
  menuItemId: this.item.id,
12782
12777
  retainTagIds: tagsToRender
12783
12778
  });
12784
- (_h = this.clustering) === null || _h === void 0 ? void 0 : _h.Dispose();
12779
+ (_j = this.clustering) === null || _j === void 0 ? void 0 : _j.Dispose();
12785
12780
  }
12786
12781
  else {
12787
12782
  this.visualsManager.RemoveRegos({
12788
12783
  menuItemId: this.item.id
12789
12784
  });
12790
- (_j = this.clustering) === null || _j === void 0 ? void 0 : _j.Dispose();
12785
+ (_k = this.clustering) === null || _k === void 0 ? void 0 : _k.Dispose();
12791
12786
  return;
12792
12787
  }
12793
12788
  if (this.item.enableClustering) {
12794
- this.clustering = new PointClustering(this.visualsManager, this.item.id, (_k = this.item) === null || _k === void 0 ? void 0 : _k.clustering);
12789
+ this.clustering = new PointClustering(this.visualsManager, this.item.id, (_l = this.item) === null || _l === void 0 ? void 0 : _l.clustering);
12795
12790
  }
12796
12791
  this.setGetter();
12797
12792
  this.viewMonitorRemoval = this.monitor.Updated().Subscribe(() => {
@@ -12811,6 +12806,50 @@
12811
12806
  }
12812
12807
  })();
12813
12808
  }
12809
+ /**
12810
+ * Updates allowedTypeIDs values based in incoming data.
12811
+ * We might request 'x' Entity Type, but get 'y' Entities due to local Data Sources.
12812
+ * So we'll dynamically construct allowed type IDs to help filter out unwanted Entities from further ReRender calls.
12813
+ * @param typeSources
12814
+ * @param entities
12815
+ */
12816
+ updateAllowedTypeIDs(typeSources, entities) {
12817
+ var _a, _b;
12818
+ const sourceLookup = new Map();
12819
+ if (typeSources) {
12820
+ for (const source of typeSources) {
12821
+ sourceLookup.set(source.ID, source);
12822
+ }
12823
+ }
12824
+ for (let i = 0; i < entities.length; i++) {
12825
+ const entity = entities[i];
12826
+ const typeId = (_a = entity.Bruce) === null || _a === void 0 ? void 0 : _a["EntityType.ID"];
12827
+ if (!typeId || this.allowedTypeIDs.includes(typeId)) {
12828
+ continue;
12829
+ }
12830
+ // If an Entity is not from the allowed Entity Type, but has a source matching it, then it's allowed.
12831
+ // Therefor we will add it to the allowedTypeIDs list.
12832
+ if (!((_b = entity.Bruce["Sources"]) === null || _b === void 0 ? void 0 : _b.length)) {
12833
+ continue;
12834
+ }
12835
+ const sources = entity.Bruce["Sources"];
12836
+ for (const source of sources) {
12837
+ if (!source["EntityType.Source.ID"]) {
12838
+ continue;
12839
+ }
12840
+ const sRecord = sourceLookup.get(source["EntityType.Source.ID"]);
12841
+ if (!sRecord) {
12842
+ continue;
12843
+ }
12844
+ if (sRecord["EntityType.ID"] && this.allowedTypeIDs.includes(sRecord["EntityType.ID"])) {
12845
+ const toAddTypeId = sRecord["Source.EntityType.ID"];
12846
+ if (toAddTypeId && !this.allowedTypeIDs.includes(toAddTypeId)) {
12847
+ this.allowedTypeIDs.push(toAddTypeId);
12848
+ }
12849
+ }
12850
+ }
12851
+ }
12852
+ }
12814
12853
  setGetter() {
12815
12854
  var _a, _b, _c;
12816
12855
  this.unsetGetter();
@@ -12842,9 +12881,14 @@
12842
12881
  zoomControl: this.zoomControl
12843
12882
  });
12844
12883
  this.getter.IncludeMenuItem(this.item.id, this.item.BruceEntity["EntityType.ID"], (tagsToRender === null || tagsToRender === void 0 ? void 0 : tagsToRender.length) ? tagsToRender : [], minMax[0], minMax[1]);
12845
- this.getterSub = this.getter.OnUpdate.Subscribe((entities) => {
12884
+ this.getterSub = this.getter.OnUpdate.Subscribe((data) => {
12885
+ var _a;
12886
+ if (!((_a = data === null || data === void 0 ? void 0 : data.entities) === null || _a === void 0 ? void 0 : _a.length)) {
12887
+ return;
12888
+ }
12889
+ this.updateAllowedTypeIDs(data.entityTypeSources, data.entities);
12846
12890
  if (isTagItem) {
12847
- this.distributeForRender(entities.filter((entity) => {
12891
+ this.distributeForRender(data.entities.filter((entity) => {
12848
12892
  let entityTags = entity.Bruce["Layer.ID"];
12849
12893
  if (!entityTags) {
12850
12894
  entityTags = [];
@@ -12855,7 +12899,7 @@
12855
12899
  }));
12856
12900
  }
12857
12901
  else {
12858
- this.distributeForRender(entities);
12902
+ this.distributeForRender(data.entities);
12859
12903
  }
12860
12904
  });
12861
12905
  }
@@ -13330,7 +13374,7 @@
13330
13374
  * @returns
13331
13375
  */
13332
13376
  const register = (thing) => {
13333
- var _a, _b, _c, _d, _e, _f;
13377
+ var _a, _b, _c, _d, _e, _f, _g, _h;
13334
13378
  // See if the cesium entity already exists in a group.
13335
13379
  let group = groups.find((x) => { var _a; return ((_a = x.visual) === null || _a === void 0 ? void 0 : _a.id) == thing.id || x.siblings.find(x => (x === null || x === void 0 ? void 0 : x.id) == thing.id); });
13336
13380
  if (group) {
@@ -13373,7 +13417,8 @@
13373
13417
  })) !== null && _d !== void 0 ? _d : "Unnamed Entity" : "Unnamed Entity",
13374
13418
  cdn: this.item.cdnEnabled,
13375
13419
  collection: source.entities,
13376
- scenario: (_f = (_e = group.data) === null || _e === void 0 ? void 0 : _e.Bruce) === null || _f === void 0 ? void 0 : _f.Scenario
13420
+ scenario: (_f = (_e = group.data) === null || _e === void 0 ? void 0 : _e.Bruce) === null || _f === void 0 ? void 0 : _f.Scenario,
13421
+ outline: (_h = (_g = group.data) === null || _g === void 0 ? void 0 : _g.Bruce) === null || _h === void 0 ? void 0 : _h.Outline,
13377
13422
  };
13378
13423
  group.rego = rego;
13379
13424
  this.visualsManager.AddRego({
@@ -13442,7 +13487,7 @@
13442
13487
  });
13443
13488
  entitiesHistoric = historicData.recordsByIds;
13444
13489
  // Remove ones with no historicAttrKey and no historic data.
13445
- const toRemoveIds = entities.filter(x => { var _a, _b; return !((_b = (_a = x.Bruce) === null || _a === void 0 ? void 0 : _a.HistoricLayers) === null || _b === void 0 ? void 0 : _b.length) && !entitiesHistoric[x.Bruce.ID]; }).map(x => x.Bruce.ID);
13490
+ const toRemoveIds = entities.filter(x => { var _a, _b; return !((_b = (_a = x.Bruce) === null || _a === void 0 ? void 0 : _a.Outline) === null || _b === void 0 ? void 0 : _b.length) && !entitiesHistoric[x.Bruce.ID]; }).map(x => x.Bruce.ID);
13446
13491
  for (let i = 0; i < toRemoveIds.length; i++) {
13447
13492
  const removeId = toRemoveIds[i];
13448
13493
  this.visualsManager.RemoveRegos({
@@ -13457,7 +13502,7 @@
13457
13502
  // Not interpolating.
13458
13503
  // So we'll see if the Entities have a historic key or not.
13459
13504
  else {
13460
- const toRemoveIds = entities.filter(x => { var _a; return !((_a = x.Bruce) === null || _a === void 0 ? void 0 : _a.HistoricLayers); }).map(x => x.Bruce.ID);
13505
+ const toRemoveIds = entities.filter(x => { var _a; return !((_a = x.Bruce) === null || _a === void 0 ? void 0 : _a.Outline); }).map(x => x.Bruce.ID);
13461
13506
  for (let i = 0; i < toRemoveIds.length; i++) {
13462
13507
  const removeId = toRemoveIds[i];
13463
13508
  this.visualsManager.RemoveRegos({
@@ -13509,7 +13554,7 @@
13509
13554
  const rego = {
13510
13555
  canEdit: true,
13511
13556
  entityId: id,
13512
- schemaId: (_f = entity.Bruce) === null || _f === void 0 ? void 0 : _f.SchemaID,
13557
+ schema: (_f = entity.Bruce) === null || _f === void 0 ? void 0 : _f.SchemaID,
13513
13558
  menuItemId: this.item.id,
13514
13559
  menuItemType: this.item.Type,
13515
13560
  visual: cEntity,
@@ -13520,7 +13565,7 @@
13520
13565
  overrideShow: wasClustered ? false : null,
13521
13566
  name: cEntity.name,
13522
13567
  cdn: this.item.cdnEnabled,
13523
- historicLayers: (_g = entity.Bruce) === null || _g === void 0 ? void 0 : _g.HistoricLayers,
13568
+ outline: (_g = entity.Bruce) === null || _g === void 0 ? void 0 : _g.Outline,
13524
13569
  scenario: (_h = entity.Bruce) === null || _h === void 0 ? void 0 : _h.Scenario
13525
13570
  };
13526
13571
  this.visualsManager.AddRego({
@@ -13533,9 +13578,9 @@
13533
13578
  rego.visual = cEntity;
13534
13579
  rego.entityTypeId = entity.Bruce["EntityType.ID"];
13535
13580
  rego.tagIds = ((_j = entity.Bruce) === null || _j === void 0 ? void 0 : _j["Layer.ID"]) ? [].concat(entity.Bruce["Layer.ID"]) : [];
13536
- rego.historicLayers = (_k = entity.Bruce) === null || _k === void 0 ? void 0 : _k.HistoricLayers;
13581
+ rego.outline = (_k = entity.Bruce) === null || _k === void 0 ? void 0 : _k.Outline;
13537
13582
  rego.cdn = this.item.cdnEnabled;
13538
- rego.schemaId = (_l = entity.Bruce) === null || _l === void 0 ? void 0 : _l.SchemaID;
13583
+ rego.schema = (_l = entity.Bruce) === null || _l === void 0 ? void 0 : _l.SchemaID;
13539
13584
  rego.scenario = (_m = entity.Bruce) === null || _m === void 0 ? void 0 : _m.Scenario;
13540
13585
  // Marked as stale meaning some change was performed that requires a refresh.
13541
13586
  // This usually means a new sibling was added that we need to update.
@@ -15789,16 +15834,16 @@
15789
15834
  this.entityGatherer.Queue(needsDataIds, highPriority);
15790
15835
  }
15791
15836
  }
15792
- styleTilesetFeature(entity) {
15793
- this.styleTilesetFeatureFullData(entity, null, []);
15837
+ styleTilesetFeature(rego) {
15838
+ this.styleTilesetFeatureFullData(rego, null, []);
15794
15839
  }
15795
- styleTilesetFeatureFullData(entity, data, tags) {
15840
+ styleTilesetFeatureFullData(rego, data, tags) {
15796
15841
  var _a, _b, _c, _d, _e, _f, _g, _h;
15797
- const visual = entity.visual;
15842
+ const visual = rego.visual;
15798
15843
  if (!visual || !(visual instanceof Cesium.Cesium3DTileFeature)) {
15799
15844
  return;
15800
15845
  }
15801
- const style = this.getTilesetFeatureStyle(entity.entityTypeId);
15846
+ const style = this.getTilesetFeatureStyle(rego.entityTypeId);
15802
15847
  const bColor = style && ((_a = style.modelStyle) === null || _a === void 0 ? void 0 : _a.fillColor) ? BModels.Calculator.GetColor(style.modelStyle.fillColor, data, tags) : null;
15803
15848
  let cColor = null;
15804
15849
  if (bColor == null) {
@@ -15807,15 +15852,15 @@
15807
15852
  else {
15808
15853
  cColor = colorToCColor$3(bColor);
15809
15854
  }
15810
- const override = this.overrideFeatureColor.get(entity.entityId) == true;
15855
+ const override = this.overrideFeatureColor.get(rego.entityId) == true;
15811
15856
  exports.CesiumEntityStyler.SetDefaultColor({
15812
15857
  color: cColor,
15813
15858
  entity: visual,
15814
15859
  viewer: this.viewer,
15815
15860
  override: override
15816
15861
  });
15817
- this.overrideFeatureColor.set(entity.entityId, true);
15818
- this.styledEntityIds.set(entity.entityId, true);
15862
+ this.overrideFeatureColor.set(rego.entityId, true);
15863
+ this.styledEntityIds.set(rego.entityId, true);
15819
15864
  this._styleProgressQueue.Call();
15820
15865
  // Since we only need to update it for scenarios right now.
15821
15866
  // We'll avoid doing it if not needed, eg: first render and no scenario (same state as default).
@@ -15823,13 +15868,13 @@
15823
15868
  // Update the Entity's rego state.
15824
15869
  let changed = false;
15825
15870
  // Changed scenario.
15826
- if (entity.scenario != ((_c = data === null || data === void 0 ? void 0 : data.Bruce) === null || _c === void 0 ? void 0 : _c.Scenario)) {
15827
- entity.scenario = (_d = data === null || data === void 0 ? void 0 : data.Bruce) === null || _d === void 0 ? void 0 : _d.Scenario;
15871
+ if (rego.scenario != ((_c = data === null || data === void 0 ? void 0 : data.Bruce) === null || _c === void 0 ? void 0 : _c.Scenario)) {
15872
+ rego.scenario = (_d = data === null || data === void 0 ? void 0 : data.Bruce) === null || _d === void 0 ? void 0 : _d.Scenario;
15828
15873
  changed = true;
15829
15874
  }
15830
15875
  // Changed historic.
15831
- if ((data && isHistoricMetadataChanged(entity, data)) || (!data && ((_e = entity.historicLayers) === null || _e === void 0 ? void 0 : _e.length) && !((_g = (_f = data.Bruce) === null || _f === void 0 ? void 0 : _f.HistoricLayers) === null || _g === void 0 ? void 0 : _g.length))) {
15832
- entity.historicLayers = (_h = data === null || data === void 0 ? void 0 : data.Bruce) === null || _h === void 0 ? void 0 : _h.HistoricLayers;
15876
+ if ((data && isOutlineChanged(rego, data)) || (!data && ((_e = rego.outline) === null || _e === void 0 ? void 0 : _e.length) && !((_g = (_f = data.Bruce) === null || _f === void 0 ? void 0 : _f.Outline) === null || _g === void 0 ? void 0 : _g.length))) {
15877
+ rego.outline = (_h = data === null || data === void 0 ? void 0 : data.Bruce) === null || _h === void 0 ? void 0 : _h.Outline;
15833
15878
  changed = true;
15834
15879
  }
15835
15880
  // Something changed, trigger a rego update.
@@ -15837,8 +15882,8 @@
15837
15882
  if (changed) {
15838
15883
  this.register.OnUpdate.Trigger({
15839
15884
  type: exports.VisualsRegister.EVisualUpdateType.Update,
15840
- entityId: entity.entityId,
15841
- rego: entity
15885
+ entityId: rego.entityId,
15886
+ rego: rego
15842
15887
  });
15843
15888
  }
15844
15889
  }
@@ -17005,7 +17050,9 @@
17005
17050
  response = {
17006
17051
  entities: tmpResponse.Items ? tmpResponse.Items : [],
17007
17052
  nextPage: tmpResponse.NextPage,
17008
- nextPageUrl: tmpResponse.NextPageURL
17053
+ nextPageUrl: tmpResponse.NextPageURL,
17054
+ sources: tmpResponse.Source,
17055
+ entityTypeSources: tmpResponse["EntityType.Source"]
17009
17056
  };
17010
17057
  }
17011
17058
  else {
@@ -17044,7 +17091,11 @@
17044
17091
  const entities = response.entities;
17045
17092
  const integrity = this.getIntegrityId();
17046
17093
  if (loopIntegrity == integrity && entities) {
17047
- (_c = this.onUpdate) === null || _c === void 0 ? void 0 : _c.Trigger(entities);
17094
+ (_c = this.onUpdate) === null || _c === void 0 ? void 0 : _c.Trigger({
17095
+ entities: entities,
17096
+ sources: response.sources,
17097
+ entityTypeSources: response.entityTypeSources
17098
+ });
17048
17099
  }
17049
17100
  if (this.gatheredIntegrity != integrity) {
17050
17101
  this.gatheredIntegrity = integrity;
@@ -17167,12 +17218,14 @@
17167
17218
  // Controller we can use to abort the request when a new loop starts.
17168
17219
  const controller = this.historicRefreshAbortController = new AbortController();
17169
17220
  let entities = [];
17221
+ let sources = [];
17222
+ let entityTypeSources = [];
17170
17223
  await exports.SharedGetters.Queue.Run("Refreshing historic data in Menu Item that loads Entity Type: " + this.typeIds, async () => {
17171
17224
  var _a;
17172
17225
  if (controller.signal.aborted || !((_a = this.GetMenuItems()) === null || _a === void 0 ? void 0 : _a.length)) {
17173
17226
  return;
17174
17227
  }
17175
- entities = (await BModels.Entity.GetList({
17228
+ const data = await BModels.Entity.GetList({
17176
17229
  api: this.api,
17177
17230
  scenario: this.scenario,
17178
17231
  historicKey: this.historicAttrKey,
@@ -17203,7 +17256,10 @@
17203
17256
  noCache: true,
17204
17257
  abortSignal: controller.signal
17205
17258
  }
17206
- })).entities;
17259
+ });
17260
+ entities = data.entities;
17261
+ sources = data.sources;
17262
+ entityTypeSources = data.entityTypeSources;
17207
17263
  });
17208
17264
  // Date changed.
17209
17265
  if (this.historicAttrDateTime != historicAttrDateTime) {
@@ -17217,7 +17273,11 @@
17217
17273
  if (!this.GetMenuItems().length) {
17218
17274
  break;
17219
17275
  }
17220
- (_a = this.onUpdate) === null || _a === void 0 ? void 0 : _a.Trigger(entities);
17276
+ (_a = this.onUpdate) === null || _a === void 0 ? void 0 : _a.Trigger({
17277
+ entities: entities,
17278
+ sources: sources,
17279
+ entityTypeSources: entityTypeSources
17280
+ });
17221
17281
  }
17222
17282
  }
17223
17283
  catch (e) {
@@ -31557,10 +31617,10 @@
31557
31617
  }
31558
31618
  }
31559
31619
 
31560
- const VERSION = "5.6.2";
31620
+ const VERSION = "5.6.4";
31561
31621
 
31562
31622
  exports.VERSION = VERSION;
31563
- exports.isHistoricMetadataChanged = isHistoricMetadataChanged;
31623
+ exports.isOutlineChanged = isOutlineChanged;
31564
31624
  exports.CesiumParabola = CesiumParabola;
31565
31625
  exports.CESIUM_INSPECTOR_KEY = CESIUM_INSPECTOR_KEY;
31566
31626
  exports.CESIUM_TIMELINE_KEY = CESIUM_TIMELINE_KEY;