@itwin/ecschema-rpcinterface-tests 5.0.0-dev.50 → 5.0.0-dev.53

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.
@@ -66652,6 +66652,48 @@ class Format extends _SchemaItem__WEBPACK_IMPORTED_MODULE_4__.SchemaItem {
66652
66652
  setStationSeparator(separator) {
66653
66653
  this._base.stationSeparator = separator;
66654
66654
  }
66655
+ /**
66656
+ * @alpha Used in schema editing.
66657
+ */
66658
+ setStationOffsetSize(stationOffsetSize) {
66659
+ this._base.stationOffsetSize = stationOffsetSize;
66660
+ }
66661
+ /**
66662
+ * @alpha Used in schema editing.
66663
+ */
66664
+ setScientificType(scientificType) {
66665
+ this._base.scientificType = scientificType;
66666
+ }
66667
+ /**
66668
+ * @alpha Used in schema editing.
66669
+ */
66670
+ setMinWidth(minWidth) {
66671
+ this._base.minWidth = minWidth;
66672
+ }
66673
+ /**
66674
+ * @alpha Used in schema editing.
66675
+ */
66676
+ setSpacer(spacer) {
66677
+ this._base.spacer = spacer;
66678
+ }
66679
+ /**
66680
+ * @alpha Used in schema editing.
66681
+ */
66682
+ setIncludeZero(includeZero) {
66683
+ this._base.includeZero = includeZero;
66684
+ }
66685
+ /**
66686
+ * @alpha Used in schema editing.
66687
+ */
66688
+ setFormatTraits(formatTraits) {
66689
+ this._base.formatTraits = formatTraits;
66690
+ }
66691
+ /**
66692
+ * @alpha Used in schema editing.
66693
+ */
66694
+ setUnits(units) {
66695
+ this._units = units;
66696
+ }
66655
66697
  }
66656
66698
  /**
66657
66699
  * @internal
@@ -70700,6 +70742,7 @@ class UnitGraph {
70700
70742
  constructor(_context) {
70701
70743
  this._context = _context;
70702
70744
  this._graph = new _Graph__WEBPACK_IMPORTED_MODULE_6__.Graph();
70745
+ this._unitsInProgress = new Map();
70703
70746
  this._graph.setGraph("Unit tree processor");
70704
70747
  }
70705
70748
  /**
@@ -70762,11 +70805,19 @@ class UnitGraph {
70762
70805
  * @param unit Current unit to be added to graph
70763
70806
  */
70764
70807
  async addUnit(unit) {
70808
+ if (this._unitsInProgress.has(unit.key.fullName))
70809
+ return this._unitsInProgress.get(unit.key.fullName);
70765
70810
  if (this._graph.hasNode(unit.key.fullName))
70766
70811
  return;
70767
70812
  this._graph.setNode(unit.key.fullName, unit);
70768
70813
  if (this.isIdentity(unit))
70769
70814
  return;
70815
+ const promise = this.addUnitToGraph(unit);
70816
+ this._unitsInProgress.set(unit.key.fullName, promise);
70817
+ await promise
70818
+ .finally(() => this._unitsInProgress.delete(unit.key.fullName));
70819
+ }
70820
+ async addUnitToGraph(unit) {
70770
70821
  const umap = (0,_Parser__WEBPACK_IMPORTED_MODULE_5__.parseDefinition)(unit.definition);
70771
70822
  const promiseArray = [];
70772
70823
  for (const [key, value] of umap) {
@@ -71879,10 +71930,18 @@ class Flags {
71879
71930
  this.animateRotation = false;
71880
71931
  }
71881
71932
  }
71882
- /** @internal */
71933
+ /** AccuDraw value round off settings. Allows dynamic distance and angle values to be rounded to the nearest increment of the specified units value(s).
71934
+ * @public
71935
+ */
71883
71936
  class RoundOff {
71884
71937
  constructor() {
71938
+ /** Whether rounding is to be applied to the corresponding dynamic distance or angle value.
71939
+ * @note To be considered active, units must also specify at least one increment value.
71940
+ */
71885
71941
  this.active = false;
71942
+ /** Round off increment value(s), meters for distance round off, and radians for angle round off.
71943
+ * @note When multiple values are specified, rounding is based on smallest discernable value at current view zoom.
71944
+ */
71886
71945
  this.units = new Set();
71887
71946
  }
71888
71947
  }
@@ -72049,6 +72108,10 @@ class AccuDraw {
72049
72108
  if (wasActive !== this.isActive)
72050
72109
  this.onCompassDisplayChange(wasActive ? "hide" : "show");
72051
72110
  }
72111
+ /** Get distance round off settings */
72112
+ get distanceRoundOff() { return this._distanceRoundOff; }
72113
+ /** Get angle round off settings */
72114
+ get angleRoundOff() { return this._angleRoundOff; }
72052
72115
  static { this._tempRot = new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d(); }
72053
72116
  /** @internal */
72054
72117
  onInitialized() { this.enableForSession(); }
@@ -78506,16 +78569,12 @@ class DisplayStyleState extends _EntityState__WEBPACK_IMPORTED_MODULE_6__.Elemen
78506
78569
  return this.getRealityModels();
78507
78570
  }
78508
78571
  /** @internal */
