bruce-cesium 4.7.7 → 4.7.8

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.
@@ -1,6 +1,6 @@
1
1
  import { BruceEvent, Cartes, Entity as Entity$1, Carto, Geometry, MathUtils, LRUCache, Api, Calculator, ClientFile, EntityTag, EntityType, ObjectUtils, Style, ProjectViewTile, DelayQueue, EntityLod, Bounds, ZoomControl, EntityRelationType, ENVIRONMENT, EntityHistoricData, Tileset, EntityCoords, DataLab, EntitySource, MenuItem, EntityRelation, ProgramKey, ProjectView, ProjectViewBookmark, Camera, ProjectViewLegacyTile, EntityAttribute, EntityAttachment, EntityAttachmentType, AbstractApi, Session } from 'bruce-models';
2
2
  import * as Cesium from 'cesium';
3
- import { Cartographic, Cartesian2, Math as Math$1, Cartesian3, CallbackProperty, Color, HeightReference, Rectangle, JulianDate, Entity, DistanceDisplayCondition, ClassificationType, ArcType, CornerType, ShadowMode, ConstantProperty, ConstantPositionProperty, PolygonHierarchy, PolylineGraphics, ColorMaterialProperty, HorizontalOrigin, VerticalOrigin, ColorBlendMode, HeadingPitchRoll, Transforms, Model, SceneMode, GeoJsonDataSource, Primitive, Cesium3DTileFeature, Cesium3DTileColorBlendMode, HeadingPitchRange, Cesium3DTileStyle, Ion, KmlDataSource, OrthographicFrustum, EasingFunction, NearFarScalar, SceneTransforms, EllipsoidTerrainProvider, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, IonImageryProvider, CesiumTerrainProvider, CesiumInspector, defined, ClockRange, EllipsoidGeodesic, sampleTerrainMostDetailed, Cesium3DTileset, PolygonPipeline, Matrix4, Matrix3, IonResource, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, PolylineDashMaterialProperty, BoundingSphere, GeometryInstance, Quaternion, ScreenSpaceEventHandler, ScreenSpaceEventType, CzmlDataSource, Intersect, Fullscreen } from 'cesium';
3
+ import { Cartographic, Cartesian2, Math as Math$1, Cartesian3, CallbackProperty, Color, HeightReference, Rectangle, JulianDate, Entity, DistanceDisplayCondition, ClassificationType, ArcType, CornerType, ShadowMode, ConstantProperty, ConstantPositionProperty, PolygonHierarchy, PolylineGraphics, ColorMaterialProperty, HorizontalOrigin, VerticalOrigin, ColorBlendMode, HeadingPitchRoll, Transforms, Model, SceneMode, GeoJsonDataSource, Primitive, Cesium3DTileFeature, Cesium3DTileColorBlendMode, HeadingPitchRange, Cesium3DTileStyle, Ion, KmlDataSource, OrthographicFrustum, EasingFunction, NearFarScalar, SceneTransforms, EllipsoidTerrainProvider, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, IonImageryProvider, CesiumTerrainProvider, CesiumInspector, defined, ClockRange, EllipsoidGeodesic, sampleTerrainMostDetailed, Cesium3DTileset, PolygonPipeline, Matrix4, Matrix3, IonResource, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, PolylineDashMaterialProperty, Quaternion, ScreenSpaceEventHandler, ScreenSpaceEventType, BoundingSphere, GeometryInstance, CzmlDataSource, Intersect, Fullscreen } from 'cesium';
4
4
 
5
5
  /*! *****************************************************************************
6
6
  Copyright (c) Microsoft Corporation. All rights reserved.
@@ -12721,12 +12721,12 @@ var EntitiesRenderManager;
12721
12721
  * @returns
12722
12722
  */
