@itwin/rpcinterface-full-stack-tests 4.0.0-dev.72 → 4.0.0-dev.75
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/lib/dist/_d48c.bundled-tests.js.map +1 -1
- package/lib/dist/bundled-tests.js +365 -267
- package/lib/dist/bundled-tests.js.map +1 -1
- package/lib/dist/core_frontend_lib_esm_ApproximateTerrainHeightsProps_js.bundled-tests.js.map +1 -1
- package/lib/dist/object-storage.bundled-tests.js.map +1 -1
- package/lib/dist/vendors-common_temp_node_modules_pnpm_itwin_object-storage-azure_1_5_0_node_modules_itwin_obj-e3e81d.bundled-tests.js.map +1 -1
- package/lib/dist/vendors-common_temp_node_modules_pnpm_loaders_gl_draco_3_3_1_node_modules_loaders_gl_draco_di-d3af41.bundled-tests.js.map +1 -1
- package/lib/dist/vendors-common_temp_node_modules_pnpm_reflect-metadata_0_1_13_node_modules_reflect-metadata_R-610cb3.bundled-tests.js.map +1 -1
- package/lib/frontend/Elements.test.js +1 -2
- package/lib/frontend/Elements.test.js.map +1 -1
- package/lib/frontend/workflows/BasicScenarios.test.js +1 -2
- package/lib/frontend/workflows/BasicScenarios.test.js.map +1 -1
- package/package.json +13 -13
|
@@ -80554,8 +80554,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
80554
80554
|
/* harmony import */ var _IModelApp__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./IModelApp */ "../../core/frontend/lib/esm/IModelApp.js");
|
|
80555
80555
|
/* harmony import */ var _PlanarClipMaskState__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./PlanarClipMaskState */ "../../core/frontend/lib/esm/PlanarClipMaskState.js");
|
|
80556
80556
|
/* harmony import */ var _tile_internal__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./tile/internal */ "../../core/frontend/lib/esm/tile/internal.js");
|
|
80557
|
-
/* harmony import */ var _ViewGlobalLocation__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./ViewGlobalLocation */ "../../core/frontend/lib/esm/ViewGlobalLocation.js");
|
|
80558
|
-
/* harmony import */ var _ModelState__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./ModelState */ "../../core/frontend/lib/esm/ModelState.js");
|
|
80559
80557
|
/*---------------------------------------------------------------------------------------------
|
|
80560
80558
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
80561
80559
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -80573,8 +80571,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
80573
80571
|
|
|
80574
80572
|
|
|
80575
80573
|
|
|
80576
|
-
|
|
80577
|
-
|
|
80578
80574
|
/** @internal */
|
|
80579
80575
|
class TerrainDisplayOverrides {
|
|
80580
80576
|
}
|
|
@@ -80703,10 +80699,6 @@ class DisplayStyleState extends _EntityState__WEBPACK_IMPORTED_MODULE_6__.Elemen
|
|
|
80703
80699
|
this.settings.mapImagery.backgroundBase = base;
|
|
80704
80700
|
this._synchBackgroundMapImagery();
|
|
80705
80701
|
}
|
|
80706
|
-
/** @internal */
|
|
80707
|
-
get backgroundMapLayers() { return this.settings.mapImagery.backgroundLayers; }
|
|
80708
|
-
/** @internal */
|
|
80709
|
-
get overlayMapLayers() { return this.settings.mapImagery.overlayLayers; }
|
|
80710
80702
|
/** The settings controlling how a background map is displayed within a view.
|
|
80711
80703
|
* @see [[ViewFlags.backgroundMap]] for toggling display of the map on or off.
|
|
80712
80704
|
*/
|
|
@@ -80869,29 +80861,25 @@ class DisplayStyleState extends _EntityState__WEBPACK_IMPORTED_MODULE_6__.Elemen
|
|
|
80869
80861
|
model.appearanceOverrides = options.appearanceOverrides;
|
|
80870
80862
|
return true;
|
|
80871
80863
|
}
|
|
80872
|
-
/**
|
|
80873
|
-
* Return if a context reality model is attached.
|
|
80864
|
+
/** Return if a context reality model is attached.
|
|
80874
80865
|
* @see [[ContextRealityModelProps]].
|
|
80875
|
-
|
|
80866
|
+
*/
|
|
80876
80867
|
hasAttachedRealityModel(name, url) {
|
|
80877
80868
|
return undefined !== this.settings.contextRealityModels.models.find((x) => x.matchesNameAndUrl(name, url));
|
|
80878
80869
|
}
|
|
80879
80870
|
/** @internal */
|
|
80880
|
-
getMapLayers(isOverlay) { return isOverlay ? this.
|
|
80881
|
-
/**
|
|
80882
|
-
* Attach a map layer to display style.
|
|
80871
|
+
getMapLayers(isOverlay) { return isOverlay ? this.settings.mapImagery.overlayLayers : this.settings.mapImagery.backgroundLayers; }
|
|
80872
|
+
/** Attach a map layer to display style.
|
|
80883
80873
|
* @param Settings representing the map layer.
|
|
80884
|
-
* @param
|
|
80885
|
-
* @param index where the layer should be inserted. Defaults to -1, appended to end.
|
|
80874
|
+
* @param mapLayerIndex the [[MapLayerIndex]] where the map layer should be attached.
|
|
80886
80875
|
* @public
|
|
80887
|
-
*
|
|
80888
80876
|
*/
|
|
80889
80877
|
attachMapLayer(options) {
|
|
80890
80878
|
const layerSettings = options.settings.clone({});
|
|
80891
80879
|
if (undefined === layerSettings)
|
|
80892
80880
|
return;
|
|
80893
|
-
const isOverlay = options.isOverlay
|
|
80894
|
-
const insertIndex = options.
|
|
80881
|
+
const isOverlay = options.mapLayerIndex.isOverlay;
|
|
80882
|
+
const insertIndex = options.mapLayerIndex.index;
|
|
80895
80883
|
const layers = this.getMapLayers(isOverlay);
|
|
80896
80884
|
if (insertIndex < 0 || insertIndex > (layers.length - 1)) {
|
|
80897
80885
|
this.getMapLayers(isOverlay).push(layerSettings);
|
|
@@ -80901,12 +80889,15 @@ class DisplayStyleState extends _EntityState__WEBPACK_IMPORTED_MODULE_6__.Elemen
|
|
|
80901
80889
|
}
|
|
80902
80890
|
this._synchBackgroundMapImagery();
|
|
80903
80891
|
}
|
|
80904
|
-
/**
|
|
80892
|
+
/**
|
|
80893
|
+
* @param mapLayerIndex the [[MapLayerIndex]] where the map layer should be attached.
|
|
80894
|
+
* @internal
|
|
80895
|
+
*/
|
|
80905
80896
|
attachMapLayerProps(options) {
|
|
80906
80897
|
const settings = _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.MapLayerSettings.fromJSON(options.props);
|
|
80907
80898
|
if (undefined === settings)
|
|
80908
80899
|
return;
|
|
80909
|
-
this.attachMapLayer({ settings,
|
|
80900
|
+
this.attachMapLayer({ settings, mapLayerIndex: options.mapLayerIndex });
|
|
80910
80901
|
}
|
|
80911
80902
|
/** @internal */
|
|
80912
80903
|
hasAttachedMapLayer(name, source, isOverlay) {
|
|
@@ -80916,13 +80907,15 @@ class DisplayStyleState extends _EntityState__WEBPACK_IMPORTED_MODULE_6__.Elemen
|
|
|
80916
80907
|
detachMapLayerByNameAndSource(name, source, isOverlay) {
|
|
80917
80908
|
const index = this.findMapLayerIndexByNameAndSource(name, source, isOverlay);
|
|
80918
80909
|
if (-1 !== index)
|
|
80919
|
-
this.detachMapLayerByIndex(index, isOverlay);
|
|
80910
|
+
this.detachMapLayerByIndex({ index, isOverlay });
|
|
80920
80911
|
}
|
|
80921
80912
|
/** Detach map layer at index (-1 to remove all layers)
|
|
80913
|
+
* @param mapLayerIndex the [[MapLayerIndex]] of the map layer to detach.
|
|
80922
80914
|
* @public
|
|
80923
80915
|
*/
|
|
80924
|
-
detachMapLayerByIndex(
|
|
80925
|
-
const layers = this.getMapLayers(isOverlay);
|
|
80916
|
+
detachMapLayerByIndex(mapLayerIndex) {
|
|
80917
|
+
const layers = this.getMapLayers(mapLayerIndex.isOverlay);
|
|
80918
|
+
const index = mapLayerIndex.index;
|
|
80926
80919
|
if (index < 0)
|
|
80927
80920
|
layers.length = 0;
|
|
80928
80921
|
else
|
|
@@ -80940,9 +80933,13 @@ class DisplayStyleState extends _EntityState__WEBPACK_IMPORTED_MODULE_6__.Elemen
|
|
|
80940
80933
|
findMapLayerIndexByNameAndSource(name, source, isOverlay) {
|
|
80941
80934
|
return this.getMapLayers(isOverlay).findIndex((layer) => layer.matchesNameAndSource(name, source));
|
|
80942
80935
|
}
|
|
80943
|
-
/**
|
|
80944
|
-
|
|
80945
|
-
|
|
80936
|
+
/** Return the map layer settings for a map layer at the provided index.
|
|
80937
|
+
* @param mapLayerIndex the [[MapLayerIndex]] of the map layer.
|
|
80938
|
+
* @public
|
|
80939
|
+
*/
|
|
80940
|
+
mapLayerAtIndex(mapLayerIndex) {
|
|
80941
|
+
const layers = this.getMapLayers(mapLayerIndex.isOverlay);
|
|
80942
|
+
const index = mapLayerIndex.index;
|
|
80946
80943
|
return (index < 0 || index >= layers.length) ? undefined : layers[index];
|
|
80947
80944
|
}
|
|
80948
80945
|
/** Return map base transparency as a number between 0 and 1.
|
|
@@ -80965,8 +80962,7 @@ class DisplayStyleState extends _EntityState__WEBPACK_IMPORTED_MODULE_6__.Elemen
|
|
|
80965
80962
|
}
|
|
80966
80963
|
/** Modify a subset of a map layer settings.
|
|
80967
80964
|
* @param props props JSON representation of the properties to change. Any properties not present will retain their current values.
|
|
80968
|
-
* @param
|
|
80969
|
-
* @param isOverlay true if layer is overlay, otherwise layer is background.
|
|
80965
|
+
* @param mapLayerIndex the [[MapLayerIndex]] where the map layer should be inserted.
|
|
80970
80966
|
*
|
|
80971
80967
|
* Example that changes only the visibility of the first overlay map layer.
|
|
80972
80968
|
* ``` ts
|
|
@@ -80974,16 +80970,21 @@ class DisplayStyleState extends _EntityState__WEBPACK_IMPORTED_MODULE_6__.Elemen
|
|
|
80974
80970
|
* ```
|
|
80975
80971
|
* @public
|
|
80976
80972
|
*/
|
|
80977
|
-
changeMapLayerProps(props,
|
|
80978
|
-
const
|
|
80973
|
+
changeMapLayerProps(props, mapLayerIndex) {
|
|
80974
|
+
const index = mapLayerIndex.index;
|
|
80975
|
+
const layers = this.getMapLayers(mapLayerIndex.isOverlay);
|
|
80979
80976
|
if (index < 0 || index >= layers.length)
|
|
80980
80977
|
return;
|
|
80981
80978
|
layers[index] = layers[index].clone(props);
|
|
80982
80979
|
this._synchBackgroundMapImagery();
|
|
80983
80980
|
}
|
|
80984
|
-
/**
|
|
80985
|
-
|
|
80986
|
-
|
|
80981
|
+
/** Change the credentials for a map layer.
|
|
80982
|
+
* @param mapLayerIndex the [[MapLayerIndex]] of the map layer to change the credentials of.
|
|
80983
|
+
* @public
|
|
80984
|
+
*/
|
|
80985
|
+
changeMapLayerCredentials(mapLayerIndex, userName, password) {
|
|
80986
|
+
const layers = this.getMapLayers(mapLayerIndex.isOverlay);
|
|
80987
|
+
const index = mapLayerIndex.index;
|
|
80987
80988
|
if (index < 0 || index >= layers.length)
|
|
80988
80989
|
return;
|
|
80989
80990
|
const layer = layers[index];
|
|
@@ -80995,13 +80996,12 @@ class DisplayStyleState extends _EntityState__WEBPACK_IMPORTED_MODULE_6__.Elemen
|
|
|
80995
80996
|
/** Modify a subset of a sub-layer settings.
|
|
80996
80997
|
* @param props props JSON representation of the properties to change. Any properties not present will retain their current values.
|
|
80997
80998
|
* @param subLayerId Id of the sub-layer that should be modified.
|
|
80998
|
-
* @param
|
|
80999
|
-
* @param isOverlay true if the map layer is overlay, otherwise layer is background
|
|
80999
|
+
* @param mapLayerIndex the [[MapLayerIndex]] of the map layer that contains the sub-layer to be modified.
|
|
81000
81000
|
*
|
|
81001
81001
|
* @public
|
|
81002
81002
|
*/
|
|
81003
|
-
changeMapSubLayerProps(props, subLayerId,
|
|
81004
|
-
const mapLayerSettings = this.mapLayerAtIndex(
|
|
81003
|
+
changeMapSubLayerProps(props, subLayerId, mapLayerIndex) {
|
|
81004
|
+
const mapLayerSettings = this.mapLayerAtIndex(mapLayerIndex);
|
|
81005
81005
|
if (undefined === mapLayerSettings)
|
|
81006
81006
|
return;
|
|
81007
81007
|
if (!(mapLayerSettings instanceof _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.ImageMapLayerSettings)) {
|
|
@@ -81012,95 +81012,43 @@ class DisplayStyleState extends _EntityState__WEBPACK_IMPORTED_MODULE_6__.Elemen
|
|
|
81012
81012
|
for (const subLayer of mapLayerSettings.subLayers) {
|
|
81013
81013
|
subLayers.push((subLayerId === -1 || subLayer.id === subLayerId) ? subLayer.clone(props).toJSON() : subLayer.toJSON());
|
|
81014
81014
|
}
|
|
81015
|
-
this.changeMapLayerProps({ subLayers },
|
|
81016
|
-
}
|
|
81017
|
-
/** Returns the cartographic range of map layer.
|
|
81018
|
-
* @param layerIndex of the map layer.
|
|
81019
|
-
* @param isOverlay true if the map layer is overlay, otherwise layer is background
|
|
81020
|
-
*
|
|
81021
|
-
* @internal
|
|
81022
|
-
*/
|
|
81023
|
-
async getMapLayerRange(layerIndex, isOverlay) {
|
|
81024
|
-
const mapLayerSettings = this.mapLayerAtIndex(layerIndex, isOverlay);
|
|
81025
|
-
if (undefined === mapLayerSettings)
|
|
81026
|
-
return undefined;
|
|
81027
|
-
if (mapLayerSettings instanceof _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.ModelMapLayerSettings) {
|
|
81028
|
-
const ecefTransform = this.iModel.ecefLocation?.getTransform();
|
|
81029
|
-
if (!ecefTransform)
|
|
81030
|
-
return undefined;
|
|
81031
|
-
const model = this.iModel.models.getLoaded(mapLayerSettings.modelId);
|
|
81032
|
-
if (!model || !(model instanceof _ModelState__WEBPACK_IMPORTED_MODULE_11__.GeometricModelState))
|
|
81033
|
-
return undefined;
|
|
81034
|
-
const modelRange = await model.queryModelRange();
|
|
81035
|
-
const cartoRange = new _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.CartographicRange(modelRange, ecefTransform).getLongitudeLatitudeBoundingBox();
|
|
81036
|
-
return _tile_internal__WEBPACK_IMPORTED_MODULE_9__.MapCartoRectangle.fromRadians(cartoRange.low.x, cartoRange.low.y, cartoRange.high.x, cartoRange.high.y);
|
|
81037
|
-
}
|
|
81038
|
-
if (!(mapLayerSettings instanceof _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.ImageMapLayerSettings)) {
|
|
81039
|
-
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(false);
|
|
81040
|
-
return undefined;
|
|
81041
|
-
}
|
|
81042
|
-
const imageryProvider = _IModelApp__WEBPACK_IMPORTED_MODULE_7__.IModelApp.mapLayerFormatRegistry.createImageryProvider(mapLayerSettings);
|
|
81043
|
-
if (undefined === imageryProvider)
|
|
81044
|
-
return undefined;
|
|
81045
|
-
try {
|
|
81046
|
-
await imageryProvider.initialize();
|
|
81047
|
-
return imageryProvider.cartoRange;
|
|
81048
|
-
}
|
|
81049
|
-
catch (_error) {
|
|
81050
|
-
return undefined;
|
|
81051
|
-
}
|
|
81052
|
-
return undefined;
|
|
81053
|
-
}
|
|
81054
|
-
/** change viewport to include range of map layer.
|
|
81055
|
-
* @internal
|
|
81056
|
-
*/
|
|
81057
|
-
async viewMapLayerRange(layerIndex, isOverlay, vp) {
|
|
81058
|
-
const range = await this.getMapLayerRange(layerIndex, isOverlay);
|
|
81059
|
-
if (!range)
|
|
81060
|
-
return false;
|
|
81061
|
-
if (range.xLength() > 1.5 * _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Angle.piRadians)
|
|
81062
|
-
(0,_ViewGlobalLocation__WEBPACK_IMPORTED_MODULE_10__.viewGlobalLocation)(vp, true, _ViewGlobalLocation__WEBPACK_IMPORTED_MODULE_10__.ViewGlobalLocationConstants.satelliteHeightAboveEarthInMeters, undefined, undefined);
|
|
81063
|
-
else
|
|
81064
|
-
(0,_ViewGlobalLocation__WEBPACK_IMPORTED_MODULE_10__.viewGlobalLocation)(vp, true, undefined, undefined, range.globalLocation);
|
|
81065
|
-
return true;
|
|
81015
|
+
this.changeMapLayerProps({ subLayers }, mapLayerIndex);
|
|
81066
81016
|
}
|
|
81067
81017
|
/* @internal */
|
|
81068
81018
|
_synchBackgroundMapImagery() {
|
|
81069
81019
|
this.settings.synchMapImagery();
|
|
81070
81020
|
}
|
|
81071
|
-
/**
|
|
81072
|
-
*
|
|
81073
|
-
* @param index index of layer to move.
|
|
81074
|
-
* @param isOverlay true if layer is overlay.
|
|
81021
|
+
/** Move map layer to top.
|
|
81022
|
+
* @param mapLayerIndex the [[MapLayerIndex]] of the map layer to move.
|
|
81075
81023
|
* @public
|
|
81076
81024
|
*
|
|
81077
81025
|
*/
|
|
81078
|
-
moveMapLayerToTop(
|
|
81079
|
-
const layers = this.getMapLayers(isOverlay);
|
|
81026
|
+
moveMapLayerToTop(mapLayerIndex) {
|
|
81027
|
+
const layers = this.getMapLayers(mapLayerIndex.isOverlay);
|
|
81028
|
+
const index = mapLayerIndex.index;
|
|
81080
81029
|
if (index >= 0 && index < layers.length - 1) {
|
|
81081
81030
|
const layer = layers.splice(index, 1);
|
|
81082
81031
|
layers.push(layer[0]);
|
|
81083
81032
|
this._synchBackgroundMapImagery();
|
|
81084
81033
|
}
|
|
81085
81034
|
}
|
|
81086
|
-
/**
|
|
81087
|
-
*
|
|
81088
|
-
* @param index index of layer to move.
|
|
81089
|
-
* @param isOverlay true if layer is overlay.
|
|
81035
|
+
/** Move map layer to bottom.
|
|
81036
|
+
* @param mapLayerIndex the [[MapLayerIndex]] of the map layer to move.
|
|
81090
81037
|
* @public
|
|
81091
81038
|
*/
|
|
81092
|
-
moveMapLayerToBottom(
|
|
81093
|
-
const layers = this.getMapLayers(isOverlay);
|
|
81039
|
+
moveMapLayerToBottom(mapLayerIndex) {
|
|
81040
|
+
const layers = this.getMapLayers(mapLayerIndex.isOverlay);
|
|
81041
|
+
const index = mapLayerIndex.index;
|
|
81094
81042
|
if (index > 0 && index < layers.length) {
|
|
81095
81043
|
const layer = layers.splice(index, 1);
|
|
81096
81044
|
layers.unshift(layer[0]);
|
|
81097
81045
|
this._synchBackgroundMapImagery();
|
|
81098
81046
|
}
|
|
81099
81047
|
}
|
|
81100
|
-
/**
|
|
81101
|
-
* Reorder map layers
|
|
81048
|
+
/** Reorder map layers
|
|
81102
81049
|
* @param fromIndex index of map layer to move
|
|
81103
81050
|
* @param toIndex insert index. If equal to length of map array the map layer is moved to end of array.
|
|
81051
|
+
* @param isOverlay true if map-layer is part of the overlay map, otherwise it is part of the background map.
|
|
81104
81052
|
* @public
|
|
81105
81053
|
*/
|
|
81106
81054
|
moveMapLayerToIndex(fromIndex, toIndex, isOverlay) {
|
|
@@ -81694,8 +81642,7 @@ class DrawingViewState extends _ViewState__WEBPACK_IMPORTED_MODULE_14__.ViewStat
|
|
|
81694
81642
|
CAST(json_extract(jsonProperties, '$.displaySpatialView') as BOOLEAN) as displaySpatialView
|
|
81695
81643
|
FROM bis.SectionDrawing
|
|
81696
81644
|
WHERE ECInstanceId=${this.baseModelId}`;
|
|
81697
|
-
|
|
81698
|
-
for await (const row of this.iModel.query(ecsql, undefined, { rowFormat: _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.QueryRowFormat.UseJsPropertyNames })) {
|
|
81645
|
+
for await (const row of this.iModel.createQueryReader(ecsql, undefined, { rowFormat: _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.QueryRowFormat.UseJsPropertyNames })) {
|
|
81699
81646
|
spatialView = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Id64.fromJSON(row.spatialView?.id);
|
|
81700
81647
|
displaySpatialView = !!row.displaySpatialView;
|
|
81701
81648
|
try {
|
|
@@ -84930,9 +84877,7 @@ __webpack_require__(/*! ./IModeljs-css */ "../../core/frontend/lib/esm/IModeljs-
|
|
|
84930
84877
|
class IModelApp {
|
|
84931
84878
|
// No instances of IModelApp may be created. All members are static and must be on the singleton object IModelApp.
|
|
84932
84879
|
constructor() { }
|
|
84933
|
-
/** The [[
|
|
84934
|
-
* @internal
|
|
84935
|
-
*/
|
|
84880
|
+
/** The [[MapLayerFormatRegistry]] for this session. */
|
|
84936
84881
|
static get mapLayerFormatRegistry() { return this._mapLayerFormatRegistry; }
|
|
84937
84882
|
/** The [[TerrainProviderRegistry]] for this session. */
|
|
84938
84883
|
static get terrainProviderRegistry() { return this._terrainProviderRegistry; }
|
|
@@ -85641,8 +85586,7 @@ class IModelConnection extends _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.I
|
|
|
85641
85586
|
* @deprecated in 3.7. Count the number of results using `count(*)` where the original query is a subquery instead. E.g., `SELECT count(*) FROM (<query-whose-rows-to-count>)`.
|
|
85642
85587
|
*/
|
|
85643
85588
|
async queryRowCount(ecsql, params) {
|
|
85644
|
-
|
|
85645
|
-
for await (const row of this.query(`select count(*) from (${ecsql})`, params)) {
|
|
85589
|
+
for await (const row of this.createQueryReader(`select count(*) from (${ecsql})`, params)) {
|
|
85646
85590
|
return row[0];
|
|
85647
85591
|
}
|
|
85648
85592
|
throw new _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.IModelError(_itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.DbResult.BE_SQLITE_ERROR, "Failed to get row count");
|
|
@@ -85666,8 +85610,7 @@ class IModelConnection extends _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.I
|
|
|
85666
85610
|
* @deprecated in 3.7. Use [[createQueryReader]] instead. Pass in the restart token as part of the `config` argument; e.g., `{ restartToken: myToken }` or `new QueryOptionsBuilder().setRestartToken(myToken).getOptions()`.
|
|
85667
85611
|
*/
|
|
85668
85612
|
async *restartQuery(token, ecsql, params, options) {
|
|
85669
|
-
|
|
85670
|
-
for await (const row of this.query(ecsql, params, new _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.QueryOptionsBuilder(options).setRestartToken(token).getOptions())) {
|
|
85613
|
+
for await (const row of this.createQueryReader(ecsql, params, new _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.QueryOptionsBuilder(options).setRestartToken(token).getOptions())) {
|
|
85671
85614
|
yield row;
|
|
85672
85615
|
}
|
|
85673
85616
|
}
|
|
@@ -86210,8 +86153,8 @@ class SnapshotConnection extends IModelConnection {
|
|
|
86210
86153
|
break;
|
|
86211
86154
|
}
|
|
86212
86155
|
const placements = new Array();
|
|
86213
|
-
|
|
86214
|
-
|
|
86156
|
+
for await (const queryRow of this._iModel.createQueryReader(ecsql, undefined, { rowFormat: _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.QueryRowFormat.UseJsPropertyNames })) {
|
|
86157
|
+
const row = queryRow.toRow();
|
|
86215
86158
|
const origin = [row.x, row.y, row.z];
|
|
86216
86159
|
const bbox = {
|
|
86217
86160
|
low: { x: row.lx, y: row.ly, z: row.lz },
|
|
@@ -90609,8 +90552,7 @@ class SheetViewState extends _ViewState__WEBPACK_IMPORTED_MODULE_14__.ViewState2
|
|
|
90609
90552
|
async queryAttachmentIds() {
|
|
90610
90553
|
const ecsql = `SELECT ECInstanceId as attachmentId FROM bis.ViewAttachment WHERE model.Id=${this.baseModelId}`;
|
|
90611
90554
|
const ids = [];
|
|
90612
|
-
|
|
90613
|
-
for await (const row of this.iModel.query(ecsql))
|
|
90555
|
+
for await (const row of this.iModel.createQueryReader(ecsql))
|
|
90614
90556
|
ids.push(row[0]);
|
|
90615
90557
|
return ids;
|
|
90616
90558
|
}
|
|
@@ -92876,8 +92818,7 @@ class ViewCreator2d {
|
|
|
92876
92818
|
*/
|
|
92877
92819
|
this._executeQuery = async (query) => {
|
|
92878
92820
|
const rows = [];
|
|
92879
|
-
|
|
92880
|
-
for await (const row of this._imodel.query(query, undefined, { rowFormat: _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.QueryRowFormat.UseJsPropertyNames }))
|
|
92821
|
+
for await (const row of this._imodel.createQueryReader(query, undefined, { rowFormat: _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.QueryRowFormat.UseJsPropertyNames }))
|
|
92881
92822
|
rows.push(row.id);
|
|
92882
92823
|
return rows;
|
|
92883
92824
|
};
|
|
@@ -92965,8 +92906,7 @@ class ViewCreator2d {
|
|
|
92965
92906
|
async _addSheetViewProps(modelId, props) {
|
|
92966
92907
|
let width = 0;
|
|
92967
92908
|
let height = 0;
|
|
92968
|
-
|
|
92969
|
-
for await (const row of this._imodel.query(`SELECT Width, Height FROM bis.Sheet WHERE ECInstanceId = ?`, _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.QueryBinder.from([modelId]), { rowFormat: _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.QueryRowFormat.UseJsPropertyNames })) {
|
|
92909
|
+
for await (const row of this._imodel.createQueryReader(`SELECT Width, Height FROM bis.Sheet WHERE ECInstanceId = ?`, _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.QueryBinder.from([modelId]), { rowFormat: _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.QueryRowFormat.UseJsPropertyNames })) {
|
|
92970
92910
|
width = row.width;
|
|
92971
92911
|
height = row.height;
|
|
92972
92912
|
break;
|
|
@@ -93094,8 +93034,7 @@ class ViewCreator3d {
|
|
|
93094
93034
|
*/
|
|
93095
93035
|
this._executeQuery = async (query) => {
|
|
93096
93036
|
const rows = [];
|
|
93097
|
-
|
|
93098
|
-
for await (const row of this._imodel.query(query, undefined, { rowFormat: _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.QueryRowFormat.UseJsPropertyNames }))
|
|
93037
|
+
for await (const row of this._imodel.createQueryReader(query, undefined, { rowFormat: _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.QueryRowFormat.UseJsPropertyNames }))
|
|
93099
93038
|
rows.push(row.id);
|
|
93100
93039
|
return rows;
|
|
93101
93040
|
};
|
|
@@ -96588,11 +96527,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
96588
96527
|
/* harmony import */ var _tools_EventController__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./tools/EventController */ "../../core/frontend/lib/esm/tools/EventController.js");
|
|
96589
96528
|
/* harmony import */ var _tools_ToolSettings__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./tools/ToolSettings */ "../../core/frontend/lib/esm/tools/ToolSettings.js");
|
|
96590
96529
|
/* harmony import */ var _ViewContext__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./ViewContext */ "../../core/frontend/lib/esm/ViewContext.js");
|
|
96591
|
-
/* harmony import */ var
|
|
96592
|
-
/* harmony import */ var
|
|
96593
|
-
/* harmony import */ var
|
|
96594
|
-
/* harmony import */ var
|
|
96595
|
-
/* harmony import */ var
|
|
96530
|
+
/* harmony import */ var _ViewGlobalLocation__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./ViewGlobalLocation */ "../../core/frontend/lib/esm/ViewGlobalLocation.js");
|
|
96531
|
+
/* harmony import */ var _ViewingSpace__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./ViewingSpace */ "../../core/frontend/lib/esm/ViewingSpace.js");
|
|
96532
|
+
/* harmony import */ var _ViewRect__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./ViewRect */ "../../core/frontend/lib/esm/ViewRect.js");
|
|
96533
|
+
/* harmony import */ var _ViewStatus__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./ViewStatus */ "../../core/frontend/lib/esm/ViewStatus.js");
|
|
96534
|
+
/* harmony import */ var _render_VisibleFeature__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./render/VisibleFeature */ "../../core/frontend/lib/esm/render/VisibleFeature.js");
|
|
96535
|
+
/* harmony import */ var _FlashSettings__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./FlashSettings */ "../../core/frontend/lib/esm/FlashSettings.js");
|
|
96536
|
+
/* harmony import */ var _ModelState__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./ModelState */ "../../core/frontend/lib/esm/ModelState.js");
|
|
96596
96537
|
/*---------------------------------------------------------------------------------------------
|
|
96597
96538
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
96598
96539
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -96628,6 +96569,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
96628
96569
|
|
|
96629
96570
|
|
|
96630
96571
|
|
|
96572
|
+
|
|
96573
|
+
|
|
96631
96574
|
|
|
96632
96575
|
|
|
96633
96576
|
|
|
@@ -97047,34 +96990,80 @@ class Viewport {
|
|
|
97047
96990
|
get overlayMap() { return this._mapTiledGraphicsProvider?.overlayMap; }
|
|
97048
96991
|
/** @internal */
|
|
97049
96992
|
get backgroundDrapeMap() { return this._mapTiledGraphicsProvider?.backgroundDrapeMap; }
|
|
97050
|
-
/**
|
|
97051
|
-
|
|
96993
|
+
/** Return the imagery provider for the provided map-layer index.
|
|
96994
|
+
* @param mapLayerIndex the [[MapLayerIndex]] of the map layer.
|
|
96995
|
+
* @beta
|
|
96996
|
+
*/
|
|
96997
|
+
getMapLayerImageryProvider(mapLayerIndex) { return this._mapTiledGraphicsProvider?.getMapLayerImageryProvider(mapLayerIndex); }
|
|
97052
96998
|
/** Return the map-layer scale range visibility for the provided map-layer index.
|
|
97053
|
-
* @param
|
|
97054
|
-
* @param isOverlay true if the map layer is overlay, otherwise layer is background
|
|
96999
|
+
* @param mapLayerIndex the [[MapLayerIndex]] of the map layer.
|
|
97055
97000
|
* @see [[DisplayStyleState.mapLayerAtIndex]].
|
|
97056
97001
|
* @beta
|
|
97057
|
-
|
|
97058
|
-
getMapLayerScaleRangeVisibility(
|
|
97059
|
-
const treeRef = (isOverlay ? this._mapTiledGraphicsProvider?.overlayMap : this._mapTiledGraphicsProvider?.backgroundMap);
|
|
97002
|
+
*/
|
|
97003
|
+
getMapLayerScaleRangeVisibility(mapLayerIndex) {
|
|
97004
|
+
const treeRef = (mapLayerIndex.isOverlay ? this._mapTiledGraphicsProvider?.overlayMap : this._mapTiledGraphicsProvider?.backgroundMap);
|
|
97060
97005
|
if (treeRef) {
|
|
97061
|
-
return treeRef.getMapLayerScaleRangeVisibility(index);
|
|
97006
|
+
return treeRef.getMapLayerScaleRangeVisibility(mapLayerIndex.index);
|
|
97062
97007
|
}
|
|
97063
97008
|
return _tile_internal__WEBPACK_IMPORTED_MODULE_22__.MapTileTreeScaleRangeVisibility.Unknown;
|
|
97064
97009
|
}
|
|
97065
97010
|
/** Return a list of map-layers indexes matching a given MapTile tree Id and a layer imagery tree id.
|
|
97066
97011
|
* Note: A imagery tree can be shared for multiple map-layers.
|
|
97067
97012
|
* @internal
|
|
97068
|
-
|
|
97013
|
+
*/
|
|
97069
97014
|
getMapLayerIndexesFromIds(mapTreeId, layerTreeId) {
|
|
97070
97015
|
if (this._mapTiledGraphicsProvider)
|
|
97071
97016
|
return this._mapTiledGraphicsProvider?.getMapLayerIndexesFromIds(mapTreeId, layerTreeId);
|
|
97072
97017
|
return [];
|
|
97073
97018
|
}
|
|
97074
|
-
/**
|
|
97075
|
-
*
|
|
97019
|
+
/** Returns the cartographic range of a map layer.
|
|
97020
|
+
* @param mapLayerIndex the [[MapLayerIndex]] of the map layer.
|
|
97021
|
+
*/
|
|
97022
|
+
async getMapLayerRange(mapLayerIndex) {
|
|
97023
|
+
const mapLayerSettings = this.view.displayStyle.mapLayerAtIndex(mapLayerIndex);
|
|
97024
|
+
if (undefined === mapLayerSettings)
|
|
97025
|
+
return undefined;
|
|
97026
|
+
if (mapLayerSettings instanceof _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.ModelMapLayerSettings) {
|
|
97027
|
+
const ecefTransform = this.iModel.ecefLocation?.getTransform();
|
|
97028
|
+
if (!ecefTransform)
|
|
97029
|
+
return undefined;
|
|
97030
|
+
const model = this.iModel.models.getLoaded(mapLayerSettings.modelId);
|
|
97031
|
+
if (!model || !(model instanceof _ModelState__WEBPACK_IMPORTED_MODULE_32__.GeometricModelState))
|
|
97032
|
+
return undefined;
|
|
97033
|
+
const modelRange = await model.queryModelRange();
|
|
97034
|
+
const cartoRange = new _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.CartographicRange(modelRange, ecefTransform).getLongitudeLatitudeBoundingBox();
|
|
97035
|
+
return _tile_internal__WEBPACK_IMPORTED_MODULE_22__.MapCartoRectangle.fromRadians(cartoRange.low.x, cartoRange.low.y, cartoRange.high.x, cartoRange.high.y);
|
|
97036
|
+
}
|
|
97037
|
+
const imageryProvider = this.getMapLayerImageryProvider(mapLayerIndex);
|
|
97038
|
+
if (undefined === imageryProvider)
|
|
97039
|
+
return undefined;
|
|
97040
|
+
const tileTreeRef = mapLayerIndex.isOverlay ? this.overlayMap : this.backgroundMap;
|
|
97041
|
+
const imageryTreeRef = tileTreeRef?.getLayerImageryTreeRef(mapLayerIndex.index);
|
|
97042
|
+
if (imageryTreeRef?.treeOwner.loadStatus === _tile_internal__WEBPACK_IMPORTED_MODULE_22__.TileTreeLoadStatus.Loaded) {
|
|
97043
|
+
return imageryProvider.cartoRange;
|
|
97044
|
+
}
|
|
97045
|
+
else {
|
|
97046
|
+
return undefined;
|
|
97047
|
+
}
|
|
97048
|
+
}
|
|
97049
|
+
/** Changes viewport to include range of a map layer.
|
|
97050
|
+
* @param mapLayerIndex the [[MapLayerIndex]] of the map layer.
|
|
97051
|
+
* @param vp the viewport.
|
|
97052
|
+
*/
|
|
97053
|
+
async viewMapLayerRange(mapLayerIndex, vp) {
|
|
97054
|
+
const range = await this.getMapLayerRange(mapLayerIndex);
|
|
97055
|
+
if (!range)
|
|
97056
|
+
return false;
|
|
97057
|
+
if (range.xLength() > 1.5 * _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Angle.piRadians)
|
|
97058
|
+
(0,_ViewGlobalLocation__WEBPACK_IMPORTED_MODULE_26__.viewGlobalLocation)(vp, true, _ViewGlobalLocation__WEBPACK_IMPORTED_MODULE_26__.ViewGlobalLocationConstants.satelliteHeightAboveEarthInMeters, undefined, undefined);
|
|
97059
|
+
else
|
|
97060
|
+
(0,_ViewGlobalLocation__WEBPACK_IMPORTED_MODULE_26__.viewGlobalLocation)(vp, true, undefined, undefined, range.globalLocation);
|
|
97061
|
+
return true;
|
|
97062
|
+
}
|
|
97063
|
+
/** Fully reset a map-layer tile tree; by calling this, the map-layer will to go through initialize process again, and all previously fetched tile will be lost.
|
|
97064
|
+
* @beta
|
|
97076
97065
|
*/
|
|
97077
|
-
resetMapLayer(
|
|
97066
|
+
resetMapLayer(mapLayerIndex) { this._mapTiledGraphicsProvider?.resetMapLayer(mapLayerIndex); }
|
|
97078
97067
|
/** Returns true if this Viewport is currently displaying the model with the specified Id. */
|
|
97079
97068
|
viewsModel(modelId) { return this.view.viewsModel(modelId); }
|
|
97080
97069
|
/** Attempt to change the 2d Model this Viewport is displaying, if its ViewState is a ViewState2d.
|
|
@@ -97324,9 +97313,9 @@ class Viewport {
|
|
|
97324
97313
|
this._tiledGraphicsProviders = new Set();
|
|
97325
97314
|
this._hilite = new _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.Hilite.Settings();
|
|
97326
97315
|
this._emphasis = new _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.Hilite.Settings(_itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.ColorDef.black, 0, 0, _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.Hilite.Silhouette.Thick);
|
|
97327
|
-
this._flash = new
|
|
97316
|
+
this._flash = new _FlashSettings__WEBPACK_IMPORTED_MODULE_31__.FlashSettings();
|
|
97328
97317
|
/** @internal */
|
|
97329
|
-
this._viewRange = new
|
|
97318
|
+
this._viewRange = new _ViewRect__WEBPACK_IMPORTED_MODULE_28__.ViewRect();
|
|
97330
97319
|
/** If this event has one or more listeners, collection of timing statistics related to rendering frames is enabled. Frame statistics will be received by the listeners whenever a frame is finished rendering.
|
|
97331
97320
|
* @note The timing data collected using this event only collects the amount of time spent on the CPU. Due to performance considerations, time spent on the GPU is not collected. Therefore, these statistics are not a direct mapping to user experience.
|
|
97332
97321
|
* @note In order to avoid interfering with the rendering loop, take care to avoid performing any intensive tasks in your event listeners.
|
|
@@ -97953,7 +97942,7 @@ class Viewport {
|
|
|
97953
97942
|
turnCameraOn(lensAngle) {
|
|
97954
97943
|
const view = this.view;
|
|
97955
97944
|
if (!view.is3d() || !view.supportsCamera())
|
|
97956
|
-
return
|
|
97945
|
+
return _ViewStatus__WEBPACK_IMPORTED_MODULE_29__.ViewStatus.InvalidViewport;
|
|
97957
97946
|
if (!lensAngle)
|
|
97958
97947
|
lensAngle = view.camera.lens;
|
|
97959
97948
|
_itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.Camera.validateLensAngle(lensAngle);
|
|
@@ -97981,7 +97970,7 @@ class Viewport {
|
|
|
97981
97970
|
const frontDistance = view.minimumFrontDistance();
|
|
97982
97971
|
status = view.lookAt({ eyePoint, targetPoint, upVector: view.getYVector(), lensAngle, frontDistance, backDistance });
|
|
97983
97972
|
}
|
|
97984
|
-
if (
|
|
97973
|
+
if (_ViewStatus__WEBPACK_IMPORTED_MODULE_29__.ViewStatus.Success === status)
|
|
97985
97974
|
this.setupFromView();
|
|
97986
97975
|
return status;
|
|
97987
97976
|
}
|
|
@@ -97992,20 +97981,20 @@ class Viewport {
|
|
|
97992
97981
|
}
|
|
97993
97982
|
doSetupFromView(view) {
|
|
97994
97983
|
if (this._inViewChangedEvent)
|
|
97995
|
-
return
|
|
97984
|
+
return _ViewStatus__WEBPACK_IMPORTED_MODULE_29__.ViewStatus.Success; // ignore echos
|
|
97996
97985
|
if (!this.isAspectRatioLocked)
|
|
97997
97986
|
view.fixAspectRatio(this.viewRect.aspect);
|
|
97998
97987
|
this.setView(view);
|
|
97999
|
-
const viewSpace =
|
|
97988
|
+
const viewSpace = _ViewingSpace__WEBPACK_IMPORTED_MODULE_27__.ViewingSpace.createFromViewport(this);
|
|
98000
97989
|
if (undefined === viewSpace)
|
|
98001
|
-
return
|
|
97990
|
+
return _ViewStatus__WEBPACK_IMPORTED_MODULE_29__.ViewStatus.InvalidViewport;
|
|
98002
97991
|
this._viewingSpace = viewSpace;
|
|
98003
97992
|
this.invalidateRenderPlan();
|
|
98004
97993
|
this._controllerValid = true;
|
|
98005
97994
|
this._inViewChangedEvent = true;
|
|
98006
97995
|
this.onViewChanged.raiseEvent(this);
|
|
98007
97996
|
this._inViewChangedEvent = false;
|
|
98008
|
-
return
|
|
97997
|
+
return _ViewStatus__WEBPACK_IMPORTED_MODULE_29__.ViewStatus.Success;
|
|
98009
97998
|
}
|
|
98010
97999
|
/** Establish the parameters of this Viewport from the current information in its ViewState */
|
|
98011
98000
|
setupFromView(pose) {
|
|
@@ -98125,7 +98114,7 @@ class Viewport {
|
|
|
98125
98114
|
zoom(newCenter, factor, options) {
|
|
98126
98115
|
const view = this.view;
|
|
98127
98116
|
if (undefined === view)
|
|
98128
|
-
return
|
|
98117
|
+
return _ViewStatus__WEBPACK_IMPORTED_MODULE_29__.ViewStatus.InvalidViewport;
|
|
98129
98118
|
if (view.is3d() && view.isCameraOn) {
|
|
98130
98119
|
const eyePoint = view.getEyePoint().clone();
|
|
98131
98120
|
const targetPoint = view.getTargetPoint();
|
|
@@ -98139,7 +98128,7 @@ class Viewport {
|
|
|
98139
98128
|
transform.multiplyPoint3d(eyePoint, eyePoint);
|
|
98140
98129
|
targetPoint.setFrom(eyePoint.plusScaled(zDir, zDir.dotProduct(eyePoint.vectorTo(targetPoint))));
|
|
98141
98130
|
const status = view.lookAt({ eyePoint, targetPoint, upVector: view.getYVector(), lensAngle: view.camera.lens });
|
|
98142
|
-
if (
|
|
98131
|
+
if (_ViewStatus__WEBPACK_IMPORTED_MODULE_29__.ViewStatus.Success !== status)
|
|
98143
98132
|
return status;
|
|
98144
98133
|
}
|
|
98145
98134
|
else {
|
|
@@ -98150,7 +98139,7 @@ class Viewport {
|
|
|
98150
98139
|
const center = rot.multiplyVector(newCenter ? newCenter : view.getCenter());
|
|
98151
98140
|
// fix for min/max delta
|
|
98152
98141
|
const stat = view.adjustViewDelta(delta, center, rot, this.viewRect.aspect, options);
|
|
98153
|
-
if (
|
|
98142
|
+
if (_ViewStatus__WEBPACK_IMPORTED_MODULE_29__.ViewStatus.Success !== stat)
|
|
98154
98143
|
return stat;
|
|
98155
98144
|
if (!view.allow3dManipulations())
|
|
98156
98145
|
center.z = 0.0;
|
|
@@ -98158,7 +98147,7 @@ class Viewport {
|
|
|
98158
98147
|
view.setExtents(delta);
|
|
98159
98148
|
}
|
|
98160
98149
|
this.synchWithView(options);
|
|
98161
|
-
return
|
|
98150
|
+
return _ViewStatus__WEBPACK_IMPORTED_MODULE_29__.ViewStatus.Success;
|
|
98162
98151
|
}
|
|
98163
98152
|
/** See [[zoomToPlacements]]. */
|
|
98164
98153
|
zoomToPlacementProps(placementProps, options) {
|
|
@@ -98197,7 +98186,7 @@ class Viewport {
|
|
|
98197
98186
|
viewRange.extendArray(placement.getWorldCorners(frust).points, viewTransform);
|
|
98198
98187
|
const ignoreError = {
|
|
98199
98188
|
...options,
|
|
98200
|
-
onExtentsError: () =>
|
|
98189
|
+
onExtentsError: () => _ViewStatus__WEBPACK_IMPORTED_MODULE_29__.ViewStatus.Success,
|
|
98201
98190
|
};
|
|
98202
98191
|
view.lookAtViewAlignedVolume(viewRange, this.viewRect.aspect, ignoreError);
|
|
98203
98192
|
this.synchWithView(options);
|
|
@@ -98241,7 +98230,7 @@ class Viewport {
|
|
|
98241
98230
|
setupViewFromFrustum(inFrustum) {
|
|
98242
98231
|
const validSize = this.view.setupFromFrustum(inFrustum);
|
|
98243
98232
|
// note: always call setupFromView, even if setupFromFrustum failed
|
|
98244
|
-
return (
|
|
98233
|
+
return (_ViewStatus__WEBPACK_IMPORTED_MODULE_29__.ViewStatus.Success === this.setupFromView() && _ViewStatus__WEBPACK_IMPORTED_MODULE_29__.ViewStatus.Success === validSize);
|
|
98245
98234
|
}
|
|
98246
98235
|
/** Compute the range of all geometry to be displayed in this viewport. */
|
|
98247
98236
|
computeViewRange() {
|
|
@@ -98602,7 +98591,7 @@ class Viewport {
|
|
|
98602
98591
|
* @note By default the image is returned with the coordinate (0,0) referring to the bottom-most pixel. Pass `true` for `flipVertically` to flip it along the x-axis.
|
|
98603
98592
|
* @deprecated in 3.x. Use readImageBuffer.
|
|
98604
98593
|
*/
|
|
98605
|
-
readImage(rect = new
|
|
98594
|
+
readImage(rect = new _ViewRect__WEBPACK_IMPORTED_MODULE_28__.ViewRect(1, 1, 0, 0), targetSize = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Point2d.createZero(), flipVertically = false) {
|
|
98606
98595
|
// eslint-disable-next-line deprecation/deprecation
|
|
98607
98596
|
return this.target.readImage(rect, targetSize, flipVertically);
|
|
98608
98597
|
}
|
|
@@ -98716,7 +98705,7 @@ class Viewport {
|
|
|
98716
98705
|
* @note This function may be slow, especially if the features are being queried from screen pixels. Avoid calling it repeatedly in rapid succession.
|
|
98717
98706
|
*/
|
|
98718
98707
|
queryVisibleFeatures(options, callback) {
|
|
98719
|
-
return (0,
|
|
98708
|
+
return (0,_render_VisibleFeature__WEBPACK_IMPORTED_MODULE_30__.queryVisibleFeatures)(this, options, callback);
|
|
98720
98709
|
}
|
|
98721
98710
|
/** Record graphics memory consumed by this viewport. */
|
|
98722
98711
|
collectStatistics(stats) {
|
|
@@ -144841,7 +144830,7 @@ class RealityTile extends _internal__WEBPACK_IMPORTED_MODULE_5__.Tile {
|
|
|
144841
144830
|
super(props, tree);
|
|
144842
144831
|
this._everDisplayed = false;
|
|
144843
144832
|
this.transformToRoot = props.transformToRoot;
|
|
144844
|
-
this.additiveRefinement =
|
|
144833
|
+
this.additiveRefinement = props.additiveRefinement ?? this.realityParent?.additiveRefinement;
|
|
144845
144834
|
this.noContentButTerminateOnSelection = props.noContentButTerminateOnSelection;
|
|
144846
144835
|
this.rangeCorners = props.rangeCorners;
|
|
144847
144836
|
this.region = props.region;
|
|
@@ -144956,21 +144945,31 @@ class RealityTile extends _internal__WEBPACK_IMPORTED_MODULE_5__.Tile {
|
|
|
144956
144945
|
child.preloadRealityTilesAtDepth(depth, context, args);
|
|
144957
144946
|
}
|
|
144958
144947
|
}
|
|
144948
|
+
// Preload tiles that are protected:
|
|
144949
|
+
// * used tiles (where "used" may mean: selected/preloaded for display or content requested);
|
|
144950
|
+
// * parents and siblings of other protected tiles.
|
|
144959
144951
|
/** @internal */
|
|
144960
|
-
|
|
144961
|
-
const
|
|
144962
|
-
|
|
144963
|
-
|
|
144964
|
-
|
|
144965
|
-
|
|
144952
|
+
preloadProtectedTiles(args, context) {
|
|
144953
|
+
const children = this.realityChildren;
|
|
144954
|
+
let hasProtectedChildren = false;
|
|
144955
|
+
if (children && !this.additiveRefinement) {
|
|
144956
|
+
for (const child of children) {
|
|
144957
|
+
hasProtectedChildren = child.preloadProtectedTiles(args, context) || hasProtectedChildren;
|
|
144958
|
+
}
|
|
144966
144959
|
}
|
|
144967
|
-
if (
|
|
144968
|
-
const
|
|
144969
|
-
|
|
144970
|
-
|
|
144971
|
-
|
|
144972
|
-
|
|
144960
|
+
if (children && hasProtectedChildren) {
|
|
144961
|
+
for (const child of children) {
|
|
144962
|
+
if (child.isDisplayable && !child.isLoaded)
|
|
144963
|
+
context.preload(child, args);
|
|
144964
|
+
}
|
|
144965
|
+
return true; // Parents of protected tiles are protected
|
|
144966
|
+
}
|
|
144967
|
+
// Special case of the root tile
|
|
144968
|
+
if (this === this.realityRoot.rootTile) {
|
|
144969
|
+
context.preload(this, args);
|
|
144970
|
+
return true;
|
|
144973
144971
|
}
|
|
144972
|
+
return context.selected.find((tile) => tile === this) !== undefined;
|
|
144974
144973
|
}
|
|
144975
144974
|
/** @internal */
|
|
144976
144975
|
addBoundingGraphic(builder, color) {
|
|
@@ -145007,55 +145006,157 @@ class RealityTile extends _internal__WEBPACK_IMPORTED_MODULE_5__.Tile {
|
|
|
145007
145006
|
if (child.isReady && child.computeVisibilityFactor(args) > 0) {
|
|
145008
145007
|
scratchLoadedChildren.push(child);
|
|
145009
145008
|
}
|
|
145010
|
-
else if (!child.getLoadedRealityChildren(args))
|
|
145009
|
+
else if (!child.getLoadedRealityChildren(args)) {
|
|
145011
145010
|
return false;
|
|
145011
|
+
}
|
|
145012
145012
|
}
|
|
145013
145013
|
return true;
|
|
145014
145014
|
}
|
|
145015
145015
|
/** @internal */
|
|
145016
145016
|
forceSelectRealityTile() { return false; }
|
|
145017
145017
|
/** @internal */
|
|
145018
|
+
minimumVisibleFactor() {
|
|
145019
|
+
if (this.additiveRefinement)
|
|
145020
|
+
return 0.25;
|
|
145021
|
+
else
|
|
145022
|
+
return 0;
|
|
145023
|
+
}
|
|
145024
|
+
/** @internal */
|
|
145018
145025
|
selectRealityTiles(context, args, traversalDetails) {
|
|
145019
145026
|
const visibility = this.computeVisibilityFactor(args);
|
|
145020
|
-
|
|
145027
|
+
const isNotVisible = visibility < 0;
|
|
145028
|
+
if (isNotVisible)
|
|
145021
145029
|
return;
|
|
145030
|
+
// Force loading if loader requires this tile. (cesium terrain visibility).
|
|
145022
145031
|
if (this.realityRoot.loader.forceTileLoad(this) && !this.isReady) {
|
|
145023
|
-
context.selectOrQueue(this, args, traversalDetails);
|
|
145032
|
+
context.selectOrQueue(this, args, traversalDetails);
|
|
145024
145033
|
return;
|
|
145025
145034
|
}
|
|
145035
|
+
// Force to return early without selecting
|
|
145026
145036
|
if (visibility >= 1 && this.noContentButTerminateOnSelection)
|
|
145027
145037
|
return;
|
|
145028
|
-
|
|
145029
|
-
|
|
145030
|
-
|
|
145031
|
-
|
|
145032
|
-
|
|
145033
|
-
|
|
145034
|
-
|
|
145035
|
-
|
|
145036
|
-
|
|
145038
|
+
const shouldSelectThisTile = visibility >= 1 || this._anyChildNotFound || this.forceSelectRealityTile() || context.selectionCountExceeded;
|
|
145039
|
+
if (shouldSelectThisTile && this.isDisplayable) { // Select this tile
|
|
145040
|
+
// Return early if tile is totally occluded
|
|
145041
|
+
if (this.isOccluded(args.viewingSpace))
|
|
145042
|
+
return;
|
|
145043
|
+
// Attempt to select this tile. If not ready, queue it
|
|
145044
|
+
context.selectOrQueue(this, args, traversalDetails);
|
|
145045
|
+
// This tile is visible but not loaded - Use higher resolution children if present
|
|
145046
|
+
if (!this.isReady)
|
|
145047
|
+
this.selectRealityChildrenAsFallback(context, args, traversalDetails);
|
|
145037
145048
|
}
|
|
145038
|
-
else {
|
|
145049
|
+
else { // Select children instead of this tile
|
|
145050
|
+
// With additive refinement it is necessary to display this tile along with any displayed children
|
|
145039
145051
|
if (this.additiveRefinement && this.isDisplayable && !this.useAdditiveRefinementStepchildren())
|
|
145040
|
-
context.selectOrQueue(this, args, traversalDetails);
|
|
145052
|
+
context.selectOrQueue(this, args, traversalDetails);
|
|
145041
145053
|
this.selectRealityChildren(context, args, traversalDetails);
|
|
145042
|
-
|
|
145043
|
-
|
|
145044
|
-
|
|
145054
|
+
// Children are not ready: use this tile to avoid leaving a hole
|
|
145055
|
+
traversalDetails.shouldSelectParent = traversalDetails.shouldSelectParent || traversalDetails.queuedChildren.length !== 0;
|
|
145056
|
+
if (traversalDetails.shouldSelectParent) {
|
|
145057
|
+
// If the tile has not yet been displayed in this viewport -- display only if it is visible enough. Avoid overly tiles popping into view unexpectedly (terrain)
|
|
145058
|
+
if (visibility > this.minimumVisibleFactor() || this._everDisplayed) {
|
|
145045
145059
|
context.selectOrQueue(this, args, traversalDetails);
|
|
145060
|
+
}
|
|
145046
145061
|
}
|
|
145047
145062
|
}
|
|
145048
145063
|
}
|
|
145064
|
+
// Attempt to select the children of a tile in case they could be displayed while this tile is loading. This does not take into account visibility.
|
|
145049
145065
|
/** @internal */
|
|
145050
|
-
|
|
145051
|
-
|
|
145066
|
+
selectRealityChildrenAsFallback(context, args, traversalDetails) {
|
|
145067
|
+
const childrenReady = this.getLoadedRealityChildren(args);
|
|
145068
|
+
if (childrenReady) {
|
|
145069
|
+
context.select(scratchLoadedChildren, args);
|
|
145070
|
+
traversalDetails.shouldSelectParent = false;
|
|
145071
|
+
}
|
|
145072
|
+
scratchLoadedChildren.length = 0;
|
|
145073
|
+
}
|
|
145074
|
+
// Recurse through children to select them normally
|
|
145075
|
+
/** @internal */
|
|
145076
|
+
selectRealityChildren(context, args, traversalDetails) {
|
|
145077
|
+
// Load children if not yet requested
|
|
145078
|
+
const childrenLoadStatus = this.loadChildren(); // NB: asynchronous
|
|
145079
|
+
// Children are not ready yet
|
|
145080
|
+
if (childrenLoadStatus === _internal__WEBPACK_IMPORTED_MODULE_5__.TileTreeLoadStatus.Loading) {
|
|
145081
|
+
args.markChildrenLoading();
|
|
145082
|
+
traversalDetails.shouldSelectParent = true;
|
|
145083
|
+
return;
|
|
145084
|
+
}
|
|
145085
|
+
if (this.realityChildren !== undefined) {
|
|
145086
|
+
// Attempt to select the children
|
|
145087
|
+
const traversalChildren = this.realityRoot.getTraversalChildren(this.depth);
|
|
145088
|
+
traversalChildren.initialize();
|
|
145089
|
+
for (let i = 0; i < this.children.length; i++)
|
|
145090
|
+
this.realityChildren[i].selectRealityTiles(context, args, traversalChildren.getChildDetail(i));
|
|
145091
|
+
traversalChildren.combine(traversalDetails);
|
|
145092
|
+
}
|
|
145093
|
+
}
|
|
145094
|
+
/** @internal */
|
|
145095
|
+
purgeContents(olderThan, useProtectedTiles) {
|
|
145096
|
+
const tilesToPurge = new Set();
|
|
145097
|
+
// Get the list of tiles to purge
|
|
145098
|
+
if (useProtectedTiles && !this.additiveRefinement)
|
|
145099
|
+
this.getTilesToPurge(olderThan, tilesToPurge);
|
|
145100
|
+
else
|
|
145101
|
+
this.getTilesToPurgeWithoutProtection(olderThan, tilesToPurge);
|
|
145102
|
+
// Discard contents of tiles that have been marked.
|
|
145052
145103
|
// Note we do not discard the child Tile objects themselves.
|
|
145053
|
-
|
|
145054
|
-
|
|
145104
|
+
for (const tile of tilesToPurge)
|
|
145105
|
+
tile.disposeContents();
|
|
145106
|
+
}
|
|
145107
|
+
// Populate a set with tiles that should be disposed. Prevent some tiles to be disposed to avoid holes when moving.
|
|
145108
|
+
// Return true if the current tile is "protected".
|
|
145109
|
+
getTilesToPurge(olderThan, tilesToPurge) {
|
|
145055
145110
|
const children = this.realityChildren;
|
|
145056
|
-
|
|
145057
|
-
|
|
145058
|
-
|
|
145111
|
+
// Protected tiles cannot be purged. They are:
|
|
145112
|
+
// * used tiles (where "used" may mean: selected/preloaded for display or content requested);
|
|
145113
|
+
// * parents and siblings of other protected tiles.
|
|
145114
|
+
let hasProtectedChildren = false;
|
|
145115
|
+
if (children) {
|
|
145116
|
+
for (const child of children) {
|
|
145117
|
+
hasProtectedChildren = child.getTilesToPurge(olderThan, tilesToPurge) || hasProtectedChildren;
|
|
145118
|
+
}
|
|
145119
|
+
if (hasProtectedChildren) {
|
|
145120
|
+
// Siblings of protected tiles are protected too. We need to remove them from it
|
|
145121
|
+
for (const child of children) {
|
|
145122
|
+
// Because the current tile can be invisible, relying on its children to display geometry,
|
|
145123
|
+
// we have to recurse in order to remove the first children that has geometry, otherwise,
|
|
145124
|
+
// some holes might appear
|
|
145125
|
+
child.removeFirstDisplayableChildrenFromSet(tilesToPurge);
|
|
145126
|
+
}
|
|
145127
|
+
return true; // Parents of protected tiles are protected
|
|
145128
|
+
}
|
|
145129
|
+
}
|
|
145130
|
+
const isInUse = this.usageMarker.getIsTileInUse();
|
|
145131
|
+
if (!isInUse && this.usageMarker.isTimestampExpired(olderThan)) {
|
|
145132
|
+
tilesToPurge.add(this);
|
|
145133
|
+
}
|
|
145134
|
+
return isInUse;
|
|
145135
|
+
}
|
|
145136
|
+
// Populate a set with tiles that should be disposed. Does not prevent some tiles to be disposed to avoid holes when moving.
|
|
145137
|
+
// This method is simpler and more fitting for devices that has a bigger memory constraint, such as mobiles.
|
|
145138
|
+
// However, it causes the apparition of holes by letting important tiles to be purged.
|
|
145139
|
+
getTilesToPurgeWithoutProtection(olderThan, tilesToPurge) {
|
|
145140
|
+
const children = this.realityChildren;
|
|
145141
|
+
if (children) {
|
|
145142
|
+
for (const child of children) {
|
|
145143
|
+
child.getTilesToPurgeWithoutProtection(olderThan, tilesToPurge);
|
|
145144
|
+
}
|
|
145145
|
+
}
|
|
145146
|
+
if (this.usageMarker.isExpired(olderThan))
|
|
145147
|
+
tilesToPurge.add(this);
|
|
145148
|
+
}
|
|
145149
|
+
removeFirstDisplayableChildrenFromSet(set) {
|
|
145150
|
+
if (set.size === 0)
|
|
145151
|
+
return;
|
|
145152
|
+
if (this.isDisplayable) {
|
|
145153
|
+
set.delete(this);
|
|
145154
|
+
return;
|
|
145155
|
+
}
|
|
145156
|
+
if (this.realityChildren !== undefined) {
|
|
145157
|
+
for (const child of this.realityChildren)
|
|
145158
|
+
child.removeFirstDisplayableChildrenFromSet(set);
|
|
145159
|
+
}
|
|
145059
145160
|
}
|
|
145060
145161
|
/** @internal */
|
|
145061
145162
|
computeVisibilityFactor(args) {
|
|
@@ -145082,26 +145183,6 @@ class RealityTile extends _internal__WEBPACK_IMPORTED_MODULE_5__.Tile {
|
|
|
145082
145183
|
return this.maximumSize / args.getPixelSize(this);
|
|
145083
145184
|
}
|
|
145084
145185
|
/** @internal */
|
|
145085
|
-
preloadTilesInFrustum(args, context, preloadSizeModifier) {
|
|
145086
|
-
const visibility = this.computeVisibilityFactor(args);
|
|
145087
|
-
if (visibility < 0)
|
|
145088
|
-
return;
|
|
145089
|
-
if (visibility * preloadSizeModifier > 1) {
|
|
145090
|
-
if (this.isDisplayable)
|
|
145091
|
-
context.preload(this, args);
|
|
145092
|
-
}
|
|
145093
|
-
else {
|
|
145094
|
-
const childrenLoadStatus = this.loadChildren(); // NB: asynchronous
|
|
145095
|
-
if (_internal__WEBPACK_IMPORTED_MODULE_5__.TileTreeLoadStatus.Loading === childrenLoadStatus) {
|
|
145096
|
-
args.markChildrenLoading();
|
|
145097
|
-
}
|
|
145098
|
-
else if (undefined !== this.realityChildren) {
|
|
145099
|
-
for (const child of this.realityChildren)
|
|
145100
|
-
child.preloadTilesInFrustum(args, context, preloadSizeModifier);
|
|
145101
|
-
}
|
|
145102
|
-
}
|
|
145103
|
-
}
|
|
145104
|
-
/** @internal */
|
|
145105
145186
|
get _anyChildNotFound() {
|
|
145106
145187
|
if (undefined !== this.children)
|
|
145107
145188
|
for (const child of this.children)
|
|
@@ -145538,13 +145619,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
145538
145619
|
class TraversalDetails {
|
|
145539
145620
|
constructor() {
|
|
145540
145621
|
this.queuedChildren = new Array();
|
|
145541
|
-
this.childrenLoading = false;
|
|
145542
145622
|
this.childrenSelected = false;
|
|
145623
|
+
this.shouldSelectParent = false;
|
|
145543
145624
|
}
|
|
145544
145625
|
initialize() {
|
|
145545
145626
|
this.queuedChildren.length = 0;
|
|
145546
|
-
this.childrenLoading = false;
|
|
145547
145627
|
this.childrenSelected = false;
|
|
145628
|
+
this.shouldSelectParent = false;
|
|
145548
145629
|
}
|
|
145549
145630
|
}
|
|
145550
145631
|
/** @internal */
|
|
@@ -145563,11 +145644,11 @@ class TraversalChildrenDetails {
|
|
|
145563
145644
|
}
|
|
145564
145645
|
combine(parentDetails) {
|
|
145565
145646
|
parentDetails.queuedChildren.length = 0;
|
|
145566
|
-
parentDetails.childrenLoading = false;
|
|
145567
145647
|
parentDetails.childrenSelected = false;
|
|
145648
|
+
parentDetails.shouldSelectParent = false;
|
|
145568
145649
|
for (const child of this._childDetails) {
|
|
145569
|
-
parentDetails.childrenLoading = parentDetails.childrenLoading || child.childrenLoading;
|
|
145570
145650
|
parentDetails.childrenSelected = parentDetails.childrenSelected || child.childrenSelected;
|
|
145651
|
+
parentDetails.shouldSelectParent = parentDetails.shouldSelectParent || child.shouldSelectParent;
|
|
145571
145652
|
for (const queuedChild of child.queuedChildren)
|
|
145572
145653
|
parentDetails.queuedChildren.push(queuedChild);
|
|
145573
145654
|
}
|
|
@@ -145587,14 +145668,15 @@ class TraversalSelectionContext {
|
|
|
145587
145668
|
selectOrQueue(tile, args, traversalDetails) {
|
|
145588
145669
|
tile.selectSecondaryTiles(args, this);
|
|
145589
145670
|
tile.markUsed(args);
|
|
145671
|
+
traversalDetails.shouldSelectParent = true;
|
|
145590
145672
|
if (tile.isReady) {
|
|
145591
145673
|
args.markReady(tile);
|
|
145592
145674
|
this.selected.push(tile);
|
|
145593
145675
|
tile.markDisplayed();
|
|
145594
145676
|
this.displayedDescendants.push((traversalDetails.childrenSelected) ? traversalDetails.queuedChildren.slice() : []);
|
|
145595
145677
|
traversalDetails.queuedChildren.length = 0;
|
|
145596
|
-
traversalDetails.childrenLoading = false;
|
|
145597
145678
|
traversalDetails.childrenSelected = true;
|
|
145679
|
+
traversalDetails.shouldSelectParent = false;
|
|
145598
145680
|
}
|
|
145599
145681
|
else if (!tile.isNotFound) {
|
|
145600
145682
|
traversalDetails.queuedChildren.push(tile);
|
|
@@ -145621,7 +145703,6 @@ class TraversalSelectionContext {
|
|
|
145621
145703
|
}
|
|
145622
145704
|
}
|
|
145623
145705
|
}
|
|
145624
|
-
const scratchFrustum = new _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.Frustum();
|
|
145625
145706
|
const scratchCarto = _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.Cartographic.createZero();
|
|
145626
145707
|
const scratchPoint = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Point3d.createZero(), scratchOrigin = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Point3d.createZero();
|
|
145627
145708
|
const scratchRange = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Range3d.createNull();
|
|
@@ -145681,7 +145762,7 @@ class RealityTileTree extends _internal__WEBPACK_IMPORTED_MODULE_6__.TileTree {
|
|
|
145681
145762
|
/** @internal */
|
|
145682
145763
|
prune() {
|
|
145683
145764
|
const olderThan = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BeTimePoint.now().minus(this.expirationTime);
|
|
145684
|
-
this.rootTile.purgeContents(olderThan);
|
|
145765
|
+
this.rootTile.purgeContents(olderThan, !_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.ProcessDetector.isMobileBrowser);
|
|
145685
145766
|
}
|
|
145686
145767
|
/** @internal */
|
|
145687
145768
|
draw(args) {
|
|
@@ -145868,7 +145949,7 @@ class RealityTileTree extends _internal__WEBPACK_IMPORTED_MODULE_6__.TileTree {
|
|
|
145868
145949
|
if (baseDepth > 0) // Maps may force loading of low level globe tiles.
|
|
145869
145950
|
rootTile.preloadRealityTilesAtDepth(baseDepth, context, args);
|
|
145870
145951
|
if (!freezeTiles)
|
|
145871
|
-
|
|
145952
|
+
rootTile.preloadProtectedTiles(args, context);
|
|
145872
145953
|
}
|
|
145873
145954
|
if (!freezeTiles)
|
|
145874
145955
|
for (const tile of context.missing) {
|
|
@@ -145899,19 +145980,6 @@ class RealityTileTree extends _internal__WEBPACK_IMPORTED_MODULE_6__.TileTree {
|
|
|
145899
145980
|
return selected;
|
|
145900
145981
|
}
|
|
145901
145982
|
/** @internal */
|
|
145902
|
-
preloadTilesForScene(args, context, frustumTransform) {
|
|
145903
|
-
const preloadFrustum = args.viewingSpace.getPreloadFrustum(frustumTransform, scratchFrustum);
|
|
145904
|
-
const preloadFrustumPlanes = _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.FrustumPlanes.fromFrustum(preloadFrustum);
|
|
145905
|
-
const worldToNpc = preloadFrustum.toMap4d();
|
|
145906
|
-
const preloadWorldToViewMap = args.viewingSpace.calcNpcToView().multiplyMapMap(worldToNpc);
|
|
145907
|
-
const preloadArgs = new _internal__WEBPACK_IMPORTED_MODULE_6__.RealityTileDrawArgs(args, preloadWorldToViewMap, preloadFrustumPlanes);
|
|
145908
|
-
if (context.preloadDebugBuilder) {
|
|
145909
|
-
context.preloadDebugBuilder.setSymbology(_itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.ColorDef.blue, _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.ColorDef.blue, 2, 0);
|
|
145910
|
-
context.preloadDebugBuilder.addFrustum(preloadFrustum);
|
|
145911
|
-
}
|
|
145912
|
-
this.rootTile.preloadTilesInFrustum(preloadArgs, context, 2);
|
|
145913
|
-
}
|
|
145914
|
-
/** @internal */
|
|
145915
145983
|
logTiles(label, tiles) {
|
|
145916
145984
|
let depthString = "";
|
|
145917
145985
|
let min = 10000, max = -10000;
|
|
@@ -149136,7 +149204,15 @@ class TileUsageMarker {
|
|
|
149136
149204
|
}
|
|
149137
149205
|
/** Returns true if this tile is currently in use by no [[TileUser]]s and its timestamp pre-dates `expirationTime`. */
|
|
149138
149206
|
isExpired(expirationTime) {
|
|
149139
|
-
return this.
|
|
149207
|
+
return this.isTimestampExpired(expirationTime) && !this.getIsTileInUse();
|
|
149208
|
+
}
|
|
149209
|
+
/** Returns true if this tile is currently in use by any [[TileUser]]. */
|
|
149210
|
+
getIsTileInUse() {
|
|
149211
|
+
return _IModelApp__WEBPACK_IMPORTED_MODULE_1__.IModelApp.tileAdmin.isTileInUse(this);
|
|
149212
|
+
}
|
|
149213
|
+
/** Returns true if this tile's timestamp pre-dates `expirationTime`, without checking if it is in use. */
|
|
149214
|
+
isTimestampExpired(expirationTime) {
|
|
149215
|
+
return this._timePoint.before(expirationTime);
|
|
149140
149216
|
}
|
|
149141
149217
|
/** Updates the timestamp to the specified time and marks the tile as being in use by the specified [[TileUser]]. */
|
|
149142
149218
|
mark(user, time) {
|
|
@@ -152702,14 +152778,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
152702
152778
|
|
|
152703
152779
|
|
|
152704
152780
|
const loggerCategory = "ArcGISFeatureProvider";
|
|
152705
|
-
/** @beta */
|
|
152706
152781
|
/** Class representing a map-layer format.
|
|
152707
152782
|
* Each format has it's unique 'formatId' string, used to uniquely identify a format in the [[MapLayerFormatRegistry]].
|
|
152708
152783
|
* When creating an [[ImageMapLayerSettings]] object, a format needs to be specified this 'formatId'.
|
|
152709
152784
|
* The MapLayerFormat object can later be used to validate a source, or create a provider.
|
|
152710
152785
|
*
|
|
152711
|
-
* Subclasses should override formatId and [[MapLayerFormat.createImageryProvider]].
|
|
152712
|
-
* @
|
|
152786
|
+
* Subclasses should override formatId and [[MapLayerFormat.createImageryProvider]].
|
|
152787
|
+
* @public
|
|
152713
152788
|
*/
|
|
152714
152789
|
class MapLayerFormat {
|
|
152715
152790
|
/** Register the current format in the [[MapLayerFormatRegistry]].
|
|
@@ -152728,7 +152803,9 @@ class MapLayerFormat {
|
|
|
152728
152803
|
return undefined;
|
|
152729
152804
|
}
|
|
152730
152805
|
}
|
|
152731
|
-
/**
|
|
152806
|
+
/** A registry of MapLayerFormats identified by their unique format IDs. The registry can be accessed via [[IModelApp.mapLayerFormatRegistry]].
|
|
152807
|
+
* @public
|
|
152808
|
+
*/
|
|
152732
152809
|
class MapLayerFormatRegistry {
|
|
152733
152810
|
constructor(opts) {
|
|
152734
152811
|
this._formats = new Map();
|
|
@@ -152736,11 +152813,12 @@ class MapLayerFormatRegistry {
|
|
|
152736
152813
|
_internal__WEBPACK_IMPORTED_MODULE_2__.internalMapLayerImageryFormats.forEach((format) => this.register(format));
|
|
152737
152814
|
}
|
|
152738
152815
|
isRegistered(formatId) { return this._formats.get(formatId) !== undefined; }
|
|
152739
|
-
register(formatClass
|
|
152816
|
+
register(formatClass) {
|
|
152740
152817
|
if (formatClass.formatId.length === 0)
|
|
152741
152818
|
return; // must be an abstract class, ignore it
|
|
152742
|
-
this._formats.set(formatClass.formatId, { type: formatClass
|
|
152819
|
+
this._formats.set(formatClass.formatId, { type: formatClass });
|
|
152743
152820
|
}
|
|
152821
|
+
/** @beta */
|
|
152744
152822
|
setAccessClient(formatId, accessClient) {
|
|
152745
152823
|
const entry = this._formats.get(formatId);
|
|
152746
152824
|
if (entry !== undefined) {
|
|
@@ -152749,6 +152827,7 @@ class MapLayerFormatRegistry {
|
|
|
152749
152827
|
}
|
|
152750
152828
|
return false;
|
|
152751
152829
|
}
|
|
152830
|
+
/** @beta */
|
|
152752
152831
|
getAccessClient(formatId) {
|
|
152753
152832
|
if (formatId.length === 0)
|
|
152754
152833
|
return undefined;
|
|
@@ -152767,7 +152846,9 @@ class MapLayerFormatRegistry {
|
|
|
152767
152846
|
}
|
|
152768
152847
|
return format.createMapLayerTree(layerSettings, layerIndex, iModel);
|
|
152769
152848
|
}
|
|
152770
|
-
/**
|
|
152849
|
+
/** Returns a [[MapLayerImageryProvider]] based on the provided [[ImageMapLayerSettings]] object.
|
|
152850
|
+
* @internal
|
|
152851
|
+
*/
|
|
152771
152852
|
createImageryProvider(layerSettings) {
|
|
152772
152853
|
const entry = this._formats.get(layerSettings.formatId);
|
|
152773
152854
|
const format = entry?.type;
|
|
@@ -152997,26 +153078,33 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
152997
153078
|
const tileImageSize = 256, untiledImageSize = 256;
|
|
152998
153079
|
const earthRadius = 6378137;
|
|
152999
153080
|
const doDebugToolTips = false;
|
|
153000
|
-
/**
|
|
153081
|
+
/** The status of the map layer imagery provider that lets you know if authentication is needed to request tiles.
|
|
153082
|
+
* @public
|
|
153083
|
+
*/
|
|
153001
153084
|
var MapLayerImageryProviderStatus;
|
|
153002
153085
|
(function (MapLayerImageryProviderStatus) {
|
|
153003
153086
|
MapLayerImageryProviderStatus[MapLayerImageryProviderStatus["Valid"] = 0] = "Valid";
|
|
153004
153087
|
MapLayerImageryProviderStatus[MapLayerImageryProviderStatus["RequireAuth"] = 1] = "RequireAuth";
|
|
153005
153088
|
})(MapLayerImageryProviderStatus || (MapLayerImageryProviderStatus = {}));
|
|
153006
|
-
/**
|
|
153007
|
-
*
|
|
153089
|
+
/** Abstract class for map layer imagery providers.
|
|
153090
|
+
* Map layer imagery providers request and provide tile images and other data. Each map layer from a separate source needs its own imagery provider object.
|
|
153091
|
+
* @beta
|
|
153008
153092
|
*/
|
|
153009
153093
|
class MapLayerImageryProvider {
|
|
153094
|
+
/** @internal */
|
|
153010
153095
|
get status() { return this._status; }
|
|
153011
153096
|
resetStatus() { this.setStatus(MapLayerImageryProviderStatus.Valid); }
|
|
153097
|
+
/** @internal */
|
|
153012
153098
|
get tileSize() { return this._usesCachedTiles ? tileImageSize : untiledImageSize; }
|
|
153099
|
+
/** @internal */
|
|
153013
153100
|
get maximumScreenSize() { return 2 * this.tileSize; }
|
|
153014
153101
|
get minimumZoomLevel() { return this.defaultMinimumZoomLevel; }
|
|
153015
153102
|
get maximumZoomLevel() { return this.defaultMaximumZoomLevel; }
|
|
153103
|
+
/** @internal */
|
|
153016
153104
|
get usesCachedTiles() { return this._usesCachedTiles; }
|
|
153017
153105
|
get mutualExclusiveSubLayer() { return false; }
|
|
153106
|
+
/** @internal */
|
|
153018
153107
|
get useGeographicTilingScheme() { return false; }
|
|
153019
|
-
get hasSuccessfullyFetchedTile() { return this._hasSuccessfullyFetchedTile; }
|
|
153020
153108
|
/** @internal */
|
|
153021
153109
|
get _filterByCartoRange() { return true; }
|
|
153022
153110
|
constructor(_settings, _usesCachedTiles) {
|
|
@@ -153038,6 +153126,7 @@ class MapLayerImageryProvider {
|
|
|
153038
153126
|
this._mercatorTilingScheme = new _internal__WEBPACK_IMPORTED_MODULE_5__.WebMercatorTilingScheme();
|
|
153039
153127
|
this._geographicTilingScheme = new _internal__WEBPACK_IMPORTED_MODULE_5__.GeographicTilingScheme(2, 1, true);
|
|
153040
153128
|
}
|
|
153129
|
+
/** @internal */
|
|
153041
153130
|
async initialize() {
|
|
153042
153131
|
this.loadTile(0, 0, this.defaultMaximumZoomLevel).then((tileData) => {
|
|
153043
153132
|
if (tileData !== undefined)
|
|
@@ -153047,15 +153136,20 @@ class MapLayerImageryProvider {
|
|
|
153047
153136
|
get tilingScheme() { return this.useGeographicTilingScheme ? this._geographicTilingScheme : this._mercatorTilingScheme; }
|
|
153048
153137
|
/** @internal */
|
|
153049
153138
|
addLogoCards(_cards, _viewport) { }
|
|
153139
|
+
/** @internal */
|
|
153050
153140
|
get transparentBackgroundString() { return this._settings.transparentBackground ? "true" : "false"; }
|
|
153141
|
+
/** @internal */
|
|
153051
153142
|
async _areChildrenAvailable(_tile) { return true; }
|
|
153143
|
+
/** @internal */
|
|
153052
153144
|
getPotentialChildIds(tile) {
|
|
153053
153145
|
const childLevel = tile.quadId.level + 1;
|
|
153054
153146
|
return tile.quadId.getChildIds(this.tilingScheme.getNumberOfXChildrenAtLevel(childLevel), this.tilingScheme.getNumberOfYChildrenAtLevel(childLevel));
|
|
153055
153147
|
}
|
|
153148
|
+
/** @internal */
|
|
153056
153149
|
_generateChildIds(tile, resolveChildren) {
|
|
153057
153150
|
resolveChildren(this.getPotentialChildIds(tile));
|
|
153058
153151
|
}
|
|
153152
|
+
/** @internal */
|
|
153059
153153
|
generateChildIds(tile, resolveChildren) {
|
|
153060
153154
|
if (tile.depth >= this.maximumZoomLevel || (undefined !== this.cartoRange && this._filterByCartoRange && !this.cartoRange.intersectsRange(tile.rectangle))) {
|
|
153061
153155
|
tile.setLeaf();
|
|
@@ -153063,12 +153157,14 @@ class MapLayerImageryProvider {
|
|
|
153063
153157
|
}
|
|
153064
153158
|
this._generateChildIds(tile, resolveChildren);
|
|
153065
153159
|
}
|
|
153160
|
+
/** @internal */
|
|
153066
153161
|
async getToolTip(strings, quadId, _carto, tree) {
|
|
153067
153162
|
if (doDebugToolTips) {
|
|
153068
153163
|
const range = quadId.getLatLongRangeDegrees(tree.tilingScheme);
|
|
153069
153164
|
strings.push(`QuadId: ${quadId.debugString}, Lat: ${range.low.x} - ${range.high.x} Long: ${range.low.y} - ${range.high.y}`);
|
|
153070
153165
|
}
|
|
153071
153166
|
}
|
|
153167
|
+
/** @internal */
|
|
153072
153168
|
async getFeatureInfo(featureInfos, _quadId, _carto, _tree) {
|
|
153073
153169
|
// default implementation; simply return an empty feature info
|
|
153074
153170
|
featureInfos.push({ layerName: this._settings.name });
|
|
@@ -153098,7 +153194,8 @@ class MapLayerImageryProvider {
|
|
|
153098
153194
|
}
|
|
153099
153195
|
/** Change the status of this provider.
|
|
153100
153196
|
* Sub-classes should override 'onStatusUpdated' instead of this method.
|
|
153101
|
-
*
|
|
153197
|
+
* @internal
|
|
153198
|
+
*/
|
|
153102
153199
|
setStatus(status) {
|
|
153103
153200
|
if (this._status !== status) {
|
|
153104
153201
|
this.onStatusUpdated(status);
|
|
@@ -153108,9 +153205,8 @@ class MapLayerImageryProvider {
|
|
|
153108
153205
|
}
|
|
153109
153206
|
/** Method called whenever the status changes, giving the opportunity to sub-classes to have a custom behavior.
|
|
153110
153207
|
* @internal
|
|
153111
|
-
|
|
153112
|
-
onStatusUpdated(_newStatus) {
|
|
153113
|
-
}
|
|
153208
|
+
*/
|
|
153209
|
+
onStatusUpdated(_newStatus) { }
|
|
153114
153210
|
/** @internal */
|
|
153115
153211
|
setRequestAuthorization(headers) {
|
|
153116
153212
|
if (this._settings.userName && this._settings.password) {
|
|
@@ -153126,6 +153222,7 @@ class MapLayerImageryProvider {
|
|
|
153126
153222
|
}
|
|
153127
153223
|
return fetch(url, { method: "GET", headers });
|
|
153128
153224
|
}
|
|
153225
|
+
/** Returns a map layer tile at the specified settings. */
|
|
153129
153226
|
async loadTile(row, column, zoomLevel) {
|
|
153130
153227
|
try {
|
|
153131
153228
|
const tileUrl = await this.constructUrl(row, column, zoomLevel);
|
|
@@ -153280,8 +153377,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
153280
153377
|
|
|
153281
153378
|
|
|
153282
153379
|
|
|
153283
|
-
/**
|
|
153284
|
-
* Values for return codes from [[MapLayerSource.validateSource]]
|
|
153380
|
+
/** Values for return codes from [[MapLayerSource.validateSource]]
|
|
153285
153381
|
* @public
|
|
153286
153382
|
*/
|
|
153287
153383
|
var MapLayerSourceStatus;
|
|
@@ -153301,7 +153397,7 @@ var MapLayerSourceStatus;
|
|
|
153301
153397
|
/** Map-layer coordinate system is not supported */
|
|
153302
153398
|
MapLayerSourceStatus[MapLayerSourceStatus["InvalidCoordinateSystem"] = 6] = "InvalidCoordinateSystem";
|
|
153303
153399
|
})(MapLayerSourceStatus || (MapLayerSourceStatus = {}));
|
|
153304
|
-
/** A source for map layers.
|
|
153400
|
+
/** A source for map layers. These may be catalogued for convenient use by users or applications.
|
|
153305
153401
|
* @public
|
|
153306
153402
|
*/
|
|
153307
153403
|
class MapLayerSource {
|
|
@@ -153350,7 +153446,7 @@ class MapLayerSource {
|
|
|
153350
153446
|
}
|
|
153351
153447
|
}
|
|
153352
153448
|
/** A collection of [[MapLayerSource]] objects.
|
|
153353
|
-
* @
|
|
153449
|
+
* @beta
|
|
153354
153450
|
*/
|
|
153355
153451
|
class MapLayerSources {
|
|
153356
153452
|
constructor(_sources) {
|
|
@@ -154109,6 +154205,10 @@ class MapTile extends _internal__WEBPACK_IMPORTED_MODULE_7__.RealityTile {
|
|
|
154109
154205
|
return parentHeightDepth > MapTile._maxParentHeightDepth;
|
|
154110
154206
|
}
|
|
154111
154207
|
/** @internal */
|
|
154208
|
+
minimumVisibleFactor() {
|
|
154209
|
+
return 0.25;
|
|
154210
|
+
}
|
|
154211
|
+
/** @internal */
|
|
154112
154212
|
getDrapeTextures() {
|
|
154113
154213
|
if (undefined === this._imageryTiles)
|
|
154114
154214
|
return undefined;
|
|
@@ -155653,12 +155753,12 @@ class MapTiledGraphicsProvider {
|
|
|
155653
155753
|
this._detachFromDisplayStyle.length = 0;
|
|
155654
155754
|
}
|
|
155655
155755
|
/** @internal */
|
|
155656
|
-
getMapLayerImageryProvider(
|
|
155657
|
-
const imageryTreeRef = isOverlay ? this.overlayMap.getLayerImageryTreeRef(index) : this.backgroundMap.getLayerImageryTreeRef(index);
|
|
155756
|
+
getMapLayerImageryProvider(mapLayerIndex) {
|
|
155757
|
+
const imageryTreeRef = mapLayerIndex.isOverlay ? this.overlayMap.getLayerImageryTreeRef(mapLayerIndex.index) : this.backgroundMap.getLayerImageryTreeRef(mapLayerIndex.index);
|
|
155658
155758
|
return imageryTreeRef?.imageryProvider;
|
|
155659
155759
|
}
|
|
155660
|
-
resetMapLayer(
|
|
155661
|
-
const imageryTreeRef = isOverlay ? this.overlayMap.getLayerImageryTreeRef(index) : this.backgroundMap.getLayerImageryTreeRef(index);
|
|
155760
|
+
resetMapLayer(mapLayerIndex) {
|
|
155761
|
+
const imageryTreeRef = mapLayerIndex.isOverlay ? this.overlayMap.getLayerImageryTreeRef(mapLayerIndex.index) : this.backgroundMap.getLayerImageryTreeRef(mapLayerIndex.index);
|
|
155662
155762
|
imageryTreeRef?.resetTreeOwner();
|
|
155663
155763
|
}
|
|
155664
155764
|
/** Return a list of map-layers indexes matching a given MapTile tree Id and a layer imagery tree id.
|
|
@@ -160573,8 +160673,7 @@ class ElementSetTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_9__.Primiti
|
|
|
160573
160673
|
ids.add(id);
|
|
160574
160674
|
try {
|
|
160575
160675
|
const ecsql = `SELECT ECInstanceId as id, Parent.Id as parentId FROM BisCore.GeometricElement WHERE Parent.Id IN (SELECT Parent.Id as parentId FROM BisCore.GeometricElement WHERE parent.Id != 0 AND ECInstanceId IN (${id}))`;
|
|
160576
|
-
|
|
160577
|
-
for await (const row of this.iModel.query(ecsql, undefined, { rowFormat: _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.QueryRowFormat.UseJsPropertyNames })) {
|
|
160676
|
+
for await (const row of this.iModel.createQueryReader(ecsql, undefined, { rowFormat: _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.QueryRowFormat.UseJsPropertyNames })) {
|
|
160578
160677
|
ids.add(row.parentId);
|
|
160579
160678
|
ids.add(row.id);
|
|
160580
160679
|
}
|
|
@@ -276483,7 +276582,7 @@ class TestContext {
|
|
|
276483
276582
|
this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
|
|
276484
276583
|
const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${process.env.IMJS_URL_PREFIX ?? ""}api.bentley.com/imodels` } });
|
|
276485
276584
|
await core_frontend_1.NoRenderApp.startup({
|
|
276486
|
-
applicationVersion: "4.0.0-dev.
|
|
276585
|
+
applicationVersion: "4.0.0-dev.75",
|
|
276487
276586
|
applicationId: this.settings.gprid,
|
|
276488
276587
|
authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.adminUserAccessToken),
|
|
276489
276588
|
hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
|
|
@@ -284081,8 +284180,9 @@ class FavoritePropertiesManager {
|
|
|
284081
284180
|
INNER JOIN ECDbMeta.ECClassDef baseClass ON baseClass.ECInstanceId = baseClassRels.TargetECInstanceId
|
|
284082
284181
|
INNER JOIN ECDbMeta.ECSchemaDef baseSchema ON baseSchema.ECInstanceId = baseClass.Schema.Id
|
|
284083
284182
|
WHERE (derivedSchema.Name || ':' || derivedClass.Name) IN (${[...missingClasses].map((className) => `'${className}'`).join(",")})`;
|
|
284084
|
-
|
|
284085
|
-
|
|
284183
|
+
const reader = imodel.createQueryReader(query, undefined, { rowFormat: _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.QueryRowFormat.UseJsPropertyNames });
|
|
284184
|
+
while (await reader.step()) {
|
|
284185
|
+
const row = reader.current.toRow();
|
|
284086
284186
|
if (!(row.classFullName in baseClasses))
|
|
284087
284187
|
baseClasses[row.classFullName] = [];
|
|
284088
284188
|
baseClasses[row.classFullName].push(row.baseClassFullName);
|
|
@@ -296036,7 +296136,7 @@ module.exports = JSON.parse('{"name":"axios","version":"0.21.4","description":"P
|
|
|
296036
296136
|
/***/ ((module) => {
|
|
296037
296137
|
|
|
296038
296138
|
"use strict";
|
|
296039
|
-
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.0.0-dev.
|
|
296139
|
+
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.0.0-dev.75","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","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 ES2020 --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","docs":"betools docs --includes=../../generated-docs/extract --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/primitives,**/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-eslintrc -c \\"./node_modules/@itwin/eslint-plugin/dist/configs/extension-exports-config.js\\" \\"./src/**/*.ts\\" 1>&2","lint":"eslint -f visualstudio \\"./src/**/*.ts\\" 1>&2","pseudolocalize":"betools pseudolocalize --englishDir ./src/public/locales/en --out ./public/locales/en-PSEUDO","test":"npm run -s webpackTests && certa -r chrome","cover":"npm -s test","test:debug":"certa -r chrome --debug","webpackTests":"webpack --config ./src/test/utils/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:^4.0.0-dev.75","@itwin/core-bentley":"workspace:^4.0.0-dev.75","@itwin/core-common":"workspace:^4.0.0-dev.75","@itwin/core-geometry":"workspace:^4.0.0-dev.75","@itwin/core-orbitgt":"workspace:^4.0.0-dev.75","@itwin/core-quantity":"workspace:^4.0.0-dev.75"},"//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/certa":"workspace:*","@itwin/eslint-plugin":"^4.0.0-dev.33","@itwin/webgl-compatibility":"workspace:*","@types/chai":"4.3.1","@types/chai-as-promised":"^7","@types/mocha":"^8.2.2","@types/node":"^18.11.5","@types/semver":"7.3.10","@types/sinon":"^9.0.0","babel-loader":"~8.2.5","babel-plugin-istanbul":"~6.1.1","chai":"^4.1.2","chai-as-promised":"^7","cpx2":"^3.0.0","eslint":"^8.36.0","glob":"^7.1.2","mocha":"^10.0.0","nyc":"^15.1.0","rimraf":"^3.0.2","sinon":"^9.0.2","source-map-loader":"^4.0.0","typescript":"~5.0.2","webpack":"^5.76.0"},"//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/object-storage-azure":"^1.5.0","@itwin/cloud-agnostic-core":"^1.5.0","@itwin/object-storage-core":"^1.5.0","@itwin/core-i18n":"workspace:*","@itwin/core-telemetry":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"^3.1.6","@loaders.gl/draco":"^3.1.6","fuse.js":"^3.3.0","semver":"^7.3.5","wms-capabilities":"0.4.0","reflect-metadata":"0.1.13"},"nyc":{"extends":"./node_modules/@itwin/build-tools/.nycrc"},"eslintConfig":{"plugins":["@itwin"],"extends":"plugin:@itwin/itwinjs-recommended","rules":{"@itwin/no-internal-barrel-imports":["error",{"required-barrel-modules":["./src/tile/internal.ts"]}],"@itwin/public-extension-exports":["error",{"releaseTags":["public","preview"],"outputApiFile":false}]},"overrides":[{"files":["*.test.ts","*.test.tsx","**/test/**/*.ts"],"rules":{"@itwin/no-internal-barrel-imports":"off"}}]}}');
|
|
296040
296140
|
|
|
296041
296141
|
/***/ }),
|
|
296042
296142
|
|
|
@@ -296507,8 +296607,7 @@ describe("Operational: Execute Query", () => {
|
|
|
296507
296607
|
const iModel = await testContext.iModelWithChangesets.getConnection();
|
|
296508
296608
|
const query = "select count(*) nRows from(SELECT ECInstanceId FROM Bis.Element LIMIT 50)";
|
|
296509
296609
|
const rows = [];
|
|
296510
|
-
|
|
296511
|
-
for await (const row of iModel.query(query, undefined, { rowFormat: core_common_1.QueryRowFormat.UseJsPropertyNames }))
|
|
296610
|
+
for await (const row of iModel.createQueryReader(query, undefined, { rowFormat: core_common_1.QueryRowFormat.UseJsPropertyNames }))
|
|
296512
296611
|
rows.push(row);
|
|
296513
296612
|
expect(rows).to.be.not.empty;
|
|
296514
296613
|
});
|
|
@@ -297223,8 +297322,7 @@ describe("Basic Scenarios", async () => {
|
|
|
297223
297322
|
it("should open iModel and Execute Query TestCase:819343", async () => {
|
|
297224
297323
|
const iModel = await testContext.iModelWithChangesets.getConnection();
|
|
297225
297324
|
const rows = [];
|
|
297226
|
-
|
|
297227
|
-
for await (const row of iModel.query("SELECT ECInstanceId AS id FROM BisCore.Element", undefined, { rowFormat: core_common_1.QueryRowFormat.UseJsPropertyNames, limit: { count: 10 } }))
|
|
297325
|
+
for await (const row of iModel.createQueryReader("SELECT ECInstanceId AS id FROM BisCore.Element", undefined, { rowFormat: core_common_1.QueryRowFormat.UseJsPropertyNames, limit: { count: 10 } }))
|
|
297228
297326
|
rows.push(row);
|
|
297229
297327
|
expect(rows).not.to.be.empty;
|
|
297230
297328
|
});
|