78509
- forEachRealityTileTreeRef(func) {
78510
- this.forEachRealityModel((model) => {
78572
+ *getTileTreeRefs() {
78573
+ for (const model of this.realityModels) {
78511
78574
  if (!model.invisible) {
78512
- func(model.treeRef);
78575
+ yield model.treeRef;
78513
78576
  }
78514
- });
78515
- }
78516
- /** @internal */
78517
- forEachTileTreeRef(func) {
78518
- this.forEachRealityTileTreeRef(func);
78577
+ }
78519
78578
  }
78520
78579
  /** Performs logical comparison against another display style. Two display styles are logically equivalent if they have the same name, Id, and settings.
78521
78580
  * @param other The display style to which to compare.
@@ -84209,20 +84268,6 @@ class SnapshotConnection extends IModelConnection {
84209
84268
  await viewState.load(); // loads models for ModelSelector
84210
84269
  return viewState;
84211
84270
  }
84212
- /** Get a thumbnail for a view.
84213
- * @param viewId The id of the view of the thumbnail.
84214
- * @returns A Promise of the ThumbnailProps.
84215
- * @throws "No content" error if invalid thumbnail.
84216
- * @deprecated in 3.x use ViewStore apis
84217
- */
84218
- async getThumbnail(_viewId) {
84219
- // eslint-disable-next-line @typescript-eslint/no-deprecated
84220
- const val = await _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.IModelReadRpcInterface.getClientForRouting(this._iModel.routingContext.token).getViewThumbnail(this._iModel.getRpcProps(), _viewId.toString());
84221
- const intValues = new Uint32Array(val.buffer, 0, 4);
84222
- if (intValues[1] !== _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.ImageSourceFormat.Jpeg && intValues[1] !== _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.ImageSourceFormat.Png)
84223
- throw new _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.NoContentError();
84224
- return { format: intValues[1] === _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.ImageSourceFormat.Jpeg ? "jpeg" : "png", width: intValues[2], height: intValues[3], image: new Uint8Array(val.buffer, 16, intValues[0]) };
84225
- }
84226
84271
  }
84227
84272
  IModelConnection.Views = Views;
84228
84273
  /** Provides access to information about the [Category]($backend)'s stored in an [[IModelConnection]].
@@ -86612,11 +86657,11 @@ class PlanarClipMaskState {
86612
86657
  // For this case, we don't need a maskRange so leave it as null.
86613
86658
  const viewTrees = new Array();
86614
86659
  const thisPriority = this.settings.priority === undefined ? _itwin_core_common__WEBPACK_IMPORTED_MODULE_0__.PlanarClipMaskPriority.RealityModel : this.settings.priority;
86615
- context.viewport.forEachTileTreeRef((ref) => {
86660
+ for (const ref of context.viewport.getTileTreeRefs()) {
86616
86661
  const tree = ref.treeOwner.load();
86617
86662
  if (tree && tree.modelId !== classifiedModelId && ref.planarClipMaskPriority > thisPriority)
86618
86663
  viewTrees.push(ref);
86619
- });
86664
+ }
86620
86665
  return viewTrees;
86621
86666
  }
86622
86667
  // For all other modes we need to let the tree refs in the view state decide which refs need to be drawn
@@ -89114,9 +89159,9 @@ class SpatialViewState extends _ViewState__WEBPACK_IMPORTED_MODULE_6__.ViewState
89114
89159
  computeFitRange(options) {
89115
89160
  // Fit to the union of the ranges of all loaded tile trees.
89116
89161
  const range = options?.baseExtents?.clone() ?? new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Range3d();
89117
- this.forEachTileTreeRef((ref) => {
89162
+ for (const ref of this.getTileTreeRefs()) {
89118
89163
  ref.unionFitRange(range);
89119
- });
89164
+ }
89120
89165
  // Fall back to the project extents if necessary.
89121
89166
  if (range.isNull)
89122
89167
  range.setFrom(this.computeBaseExtents());
@@ -89164,9 +89209,10 @@ class SpatialViewState extends _ViewState__WEBPACK_IMPORTED_MODULE_6__.ViewState
89164
89209
  }
89165
89210
  }
89166
89211
  /** @internal */