12723
12723
  Manager.prototype.renderAsIndividuals = function (entities, force) {
12724
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
12724
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
12725
12725
  if (force === void 0) { force = false; }
12726
12726
  return __awaiter(this, void 0, void 0, function () {
12727
- var entitiesHistoric, startTmp, stopTmp, startStr, stopStr, historicData, toRemoveIds_1, i, removeId, toRemoveIds_2, i, removeId, _o, updated, cEntities, i, entity, id, cEntity, rego, visual, wasClustered, tagIds, rego_1;
12728
- return __generator(this, function (_p) {
12729
- switch (_p.label) {
12727
+ var entitiesHistoric, startTmp, stopTmp, startStr, stopStr, historicData, toRemoveIds_1, i, removeId, toRemoveIds_2, i, removeId, _q, updated, cEntities, i, entity, id, cEntity, rego, visual, wasClustered, tagIds, rego_1;
12728
+ return __generator(this, function (_r) {
12729
+ switch (_r.label) {
12730
12730
  case 0:
12731
12731
  entitiesHistoric = {};
12732
12732
  if (!(((_a = this.item.BruceEntity) === null || _a === void 0 ? void 0 : _a.historicAttrKey) && entities.length)) return [3 /*break*/, 3];
@@ -12743,7 +12743,7 @@ var EntitiesRenderManager;
12743
12743
  api: this.apiGetter.getApi()
12744
12744
  })];
12745
12745
  case 1:
12746
- historicData = _p.sent();
12746
+ historicData = _r.sent();
12747
12747
  entitiesHistoric = historicData.recordsByIds;
12748
12748
  toRemoveIds_1 = entities.filter(function (x) { var _a; return !((_a = x.Bruce) === null || _a === void 0 ? void 0 : _a.HistoricAttrKey) && !entitiesHistoric[x.Bruce.ID]; }).map(function (x) { return x.Bruce.ID; });
12749
12749
  for (i = 0; i < toRemoveIds_1.length; i++) {
@@ -12769,7 +12769,7 @@ var EntitiesRenderManager;
12769
12769
  (_c = this.clustering) === null || _c === void 0 ? void 0 : _c.RemoveEntity(removeId, false);
12770
12770
  }
12771
12771
  entities = entities.filter(function (x) { return !toRemoveIds_2.includes(x.Bruce.ID); });
12772
- _p.label = 3;
12772
+ _r.label = 3;
12773
12773
  case 3:
12774
12774
  if (this.disposed) {
12775
12775
  this.doDispose();
@@ -12790,7 +12790,7 @@ var EntitiesRenderManager;
12790
12790
  optimizeTolerance: this.item.optimizeTolerance,
12791
12791
  })];
12792
12792
  case 4:
12793
- _o = _p.sent(), updated = _o.updated, cEntities = _o.entities;
12793
+ _q = _r.sent(), updated = _q.updated, cEntities = _q.entities;
12794
12794
  if (this.disposed) {
12795
12795
  this.doDispose();
12796
12796
  return [2 /*return*/];
@@ -12823,7 +12823,8 @@ var EntitiesRenderManager;
12823
12823
  name: cEntity.name,
12824
12824
  cdn: this.item.cdnEnabled,
12825
12825
  historicDateTime: (_f = entity.Bruce) === null || _f === void 0 ? void 0 : _f.HistoricDateTime,
12826
- historicAttrKey: (_g = entity.Bruce) === null || _g === void 0 ? void 0 : _g.HistoricAttrKey
12826
+ historicAttrKey: (_g = entity.Bruce) === null || _g === void 0 ? void 0 : _g.HistoricAttrKey,
12827
+ scenario: (_h = entity.Bruce) === null || _h === void 0 ? void 0 : _h["Scenario.ID"]
12827
12828
  };
12828
12829
  this.visualsManager.AddRego({
12829
12830
  rego: rego_1,
@@ -12834,11 +12835,12 @@ var EntitiesRenderManager;
12834
12835
  rego.name = cEntity.name;
12835
12836
  rego.visual = cEntity;
12836
12837
  rego.entityTypeId = entity.Bruce["EntityType.ID"];
12837
- rego.tagIds = ((_h = entity.Bruce) === null || _h === void 0 ? void 0 : _h["Layer.ID"]) ? [].concat(entity.Bruce["Layer.ID"]) : [];
12838
- rego.historicDateTime = (_j = entity.Bruce) === null || _j === void 0 ? void 0 : _j.HistoricDateTime;
12839
- rego.historicAttrKey = (_k = entity.Bruce) === null || _k === void 0 ? void 0 : _k.HistoricAttrKey;
12838
+ rego.tagIds = ((_j = entity.Bruce) === null || _j === void 0 ? void 0 : _j["Layer.ID"]) ? [].concat(entity.Bruce["Layer.ID"]) : [];
12839
+ rego.historicDateTime = (_k = entity.Bruce) === null || _k === void 0 ? void 0 : _k.HistoricDateTime;
12840
+ rego.historicAttrKey = (_l = entity.Bruce) === null || _l === void 0 ? void 0 : _l.HistoricAttrKey;
12840
12841
  rego.cdn = this.item.cdnEnabled;
12841
- rego.schemaId = (_l = entity.Bruce) === null || _l === void 0 ? void 0 : _l.SchemaID;
12842
+ rego.schemaId = (_m = entity.Bruce) === null || _m === void 0 ? void 0 : _m.SchemaID;
12843
+ rego.scenario = (_o = entity.Bruce) === null || _o === void 0 ? void 0 : _o["Scenario.ID"];
12842
12844
  // Marked as stale meaning some change was performed that requires a refresh.
12843
12845
  // This usually means a new sibling was added that we need to update.
12844
12846
  if (rego.stale) {
@@ -12868,7 +12870,7 @@ var EntitiesRenderManager;
12868
12870
  menuItemId: this.item.id,
12869
12871
  requestRender: false
12870
12872
  });
12871
- (_m = this.clustering) === null || _m === void 0 ? void 0 : _m.RemoveEntity(id, false);
12873
+ (_p = this.clustering) === null || _p === void 0 ? void 0 : _p.RemoveEntity(id, false);
12872
12874
  }
12873
12875
  }
12874
12876
  this.viewer.scene.requestRender();
@@ -15992,7 +15994,7 @@ var TilesetCadRenderManager;
15992
15994
  */
15993
15995
  Manager.prototype.mapTilesetFeature = function (feature, add) {
15994
15996
  var _this = this;
15995
- var _a, _b, _c, _d, _e;
15997
+ var _a, _b, _c, _d, _e, _f;
15996
15998
  var rego = {
15997
15999
  entityId: null,
15998
16000
  entityTypeId: null,
@@ -16003,10 +16005,13 @@ var TilesetCadRenderManager;
16003
16005
  accountId: (_b = (_a = this.item.tileset) === null || _a === void 0 ? void 0 : _a.ClientAccountID) !== null && _b !== void 0 ? _b : this.getters.GetAccountId(),
16004
16006
  tilesetId: (_c = this.item.tileset) === null || _c === void 0 ? void 0 : _c.TilesetID,
16005
16007
  tilesetType: Tileset.EType.Cad,
16006
- rootId: this.rootId
16008
+ rootId: this.rootId,
16009
+ // TODO: Scenario is tied to the record, not to the Tileset.
16010
+ // So we need a way to update it when we load the record from styling.
16011
+ scenario: (_d = this.item.BruceEntity) === null || _d === void 0 ? void 0 : _d["Scenario.ID"]
16007
16012
  };
16008
16013
  var featureAny = feature;
16009
- var propertyNames = featureAny.getPropertyNames ? featureAny.getPropertyNames() : (_d = featureAny.getPropertyIds) === null || _d === void 0 ? void 0 : _d.call(featureAny);
16014
+ var propertyNames = featureAny.getPropertyNames ? featureAny.getPropertyNames() : (_e = featureAny.getPropertyIds) === null || _e === void 0 ? void 0 : _e.call(featureAny);
16010
16015
  if (!propertyNames) {
16011
16016
  return null;
16012
16017
  }
@@ -16054,7 +16059,7 @@ var TilesetCadRenderManager;
16054
16059
  }
16055
16060
  // Optional menu item restriction.
16056
16061
  // Allows only showing certain entities from a tileset.
16057
- var onlyIds = (_e = this.item.BruceEntity) === null || _e === void 0 ? void 0 : _e.EntityIds;
16062
+ var onlyIds = (_f = this.item.BruceEntity) === null || _f === void 0 ? void 0 : _f.EntityIds;
16058
16063
  if ((onlyIds === null || onlyIds === void 0 ? void 0 : onlyIds.length) && !onlyIds.includes(rego.entityId)) {
16059
16064
  if (this.item.BruceEntity.Ghosts) {
16060
16065
  feature.color = Color.WHITE.clone().withAlpha(0.5);
@@ -17243,7 +17248,8 @@ var SharedGetters;
17243
17248
  attrFilter: params.attrFilter,
17244
17249
  historicAttrKey: params.historicAttrKey,
17245
17250
  historicInterpolation: params.historicInterpolation,
17246
- viaCdn: params.cdn
17251
+ viaCdn: params.cdn,
17252
+ scenario: params.scenario,
17247
17253
  });
17248
17254
  this.data[cacheKey] = getter;
17249
17255
  /**
@@ -28626,7 +28632,7 @@ var WidgetViewBar = /** @class */ (function (_super) {
28626
28632
  return WidgetViewBar;
28627
28633
  }(Widget.AWidget));
28628
28634
 
28629
- var VERSION = "4.7.7";
28635
+ var VERSION = "4.7.8";
28630
28636
 
28631
28637
  export { VERSION, CesiumViewMonitor, ViewerUtils, ViewerEventTracker, MenuItemManager, EntityRenderEngine, EntityRenderEnginePoint, EntityRenderEnginePolyline, EntityRenderEnginePolygon, EntityRenderEngineModel3d, MenuItemCreator, VisualsRegister, RenderManager, EntitiesIdsRenderManager, DataLabRenderManager, EntitiesLoadedRenderManager, EntitiesRenderManager, EntityRenderManager, TilesetCadRenderManager, TilesetArbRenderManager, TilesetEntitiesRenderManager, TilesetOsmRenderManager, TilesetPointcloudRenderManager, TilesetGooglePhotosRenderManager, DataSourceStaticKmlManager, GoogleSearchRenderManager, RelationsRenderManager, SharedGetters, CesiumParabola, EntityLabel, ViewRenderEngine, TileRenderEngine, TilesetRenderEngine, CESIUM_INSPECTOR_KEY, CESIUM_TIMELINE_KEY, ViewUtils, DrawingUtils, MeasureUtils, EntityUtils, CesiumEntityStyler, CesiumAnimatedProperty, CesiumAnimatedInOut, Draw3dPolygon, Draw3dPolyline, MeasureCreator, Widget, VIEWER_BOOKMARKS_WIDGET_KEY, WidgetBookmarks, WidgetBranding, WidgetCursorBar, WidgetEmbeddedInfoView, WidgetInfoView, WidgetNavCompass$$1 as WidgetNavCompass, VIEWER_VIEW_BAR_WIDGET_KEY, WidgetViewBar, WidgetControlViewBar, WidgetControlViewBarSearch, VIEWER_LEFT_PANEL_WIDGET_KEY, VIEWER_LEFT_PANEL_CSS_VAR_LEFT, WidgetLeftPanel, WidgetLeftPanelTab, WidgetLeftPanelTabBookmarks };
28632
28638
  //# sourceMappingURL=bruce-cesium.es5.js.map