89167
- forEachModelTreeRef(func) {
89168
- for (const ref of this._treeRefs)
89169
- func(ref);
89212
+ *getModelTreeRefs() {
89213
+ for (const ref of this._treeRefs) {
89214
+ yield ref;
89215
+ }
89170
89216
  }
89171
89217
  /** @internal */
89172
89218
  createScene(context) {
@@ -92318,11 +92364,12 @@ class ViewState extends _EntityState__WEBPACK_IMPORTED_MODULE_5__.ElementState {
92318
92364
  * map tiles as well call [[Viewport.areAreAllTileTreesLoaded]].
92319
92365
  */
92320
92366
  get areAllTileTreesLoaded() {
92321
- let allLoaded = true;
92322
- this.forEachTileTreeRef((ref) => {
92323
- allLoaded = allLoaded && ref.isLoadingComplete;
92324
- });
92325
- return allLoaded;
92367
+ for (const ref of this.getTileTreeRefs()) {
92368
+ if (!ref.isLoadingComplete) {
92369
+ return false;
92370
+ }
92371
+ }
92372
+ return true;
92326
92373
  }
92327
92374
  /** Get the name of the [[ViewDefinition]] from which this ViewState originated. */
92328
92375
  get name() {
@@ -92366,17 +92413,29 @@ class ViewState extends _EntityState__WEBPACK_IMPORTED_MODULE_5__.ElementState {
92366
92413
  this.setOrigin(this.getOrigin().plus(diff));
92367
92414
  }
92368
92415
  /** Execute a function against each [[TileTreeReference]] associated with this view.
92369
- * @note This may include tile trees not associated with any [[GeometricModelState]] - e.g., context reality data.
92416
+ * This may include tile trees not associated with any [[GeometricModelState]] - e.g., context reality data.
92417
+ * @note This method is inefficient (iteration cannot be aborted) and awkward (callback cannot be async nor return a value). Prefer to iterate using [[getTileTreeRefs]].
92418
+ * @deprecated in 5.0. Use [[getTileTreeRefs]] instead.
92370
92419
  */
92371
92420
  forEachTileTreeRef(func) {
92372
- this.forEachModelTreeRef(func);
92373
- this.displayStyle.forEachTileTreeRef(func);
92421
+ for (const ref of this.getModelTreeRefs()) {
92422
+ func(ref);
92423
+ }
92424
+ for (const ref of this.displayStyle.getTileTreeRefs()) {
92425
+ func(ref);
92426
+ }
92427
+ }
92428
+ *getTileTreeRefs() {
92429
+ yield* this.getModelTreeRefs();
92430
+ yield* this.displayStyle.getTileTreeRefs();
92374
92431
  }
92375
92432
  /** Disclose *all* TileTrees currently in use by this view. This set may include trees not reported by [[forEachTileTreeRef]] - e.g., those used by view attachments, map-draped terrain, etc.
92376
92433
  * @internal
92377
92434
  */
92378
92435
  discloseTileTrees(trees) {
92379
- this.forEachTileTreeRef((ref) => trees.disclose(ref));
92436
+ for (const ref of this.getTileTreeRefs()) {
92437
+ trees.disclose(ref);
92438
+ }
92380
92439
  }
92381
92440
  /** Discloses graphics memory consumed by viewed tile trees and other consumers like view attachments.
92382
92441
  * @internal
@@ -92396,7 +92455,9 @@ class ViewState extends _EntityState__WEBPACK_IMPORTED_MODULE_5__.ElementState {
92396
92455
  }
92397
92456
  /** @internal */
92398
92457
  createScene(context) {
92399
- this.forEachTileTreeRef((ref) => ref.addToScene(context));
92458
+ for (const ref of this.getTileTreeRefs()) {
92459
+ ref.addToScene(context);
92460
+ }
92400
92461
  }
92401
92462
  /** Add view-specific decorations. The base implementation draws the grid. Subclasses must invoke super.decorate()
92402
92463
  * @internal
@@ -92880,13 +92941,13 @@ class ViewState extends _EntityState__WEBPACK_IMPORTED_MODULE_5__.ElementState {
92880
92941
  */
92881
92942
  refreshForModifiedModels(modelIds) {
92882
92943
  let refreshed = false;
92883
- this.forEachModelTreeRef((ref) => {
92944
+ for (const ref of this.getModelTreeRefs()) {
92884
92945
  const tree = ref.treeOwner.tileTree;
92885
92946
  if (undefined !== tree && (undefined === modelIds || _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Id64.has(modelIds, tree.modelId))) {
92886
92947
  ref.treeOwner[Symbol.dispose]();
92887
92948
  refreshed = true;
92888
92949
  }
92889
- });
92950
+ }
92890
92951
  return refreshed;
92891
92952
  }
92892
92953
  /** Determine whether this ViewState has the same coordinate system as another one.
@@ -93941,10 +94002,10 @@ class ViewState2d extends ViewState {
93941
94002
  func(model);
93942
94003
  }
93943
94004
  /** @internal */
93944
- forEachModelTreeRef(func) {
93945
- const ref = this._tileTreeRef;
93946
- if (undefined !== ref)
93947
- func(ref);
94005
+ *getModelTreeRefs() {
94006
+ if (this._tileTreeRef) {
94007
+ yield this._tileTreeRef;
94008
+ }
93948
94009
  }
93949
94010
  createAuxCoordSystem(acsName) { return _AuxCoordSys__WEBPACK_IMPORTED_MODULE_3__.AuxCoordSystem2dState.createNew(acsName, this.iModel); }
93950
94011
  }
@@ -94023,6 +94084,7 @@ __webpack_require__.r(__webpack_exports__);
94023
94084
  /* harmony import */ var _common_ViewRect__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./common/ViewRect */ "../../core/frontend/lib/esm/common/ViewRect.js");
94024
94085
  /* harmony import */ var _Frustum2d__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Frustum2d */ "../../core/frontend/lib/esm/Frustum2d.js");
94025
94086
  /* harmony import */ var _BackgroundMapGeometry__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./BackgroundMapGeometry */ "../../core/frontend/lib/esm/BackgroundMapGeometry.js");
94087
+ /* harmony import */ var _tile_internal__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./tile/internal */ "../../core/frontend/lib/esm/tile/internal.js");
94026
94088
  /*---------------------------------------------------------------------------------------------
94027
94089
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
94028
94090
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -94037,6 +94099,7 @@ __webpack_require__.r(__webpack_exports__);
94037
94099
 
94038
94100
 
94039
94101
 
94102
+
94040
94103
  /** Describes a [[Viewport]]'s viewing volume, plus its size on the screen. A new
94041
94104
  * instance of ViewingSpace is created every time the Viewport's frustum changes.
94042
94105
  * @see [[Viewport.viewingSpace]].
@@ -94247,11 +94310,11 @@ class ViewingSpace {
94247
94310
  this.rotation.setFrom(view.getRotation());
94248
94311
  this.getViewedExtents = () => {
94249
94312
  const extents = this._view.getViewedExtents();
94250
- vp.forEachTiledGraphicsProvider((provider) => {
94251
- provider.forEachTileTreeRef(vp, (ref) => {
94313
+ for (const provider of vp.tiledGraphicsProviders) {
94314
+ for (const ref of _tile_internal__WEBPACK_IMPORTED_MODULE_7__.TiledGraphicsProvider.getTileTreeRefs(provider, vp)) {
94252
94315
  ref.unionFitRange(extents);
94253
- });
94254
- });
94316
+ }
94317
+ }
94255
94318
  return extents;
94256
94319
  };
94257
94320
  // first, make sure none of the deltas are negative
@@ -95178,22 +95241,11 @@ class Viewport {
95178
95241
  */
95179
95242
  async getToolTip(hit) {
95180
95243
  const promises = new Array();
95181
- this.view.forEachTileTreeRef((ref) => {
95244
+ for (const ref of this.getTileTreeRefs()) {
95182
95245
  const promise = ref.getToolTipPromise(hit);
95183
- if (promise)
95246
+ if (promise) {
95184
95247
  promises.push(promise);
95185
- });
95186
- this.forEachMapTreeRef((ref) => {
95187
- const promise = ref.getToolTipPromise(hit);
95188
- if (promise)
95189
- promises.push(promise);
95190
- });
95191
- for (const provider of this.tiledGraphicsProviders) {
95192
- provider.forEachTileTreeRef(this, (ref) => {
95193
- const promise = ref.getToolTipPromise(hit);
95194
- if (promise)
95195
- promises.push(promise);
95196
- });
95248
+ }
95197
95249
  }
95198
95250
  const results = await Promise.all(promises);
95199
95251
  return results.find((result) => undefined !== result) ?? "";
@@ -95207,7 +95259,9 @@ class Viewport {
95207
95259
  const promises = new Array();
95208
95260
  // Execute 'getMapFeatureInfo' on every tree, and make sure to handle exception for each call,
95209
95261
  // so that we get still get results even though a tree has failed.
95210
- this.forEachMapTreeRef(async (tree) => promises.push(tree.getMapFeatureInfo(hit, options).catch(() => undefined)));
95262
+ for (const tree of this.mapTileTreeRefs) {
95263
+ promises.push(tree.getMapFeatureInfo(hit, options).catch(() => undefined));
95264
+ }
95211
95265
  const featureInfo = {};
95212
95266
  const worldPoint = hit.hitPoint.clone();
95213
95267
  const backgroundMapGeometry = hit.viewport.displayStyle.getBackgroundMapGeometry();
@@ -95708,25 +95762,36 @@ class Viewport {
95708
95762
  return this._tiledGraphicsProviders;
95709
95763
  }
95710
95764
  /** @internal */
95711
- forEachTiledGraphicsProvider(func) {
95712
- for (const provider of this._tiledGraphicsProviders)
95713
- func(provider);
95714
- }
95715
- /** @internal */
95716
- forEachTiledGraphicsProviderTree(func) {
95717
- for (const provider of this._tiledGraphicsProviders)
95718
- provider.forEachTileTreeRef(this, (ref) => func(ref));
95765
+ *tiledGraphicsProviderRefs() {
95766
+ for (const provider of this.tiledGraphicsProviders) {
95767
+ yield* _tile_internal__WEBPACK_IMPORTED_MODULE_21__.TiledGraphicsProvider.getTileTreeRefs(provider, this);
95768
+ }
95719
95769
  }
95720
- /** Apply a function to every tile tree reference associated with the map layers displayed by this viewport. */
95770
+ /** Apply a function to every tile tree reference associated with the map layers displayed by this viewport.
95771
+ * @deprecated in 5.0. Use [[mapTileTreeRefs]] instead.
95772
+ */
95721
95773
  forEachMapTreeRef(func) {
95722
95774
  if (this._mapTiledGraphicsProvider)
95723
95775
  this._mapTiledGraphicsProvider.forEachTileTreeRef(this, (ref) => func(ref));
95724
95776
  }
95725
- /** Apply a function to every [[TileTreeReference]] displayed by this viewport. */
95777
+ /** Obtain an iterator over the tile tree references used to render map imagery in this viewport, if any. */
95778
+ get mapTileTreeRefs() {
95779
+ return this._mapTiledGraphicsProvider?.getReferences(this) ?? [];
95780
+ }
95781
+ ;
95782
+ /** Apply a function to every [[TileTreeReference]] displayed by this viewport.
95783
+ * @deprecated in 5.0. Use [[getTileTreeRefs]] instead.
95784
+ */
95726
95785
  forEachTileTreeRef(func) {
95727
- this.view.forEachTileTreeRef(func);
95728
- this.forEachTiledGraphicsProviderTree(func);
95729
- this.forEachMapTreeRef(func);
95786
+ for (const ref of this.getTileTreeRefs()) {
95787
+ func(ref);
95788
+ }
95789
+ }
95790
+ /** Iterate over every [[TileTreeReference]] displayed by this viewport. */
95791
+ *getTileTreeRefs() {
95792
+ yield* this.view.getTileTreeRefs();
95793
+ yield* this.mapTileTreeRefs;
95794
+ yield* this.tiledGraphicsProviderRefs();
95730
95795
  }
95731
95796
  /**
95732
95797
  * Returns true if all [[TileTree]]s required by this viewport have been loaded.
@@ -95745,8 +95810,12 @@ class Viewport {
95745
95810
  * @internal
95746
95811
  */
95747
95812
  discloseTileTrees(trees) {
95748
- this.forEachTiledGraphicsProviderTree((ref) => trees.disclose(ref));
95749
- this.forEachMapTreeRef((ref) => trees.disclose(ref));
95813
+ for (const ref of this.tiledGraphicsProviderRefs()) {
95814
+ trees.disclose(ref);
95815
+ }
95816
+ for (const ref of this.mapTileTreeRefs) {
95817
+ trees.disclose(ref);
95818
+ }
95750
95819
  trees.disclose(this.view);
95751
95820
  }
95752
95821
  /** Register a provider of tile graphics to be drawn in this viewport.
@@ -95778,7 +95847,9 @@ class Viewport {
95778
95847
  /** @internal */
95779
95848
  getTerrainHeightRange() {
95780
95849
  const heightRange = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Range1d.createNull();
95781
- this.forEachTileTreeRef((ref) => ref.getTerrainHeight(heightRange));
95850
+ for (const ref of this.mapTileTreeRefs) {
95851
+ ref.getTerrainHeight(heightRange);
95852
+ }
95782
95853
  return heightRange;
95783
95854
  }
95784
95855
  /** @internal */
@@ -96265,9 +96336,9 @@ class Viewport {
96265
96336
  /** Compute the range of all geometry to be displayed in this viewport. */
96266
96337
  computeViewRange() {
96267
96338
  const fitRange = this.view.computeFitRange();
96268
- this.forEachTiledGraphicsProviderTree((ref) => {
96339
+ for (const ref of this.tiledGraphicsProviderRefs()) {
96269
96340
  ref.unionFitRange(fitRange);
96270
- });
96341
+ }
96271
96342
  return fitRange;
96272
96343
  }
96273
96344
  /** Set or clear the animator for this Viewport.
@@ -97023,10 +97094,13 @@ class ScreenViewport extends Viewport {
97023
97094
  const aboutBox = _IModelApp__WEBPACK_IMPORTED_MODULE_10__.IModelApp.makeModalDiv({ autoClose: true, width: 460, closeBox: true, rootDiv: this.vpDiv.ownerDocument.body }).modal;
97024
97095
  aboutBox.className += " imodeljs-about"; // only added so the CSS knows this is the about dialog
97025
97096
  const logos = _IModelApp__WEBPACK_IMPORTED_MODULE_10__.IModelApp.makeHTMLElement("table", { parent: aboutBox, className: "logo-cards" });
97026
- if (undefined !== _IModelApp__WEBPACK_IMPORTED_MODULE_10__.IModelApp.applicationLogoCard)
97097
+ if (undefined !== _IModelApp__WEBPACK_IMPORTED_MODULE_10__.IModelApp.applicationLogoCard) {
97027
97098
  logos.appendChild(_IModelApp__WEBPACK_IMPORTED_MODULE_10__.IModelApp.applicationLogoCard());
97099
+ }
97028
97100
  logos.appendChild(_IModelApp__WEBPACK_IMPORTED_MODULE_10__.IModelApp.makeIModelJsLogoCard());
97029
- this.forEachTileTreeRef((ref) => ref.addLogoCards(logos, this));
97101
+ for (const ref of this.getTileTreeRefs()) {
97102
+ ref.addLogoCards(logos, this);
97103
+ }
97030
97104
  ev.stopPropagation();
97031
97105
  };
97032
97106
  logo.onclick = showLogos;
@@ -97239,7 +97313,9 @@ class ScreenViewport extends Viewport {
97239
97313
  // Some naughty decorators unwittingly do so by e.g. invalidating the scene in their decorate method.
97240
97314
  this._decorationCache.prohibitRemoval = true;
97241
97315
  context.addFromDecorator(this.view);
97242
- this.forEachTiledGraphicsProviderTree((ref) => context.addFromDecorator(ref));
97316
+ for (const ref of this.tiledGraphicsProviderRefs()) {
97317
+ context.addFromDecorator(ref);
97318
+ }
97243
97319
  for (const decorator of _IModelApp__WEBPACK_IMPORTED_MODULE_10__.IModelApp.viewManager.decorators)
97244
97320
  context.addFromDecorator(decorator);
97245
97321
  ScreenViewport.removeMarkedChildren(this.decorationDiv);
@@ -127591,7 +127667,7 @@ class SolarShadowMap {
127591
127667
  const shadowRange = worldToMapTransform.multiplyRange(iModel.projectExtents);
127592
127668
  // Limit the map to only displayed models.
127593
127669
  const viewTileRange = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Range3d.createNull();
127594
- view.forEachTileTreeRef((ref) => {
127670
+ for (const ref of view.getTileTreeRefs()) {
127595
127671
  if (ref.castsShadows) {
127596
127672
  if (ref.isGlobal) {
127597
127673
  // A shadow-casting tile tree that spans the globe. Limit its range to the viewed extents.
@@ -127607,7 +127683,7 @@ class SolarShadowMap {
127607
127683
  ref.accumulateTransformedRange(viewTileRange, worldToMap, undefined);
127608
127684
  }
127609
127685
  }
127610
- });
127686
+ }
127611
127687
  if (!viewTileRange.isNull)
127612
127688
  viewTileRange.clone(shadowRange);
127613
127689
  // Expand shadow range to include both the shadowers and shadowed portion of background map.
@@ -127636,7 +127712,7 @@ class SolarShadowMap {
127636
127712
  mapToWorld.multiplyPoint3dArrayQuietNormalize(this._shadowFrustum.points);
127637
127713
  const tileRange = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Range3d.createNull();
127638
127714
  scratchFrustumPlanes.init(this._shadowFrustum);
127639
- view.forEachTileTreeRef(((ref) => {
127715
+ for (const ref of view.getTileTreeRefs()) {
127640
127716
  if (!ref.castsShadows)
127641
127717
  return;
127642
127718
  const drawArgs = createDrawArgs(context, this, ref, scratchFrustumPlanes, (tiles) => {
@@ -127647,7 +127723,7 @@ class SolarShadowMap {
127647
127723
  return;
127648
127724
  const tileToMapTransform = worldToMapTransform.multiplyTransformTransform(drawArgs.location, this._scratchTransform);
127649
127725
  drawArgs.tree.draw(drawArgs);
127650
- }));
127726
+ }
127651
127727
  if (tileRange.isNull) {
127652
127728
  this.clearGraphics(true);
127653
127729
  }
@@ -153998,6 +154074,21 @@ var TiledGraphicsProvider;
153998
154074
  return allLoaded;
153999
154075
  }
154000
154076
  TiledGraphicsProvider.isLoadingComplete = isLoadingComplete;
154077
+ /** Obtain an iterator over all of the [[TileTreeReference]]s belonging to this provider that should be drawn in the specified [[Viewport]].
154078
+ * This function invokes [[TiledGraphicsProvider.getReferences]] if implemented by `provider`; otherwise, it populates an iterable from the references
154079
+ * provided by [[TiledGraphicsProvider.forEachTileTreeRef]], which is less efficient.
154080
+ */
154081
+ function getTileTreeRefs(provider, viewport) {
154082
+ if (provider.getReferences) {
154083
+ return provider.getReferences(viewport);
154084
+ }
154085
+ const refs = [];
154086
+ provider.forEachTileTreeRef(viewport, (ref) => {
154087
+ refs.push(ref);
154088
+ });
154089
+ return refs;
154090
+ }
154091
+ TiledGraphicsProvider.getTileTreeRefs = getTileTreeRefs;
154001
154092
  })(TiledGraphicsProvider || (TiledGraphicsProvider = {}));
154002
154093
 
154003
154094
 
@@ -161301,6 +161392,12 @@ __webpack_require__.r(__webpack_exports__);
161301
161392
 
161302
161393
  /** @internal */
161303
161394
  class MapTiledGraphicsProvider {
161395
+ *getReferences(viewport) {
161396
+ if (viewport.viewFlags.backgroundMap) {
161397
+ yield this.backgroundMap;
161398
+ yield this.overlayMap;
161399
+ }
161400
+ }
161304
161401
  forEachTileTreeRef(viewport, func) {
161305
161402
  if (viewport.viewFlags.backgroundMap) {
161306
161403
  func(this.backgroundMap);
@@ -164079,6 +164176,8 @@ class AccuDrawViewportUI extends _AccuDraw__WEBPACK_IMPORTED_MODULE_1__.AccuDraw
164079
164176
  fixedLocation: false,
164080
164177
  /** Layout controls in a single row horizontally instead of in columns vertically as an option when using fixed location. */
164081
164178
  horizontalArrangement: false,
164179
+ /** When controls follow the cursor, the X and Y offsets applied to the current point to position the top left (values in inches based on screen DPI) */
164180
+ cursorOffset: { x: .4, y: .1 },
164082
164181
  /** Replace "^", ";", and ".." with "°" or ":" for easier input. */
164083
164182
  simplifiedInput: true,
164084
164183
  /** Enable simple math operations not supported by quantity parser. */
@@ -164593,11 +164692,12 @@ class AccuDrawViewportUI extends _AccuDraw__WEBPACK_IMPORTED_MODULE_1__.AccuDraw
164593
164692
  return;
164594
164693
  if (undefined !== this._controls && this._controls.overlay.parentElement !== vp.vpDiv)
164595
164694
  this.removeControls(); // Could be enhanced to save/restore partial input of currently focused item...
164695
+ const props = AccuDrawViewportUI.controlProps;
164596
164696
  if (undefined === this._controls) {
164597
164697
  const overlay = vp.addNewDiv("accudraw-overlay", true, 35);
164598
164698
  const div = this.createControlDiv();
164599
164699
  const is3dLayout = vp.view.is3d();
164600
- const isHorizontalLayout = AccuDrawViewportUI.controlProps.horizontalArrangement;
164700
+ const isHorizontalLayout = props.horizontalArrangement;
164601
164701
  overlay.appendChild(div);
164602
164702
  const createFieldAndLock = (item) => {
164603
164703
  const itemField = itemFields[item] = this.createItemField(item);
@@ -164605,7 +164705,7 @@ class AccuDrawViewportUI extends _AccuDraw__WEBPACK_IMPORTED_MODULE_1__.AccuDraw
164605
164705
  itemField.style.left = isHorizontalLayout ? `${columnOffset}px` : "0";
164606
164706
  div.appendChild(itemField);
164607
164707
  if (is3dLayout || _AccuDraw__WEBPACK_IMPORTED_MODULE_1__.ItemField.Z_Item !== item)
164608
- rowOffset += itemField.offsetHeight * AccuDrawViewportUI.controlProps.rowSpacingFactor;
164708
+ rowOffset += itemField.offsetHeight * props.rowSpacingFactor;
164609
164709
  itemWidth = itemField.offsetWidth;
164610
164710
  itemHeight = itemField.offsetHeight;
164611
164711
  const itemLock = itemLocks[item] = this.createItemFieldLock(item);
@@ -164615,7 +164715,7 @@ class AccuDrawViewportUI extends _AccuDraw__WEBPACK_IMPORTED_MODULE_1__.AccuDraw
164615
164715
  div.appendChild(itemLock);
164616
164716
  lockWidth = itemLock.offsetWidth;
164617
164717
  if (is3dLayout || _AccuDraw__WEBPACK_IMPORTED_MODULE_1__.ItemField.Z_Item !== item)
164618
- columnOffset += (itemWidth + lockWidth) * AccuDrawViewportUI.controlProps.columnSpacingFactor;
164718
+ columnOffset += (itemWidth + lockWidth) * props.columnSpacingFactor;
164619
164719
  };
164620
164720
  let rowOffset = 0;
164621
164721
  let columnOffset = 0;
@@ -164632,7 +164732,7 @@ class AccuDrawViewportUI extends _AccuDraw__WEBPACK_IMPORTED_MODULE_1__.AccuDraw
164632
164732
  createFieldAndLock(_AccuDraw__WEBPACK_IMPORTED_MODULE_1__.ItemField.Y_Item);
164633
164733
  createFieldAndLock(_AccuDraw__WEBPACK_IMPORTED_MODULE_1__.ItemField.Z_Item); // Both polar and rectangular modes support Z in 3d views...
164634
164734
  div.style.width = isHorizontalLayout ? `${columnOffset}px` : `${itemWidth + lockWidth + 5}px`;
164635
- div.style.height = isHorizontalLayout ? `${itemHeight * AccuDrawViewportUI.controlProps.rowSpacingFactor}px` : `${rowOffset}px`;
164735
+ div.style.height = isHorizontalLayout ? `${itemHeight * props.rowSpacingFactor}px` : `${rowOffset}px`;
164636
164736
  this._controls = { overlay, div, itemFields, itemLocks };
164637
164737
  this.updateControlVisibility(_AccuDraw__WEBPACK_IMPORTED_MODULE_1__.CompassMode.Polar === this.compassMode, vp.view.is3d());
164638
164738
  this.setFocusItem(this._focusItem);
@@ -164641,13 +164741,13 @@ class AccuDrawViewportUI extends _AccuDraw__WEBPACK_IMPORTED_MODULE_1__.AccuDraw
164641
164741
  }
164642
164742
  const viewRect = vp.viewRect;
164643
164743
  const position = vp.worldToView(ev.point);
164644
- if (AccuDrawViewportUI.controlProps.fixedLocation) {
164744
+ if (props.fixedLocation) {
164645
164745
  position.x = (viewRect.left + ((viewRect.width - this._controls.div.offsetWidth) * 0.5));
164646
164746
  position.y = (viewRect.bottom - this._controls.div.offsetHeight);
164647
164747
  }
164648
164748
  else {
164649
- position.x += Math.floor(vp.pixelsFromInches(0.4)) + 0.5;
164650
- position.y += Math.floor(vp.pixelsFromInches(0.1)) + 0.5;
164749
+ position.x += Math.floor(vp.pixelsFromInches(props.cursorOffset.x)) + 0.5;
164750
+ position.y += Math.floor(vp.pixelsFromInches(props.cursorOffset.y)) + 0.5;
164651
164751
  }
164652
164752
  const controlRect = new _common_ViewRect__WEBPACK_IMPORTED_MODULE_2__.ViewRect(position.x, position.y, position.x + this._controls.div.offsetWidth, position.y + this._controls.div.offsetHeight);
164653
164753
  this.modifyControlRect(controlRect, vp);
@@ -290268,9 +290368,9 @@ class Formatter {
290268
290368
  const currentLabel = spec.unitConversions[i].label;
290269
290369
  const unitConversion = spec.unitConversions[i].conversion;
290270
290370
  if (i > 0 && unitConversion.factor < 1.0)
290271
- throw new _Exception__WEBPACK_IMPORTED_MODULE_1__.QuantityError(_Exception__WEBPACK_IMPORTED_MODULE_1__.QuantityStatus.InvalidCompositeFormat, `The Format ${spec.format.name} has a invalid unit specification..`);
290371
+ throw new _Exception__WEBPACK_IMPORTED_MODULE_1__.QuantityError(_Exception__WEBPACK_IMPORTED_MODULE_1__.QuantityStatus.InvalidCompositeFormat, `The Format ${spec.format.name} has a invalid unit specification.`);
290272
290372
  if (i > 0 && unitConversion.offset !== 0) // offset should only ever be defined for major unit
290273
- throw new _Exception__WEBPACK_IMPORTED_MODULE_1__.QuantityError(_Exception__WEBPACK_IMPORTED_MODULE_1__.QuantityStatus.InvalidCompositeFormat, `The Format ${spec.format.name} has a invalid unit specification..`);
290373
+ throw new _Exception__WEBPACK_IMPORTED_MODULE_1__.QuantityError(_Exception__WEBPACK_IMPORTED_MODULE_1__.QuantityStatus.InvalidCompositeFormat, `The Format ${spec.format.name} has a invalid unit specification.`);
290274
290374
  let unitValue = 0.0;
290275
290375
  if (spec.format.type === _FormatEnums__WEBPACK_IMPORTED_MODULE_2__.FormatType.Ratio) {
290276
290376
  if (1 !== spec.format.units.length)
@@ -292662,10 +292762,10 @@ class Settings {
292662
292762
  });
292663
292763
  }
292664
292764
  toString() {
292665
- return `Configurations:
292666
- oidc client id: ${this.oidcClientId},
292667
- oidc scopes: ${this.oidcScopes},
292668
- applicationId: ${this.gprid},
292765
+ return `Configurations:
292766
+ oidc client id: ${this.oidcClientId},
292767
+ oidc scopes: ${this.oidcScopes},
292768
+ applicationId: ${this.gprid},
292669
292769
  log level: ${this.logLevel}`;
292670
292770
  }
292671
292771
  }
@@ -305507,7 +305607,7 @@ var loadLanguages = instance.loadLanguages;
305507
305607
  /***/ ((module) => {
305508
305608
 
305509
305609
  "use strict";
305510
- module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.0.0-dev.50","description":"iTwin.js frontend components","main":"lib/cjs/core-frontend.js","module":"lib/esm/core-frontend.js","typings":"lib/cjs/core-frontend","license":"MIT","scripts":{"build":"npm run -s copy:public && npm run -s build:cjs && npm run -s build:esm && npm run -s webpackWorkers && npm run -s copy:workers","build:cjs":"npm run -s copy:js:cjs && tsc 1>&2 --outDir lib/cjs","build:esm":"npm run -s copy:js:esm && tsc 1>&2 --module ES2022 --outDir lib/esm","clean":"rimraf lib .rush/temp/package-deps*.json","copy:public":"cpx \\"./src/public/**/*\\" ./lib/public","copy:js:cjs":"cpx \\"./src/**/*.js\\" ./lib/cjs","copy:js:esm":"cpx \\"./src/**/*.js\\" ./lib/esm","copy:workers":"cpx \\"./lib/workers/webpack/parse-imdl-worker.js\\" ./lib/public/scripts","docs":"betools docs --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/map/*.d.ts,**/tile/*.d.ts,**/*-css.ts","extract-api":"betools extract-api --entry=core-frontend && npm run extract-extension-api","extract-extension-api":"eslint --no-inline-config -c extraction.eslint.config.js \\"./src/**/*.ts\\" 1>&2","lint":"eslint \\"./src/**/*.ts\\" 1>&2","lint-fix":"eslint --fix -f visualstudio \\"./src/**/*.ts\\" 1>&2","pseudolocalize":"betools pseudolocalize --englishDir ./src/public/locales/en --out ./public/locales/en-PSEUDO","test":"npm run webpackTestWorker && vitest --run","cover":"npm run webpackTestWorker && vitest --run --coverage","test:debug":"vitest --run","webpackTests":"webpack --config ./src/test/utils/webpack.config.js 1>&2 && npm run -s webpackTestWorker","webpackTestWorker":"webpack --config ./src/test/worker/webpack.config.js 1>&2 && cpx \\"./lib/test/test-worker.js\\" ./lib/test","webpackWorkers":"webpack --config ./src/workers/ImdlParser/webpack.config.js 1>&2"},"repository":{"type":"git","url":"https://github.com/iTwin/itwinjs-core.git","directory":"core/frontend"},"keywords":["Bentley","BIM","iModel","digital-twin","iTwin"],"author":{"name":"Bentley Systems, Inc.","url":"http://www.bentley.com"},"peerDependencies":{"@itwin/appui-abstract":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*"},"//devDependencies":["NOTE: All peerDependencies should also be listed as devDependencies since peerDependencies are not considered by npm install","NOTE: All tools used by scripts in this package must be listed as devDependencies"],"devDependencies":{"@itwin/appui-abstract":"workspace:*","@itwin/build-tools":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/eslint-plugin":"5.0.0-dev.1","@types/chai-as-promised":"^7","@vitest/browser":"^2.1.0","@vitest/coverage-v8":"^2.1.0","babel-loader":"~8.2.5","babel-plugin-istanbul":"~6.1.1","cpx2":"^3.0.0","eslint":"^9.13.0","glob":"^10.3.12","playwright":"~1.47.1","rimraf":"^3.0.2","source-map-loader":"^4.0.0","typescript":"~5.6.2","typemoq":"^2.1.0","vitest":"^2.1.0","vite-multiple-assets":"^1.3.1","vite-plugin-static-copy":"1.0.6","webpack":"^5.97.1"},"//dependencies":["NOTE: these dependencies should be only for things that DO NOT APPEAR IN THE API","NOTE: core-frontend should remain UI technology agnostic, so no react/angular dependencies are allowed"],"dependencies":{"@itwin/cloud-agnostic-core":"^2.2.4","@itwin/object-storage-core":"^2.2.5","@itwin/core-i18n":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"^3.1.6","@loaders.gl/draco":"^3.1.6","fuse.js":"^3.3.0","wms-capabilities":"0.4.0"}}');
305610
+ module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.0.0-dev.53","description":"iTwin.js frontend components","main":"lib/cjs/core-frontend.js","module":"lib/esm/core-frontend.js","typings":"lib/cjs/core-frontend","license":"MIT","scripts":{"build":"npm run -s copy:public && npm run -s build:cjs && npm run -s build:esm && npm run -s webpackWorkers && npm run -s copy:workers","build:cjs":"npm run -s copy:js:cjs && tsc 1>&2 --outDir lib/cjs","build:esm":"npm run -s copy:js:esm && tsc 1>&2 --module ES2022 --outDir lib/esm","clean":"rimraf lib .rush/temp/package-deps*.json","copy:public":"cpx \\"./src/public/**/*\\" ./lib/public","copy:js:cjs":"cpx \\"./src/**/*.js\\" ./lib/cjs","copy:js:esm":"cpx \\"./src/**/*.js\\" ./lib/esm","copy:workers":"cpx \\"./lib/workers/webpack/parse-imdl-worker.js\\" ./lib/public/scripts","docs":"betools docs --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/map/*.d.ts,**/tile/*.d.ts,**/*-css.ts","extract-api":"betools extract-api --entry=core-frontend && npm run extract-extension-api","extract-extension-api":"eslint --no-inline-config -c extraction.eslint.config.js \\"./src/**/*.ts\\" 1>&2","lint":"eslint \\"./src/**/*.ts\\" 1>&2","lint-fix":"eslint --fix -f visualstudio \\"./src/**/*.ts\\" 1>&2","pseudolocalize":"betools pseudolocalize --englishDir ./src/public/locales/en --out ./public/locales/en-PSEUDO","test":"npm run webpackTestWorker && vitest --run","cover":"npm run webpackTestWorker && vitest --run --coverage","test:debug":"vitest --run","webpackTests":"webpack --config ./src/test/utils/webpack.config.js 1>&2 && npm run -s webpackTestWorker","webpackTestWorker":"webpack --config ./src/test/worker/webpack.config.js 1>&2 && cpx \\"./lib/test/test-worker.js\\" ./lib/test","webpackWorkers":"webpack --config ./src/workers/ImdlParser/webpack.config.js 1>&2"},"repository":{"type":"git","url":"https://github.com/iTwin/itwinjs-core.git","directory":"core/frontend"},"keywords":["Bentley","BIM","iModel","digital-twin","iTwin"],"author":{"name":"Bentley Systems, Inc.","url":"http://www.bentley.com"},"peerDependencies":{"@itwin/appui-abstract":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*"},"//devDependencies":["NOTE: All peerDependencies should also be listed as devDependencies since peerDependencies are not considered by npm install","NOTE: All tools used by scripts in this package must be listed as devDependencies"],"devDependencies":{"@itwin/appui-abstract":"workspace:*","@itwin/build-tools":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/eslint-plugin":"5.0.0-dev.1","@types/chai-as-promised":"^7","@vitest/browser":"^2.1.0","@vitest/coverage-v8":"^2.1.0","babel-loader":"~8.2.5","babel-plugin-istanbul":"~6.1.1","cpx2":"^3.0.0","eslint":"^9.13.0","glob":"^10.3.12","playwright":"~1.47.1","rimraf":"^3.0.2","source-map-loader":"^4.0.0","typescript":"~5.6.2","typemoq":"^2.1.0","vitest":"^2.1.0","vite-multiple-assets":"^1.3.1","vite-plugin-static-copy":"1.0.6","webpack":"^5.97.1"},"//dependencies":["NOTE: these dependencies should be only for things that DO NOT APPEAR IN THE API","NOTE: core-frontend should remain UI technology agnostic, so no react/angular dependencies are allowed"],"dependencies":{"@itwin/cloud-agnostic-core":"^2.2.4","@itwin/object-storage-core":"^2.2.5","@itwin/core-i18n":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"^3.1.6","@loaders.gl/draco":"^3.1.6","fuse.js":"^3.3.0","wms-capabilities":"0.4.0"}}');
305511
305611
 
305512
305612
  /***/ })
305513
305613