@itwin/ecschema-rpcinterface-tests 4.0.0-dev.61 → 4.0.0-dev.66
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 +166 -60
- 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/package.json +19 -19
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_d48c.bundled-tests.js","mappings":";;;;;;;;AAAA","sources":["file:///ignored|D:\\
|
|
1
|
+
{"version":3,"file":"_d48c.bundled-tests.js","mappings":";;;;;;;;AAAA","sources":["file:///ignored|D:\\vsts_b\\13\\s\\common\\temp\\node_modules\\.pnpm\\@loaders.gl+worker-utils@3.3.1\\node_modules\\@loaders.gl\\worker-utils\\dist\\esm\\lib\\library-utils|../node/require-utils.node"],"names":[],"sourceRoot":""}
|
|
@@ -34645,11 +34645,18 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
34645
34645
|
/* harmony export */ "Tracing": () => (/* binding */ Tracing)
|
|
34646
34646
|
/* harmony export */ });
|
|
34647
34647
|
/* harmony import */ var _Logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Logger */ "../../core/bentley/lib/esm/Logger.js");
|
|
34648
|
+
/*---------------------------------------------------------------------------------------------
|
|
34649
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
34650
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
34651
|
+
*--------------------------------------------------------------------------------------------*/
|
|
34652
|
+
/** @packageDocumentation
|
|
34653
|
+
* @module Logging
|
|
34654
|
+
*/
|
|
34648
34655
|
|
|
34649
34656
|
// re-export so that consumers can construct full SpanOptions object without external dependencies
|
|
34650
34657
|
/**
|
|
34651
|
-
* Mirrors the SpanKind enum from [@opentelemetry/api](https://open-telemetry.github.io/opentelemetry-js
|
|
34652
|
-
* @
|
|
34658
|
+
* Mirrors the SpanKind enum from [@opentelemetry/api](https://open-telemetry.github.io/opentelemetry-js/enums/_opentelemetry_api.SpanKind.html)
|
|
34659
|
+
* @public
|
|
34653
34660
|
*/
|
|
34654
34661
|
var SpanKind;
|
|
34655
34662
|
(function (SpanKind) {
|
|
@@ -34707,7 +34714,7 @@ function flattenObject(obj) {
|
|
|
34707
34714
|
}
|
|
34708
34715
|
/**
|
|
34709
34716
|
* Enables OpenTelemetry tracing in addition to traditional logging.
|
|
34710
|
-
* @
|
|
34717
|
+
* @public
|
|
34711
34718
|
*/
|
|
34712
34719
|
class Tracing {
|
|
34713
34720
|
/**
|
|
@@ -34741,7 +34748,7 @@ class Tracing {
|
|
|
34741
34748
|
}
|
|
34742
34749
|
/**
|
|
34743
34750
|
* Enable logging to OpenTelemetry. [[Tracing.withSpan]] will be enabled, all log entries will be attached to active span as span events.
|
|
34744
|
-
* [
|
|
34751
|
+
* [IModelHost.startup]($backend) will call this automatically if the `enableOpenTelemetry` option is enabled and it succeeds in requiring `@opentelemetry/api`.
|
|
34745
34752
|
* @note Node.js OpenTelemetry SDK should be initialized by the user.
|
|
34746
34753
|
*/
|
|
34747
34754
|
static enableOpenTelemetry(tracer, api) {
|
|
@@ -34762,7 +34769,7 @@ class Tracing {
|
|
|
34762
34769
|
};
|
|
34763
34770
|
}
|
|
34764
34771
|
/** Set attributes on currently active openTelemetry span. Doesn't do anything if openTelemetry logging is not initialized.
|
|
34765
|
-
* @param attributes
|
|
34772
|
+
* @param attributes The attributes to set
|
|
34766
34773
|
*/
|
|
34767
34774
|
static setAttributes(attributes) {
|
|
34768
34775
|
Tracing._openTelemetry?.trace.getSpan(Tracing._openTelemetry.context.active())?.setAttributes(attributes);
|
|
@@ -59209,27 +59216,63 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
59209
59216
|
* @module Geometry
|
|
59210
59217
|
*/
|
|
59211
59218
|
|
|
59219
|
+
/*
|
|
59220
|
+
The following visualizes the contents of frustum.points, which is sent to computeFrustumPlanes().
|
|
59221
|
+
The below numbers are the indices into that array.
|
|
59222
|
+
|
|
59223
|
+
2----------3
|
|
59224
|
+
/| /|
|
|
59225
|
+
/ 0--------/-1
|
|
59226
|
+
6----------7 /
|
|
59227
|
+
| / | /
|
|
59228
|
+
|/ |/
|
|
59229
|
+
4__________5
|
|
59230
|
+
|
|
59231
|
+
0 = left bottom rear
|
|
59232
|
+
1 = right bottom rear
|
|
59233
|
+
2 = left top right
|
|
59234
|
+
3 = right top rear
|
|
59235
|
+
4 = left bottom front
|
|
59236
|
+
5 = right bottom front
|
|
59237
|
+
6 = left top front
|
|
59238
|
+
7 = right top front
|
|
59239
|
+
*/
|
|
59240
|
+
// Ordering of sub-arrays is: [origin, a, b]
|
|
59212
59241
|
const planePointIndices = [
|
|
59213
|
-
[1,
|
|
59214
|
-
[0,
|
|
59215
|
-
[2,
|
|
59216
|
-
[0,
|
|
59217
|
-
[0,
|
|
59218
|
-
|
|
59242
|
+
[1, 5, 3],
|
|
59243
|
+
[0, 2, 4],
|
|
59244
|
+
[2, 3, 6],
|
|
59245
|
+
[0, 4, 1],
|
|
59246
|
+
[0, 1, 2], // back
|
|
59247
|
+
// Skip front plane because it can be too small. Instead derive it from back plane.
|
|
59248
|
+
// Otherwise, it would be: [4, 6, 5]
|
|
59219
59249
|
];
|
|
59220
59250
|
function computeFrustumPlanes(frustum) {
|
|
59221
59251
|
const planes = [];
|
|
59222
59252
|
const points = frustum.points;
|
|
59223
59253
|
const expandPlaneDistance = 1e-6;
|
|
59254
|
+
let normal;
|
|
59224
59255
|
for (const indices of planePointIndices) {
|
|
59225
59256
|
const i0 = indices[0], i1 = indices[1], i2 = indices[2];
|
|
59226
|
-
|
|
59257
|
+
normal = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.Vector3d.createCrossProductToPoints(points[i0], points[i1], points[i2]);
|
|
59227
59258
|
normal.normalizeInPlace();
|
|
59228
59259
|
const plane = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.ClipPlane.createNormalAndDistance(normal, normal.dotProduct(points[i0]) - expandPlaneDistance);
|
|
59229
59260
|
if (!plane)
|
|
59230
59261
|
return [];
|
|
59231
59262
|
planes.push(plane);
|
|
59232
59263
|
}
|
|
59264
|
+
// Derive front plane from back plane due to fact that front plane can become very tiny and cause precision issues, resulting in zero frustum planes. Deriving the front plane from the rear rect resolves this problem.
|
|
59265
|
+
// The back plane was the last plane processed above, so we can just consult the current value of `normal`.
|
|
59266
|
+
if (undefined !== normal) {
|
|
59267
|
+
normal.negate(normal); // negate the back plane
|
|
59268
|
+
// NB: Below, we make sure we calculate the distance based on a point on the front rect, not the rear rect!
|
|
59269
|
+
const plane = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.ClipPlane.createNormalAndDistance(normal, normal.dotProduct(points[4]) - expandPlaneDistance);
|
|
59270
|
+
if (!plane)
|
|
59271
|
+
return [];
|
|
59272
|
+
planes.push(plane);
|
|
59273
|
+
}
|
|
59274
|
+
else
|
|
59275
|
+
return [];
|
|
59233
59276
|
return planes;
|
|
59234
59277
|
}
|
|
59235
59278
|
// Scratch variable used by FrustumPlanes.computeContainment.
|
|
@@ -59245,6 +59288,7 @@ class FrustumPlanes {
|
|
|
59245
59288
|
}
|
|
59246
59289
|
/** Compute the six planes of the specified frustum.
|
|
59247
59290
|
* If the frustum is degenerate - that is, its points do not represent a truncated pyramid - then the returned `FrustumPlanes` will contain zero planes.
|
|
59291
|
+
* @note This method assumes that the front plane is parallel to the back plane.
|
|
59248
59292
|
* @see [[isValid]] to test this condition.
|
|
59249
59293
|
*/
|
|
59250
59294
|
static fromFrustum(frustum) {
|
|
@@ -59271,6 +59315,7 @@ class FrustumPlanes {
|
|
|
59271
59315
|
}
|
|
59272
59316
|
/** Recompute the planes from the specified frustum.
|
|
59273
59317
|
* @returns true upon success, or false if the input frustum was degenerate, in which case [[isValid]] will be `false`.
|
|
59318
|
+
* @note This method assumes that the front plane is parallel to the back plane.
|
|
59274
59319
|
*/
|
|
59275
59320
|
init(frustum) {
|
|
59276
59321
|
this._planes = computeFrustumPlanes(frustum);
|
|
@@ -76698,20 +76743,32 @@ var AccuDrawFlags;
|
|
|
76698
76743
|
AccuDrawFlags[AccuDrawFlags["UpdateRotation"] = 8388608] = "UpdateRotation";
|
|
76699
76744
|
AccuDrawFlags[AccuDrawFlags["SmartRotation"] = 16777216] = "SmartRotation";
|
|
76700
76745
|
})(AccuDrawFlags || (AccuDrawFlags = {}));
|
|
76701
|
-
/**
|
|
76746
|
+
/** AccuDraw coordinate input mode
|
|
76747
|
+
* @public
|
|
76748
|
+
*/
|
|
76702
76749
|
var CompassMode;
|
|
76703
76750
|
(function (CompassMode) {
|
|
76751
|
+
/** Coordinate input using distance and angle */
|
|
76704
76752
|
CompassMode[CompassMode["Polar"] = 0] = "Polar";
|
|
76753
|
+
/** Coordinate input using x, y, and z deltas */
|
|
76705
76754
|
CompassMode[CompassMode["Rectangular"] = 1] = "Rectangular";
|
|
76706
76755
|
})(CompassMode || (CompassMode = {}));
|
|
76707
|
-
/**
|
|
76756
|
+
/** AccuDraw compass base rotation
|
|
76757
|
+
* @public
|
|
76758
|
+
*/
|
|
76708
76759
|
var RotationMode;
|
|
76709
76760
|
(function (RotationMode) {
|
|
76761
|
+
/** Aligned with standard view top or ACS top when [[ToolAdmin.acsContextLock]] is enabled */
|
|
76710
76762
|
RotationMode[RotationMode["Top"] = 1] = "Top";
|
|
76763
|
+
/** Aligned with standard view front or ACS front when [[ToolAdmin.acsContextLock]] is enabled */
|
|
76711
76764
|
RotationMode[RotationMode["Front"] = 2] = "Front";
|
|
76765
|
+
/** Aligned with standard view right or ACS right when [[ToolAdmin.acsContextLock]] is enabled */
|
|
76712
76766
|
RotationMode[RotationMode["Side"] = 3] = "Side";
|
|
76767
|
+
/** Aligned with view */
|
|
76713
76768
|
RotationMode[RotationMode["View"] = 4] = "View";
|
|
76769
|
+
/** Aligned with view ACS */
|
|
76714
76770
|
RotationMode[RotationMode["ACS"] = 5] = "ACS";
|
|
76771
|
+
/** Not aligned with a standard rotation or ACS */
|
|
76715
76772
|
RotationMode[RotationMode["Context"] = 6] = "Context";
|
|
76716
76773
|
})(RotationMode || (RotationMode = {}));
|
|
76717
76774
|
/** @internal */
|
|
@@ -76725,12 +76782,18 @@ var LockedStates;
|
|
|
76725
76782
|
LockedStates[LockedStates["XY_BM"] = 3] = "XY_BM";
|
|
76726
76783
|
LockedStates[LockedStates["ANGLE_BM"] = 7] = "ANGLE_BM";
|
|
76727
76784
|
})(LockedStates || (LockedStates = {}));
|
|
76728
|
-
/**
|
|
76785
|
+
/** AccuDraw enabled states
|
|
76786
|
+
* @public
|
|
76787
|
+
*/
|
|
76729
76788
|
var CurrentState;
|
|
76730
76789
|
(function (CurrentState) {
|
|
76790
|
+
/** Compass disabled/unwanted for this session */
|
|
76731
76791
|
CurrentState[CurrentState["NotEnabled"] = 0] = "NotEnabled";
|
|
76792
|
+
/** Compass deactivated but CAN be activated by user */
|
|
76732
76793
|
CurrentState[CurrentState["Deactivated"] = 1] = "Deactivated";
|
|
76794
|
+
/** Compass not displayed awaiting automatic activation (default tool state) */
|
|
76733
76795
|
CurrentState[CurrentState["Inactive"] = 2] = "Inactive";
|
|
76796
|
+
/** Compass displayed and adjusting points */
|
|
76734
76797
|
CurrentState[CurrentState["Active"] = 3] = "Active";
|
|
76735
76798
|
})(CurrentState || (CurrentState = {}));
|
|
76736
76799
|
/** @internal */
|
|
@@ -76743,13 +76806,20 @@ var ContextMode;
|
|
|
76743
76806
|
ContextMode[ContextMode["XAxis2"] = 4] = "XAxis2";
|
|
76744
76807
|
ContextMode[ContextMode["None"] = 15] = "None";
|
|
76745
76808
|
})(ContextMode || (ContextMode = {}));
|
|
76746
|
-
/**
|
|
76809
|
+
/** AccuDraw coordinate input fields
|
|
76810
|
+
* @public
|
|
76811
|
+
*/
|
|
76747
76812
|
var ItemField;
|
|
76748
76813
|
(function (ItemField) {
|
|
76814
|
+
/** Distance for polar mode */
|
|
76749
76815
|
ItemField[ItemField["DIST_Item"] = 0] = "DIST_Item";
|
|
76816
|
+
/** Angle for polar mode */
|
|
76750
76817
|
ItemField[ItemField["ANGLE_Item"] = 1] = "ANGLE_Item";
|
|
76818
|
+
/** X delta for rectangular mode */
|
|
76751
76819
|
ItemField[ItemField["X_Item"] = 2] = "X_Item";
|
|
76820
|
+
/** Y delta for rectangular mode */
|
|
76752
76821
|
ItemField[ItemField["Y_Item"] = 3] = "Y_Item";
|
|
76822
|
+
/** Z delta (3d only) */
|
|
76753
76823
|
ItemField[ItemField["Z_Item"] = 4] = "Z_Item";
|
|
76754
76824
|
})(ItemField || (ItemField = {}));
|
|
76755
76825
|
/** @internal */
|
|
@@ -76861,15 +76931,16 @@ class ThreeAxes {
|
|
|
76861
76931
|
equals(other) { return this.x.isExactEqual(other.x) && this.y.isExactEqual(other.y) && this.z.isExactEqual(other.z); }
|
|
76862
76932
|
}
|
|
76863
76933
|
/** Accudraw is an aide for entering coordinate data.
|
|
76864
|
-
*
|
|
76934
|
+
* This class is public to allow applications to provide a user interface for AccuDraw, either by implementing their own, or
|
|
76935
|
+
* using the one supplied by the itwin appui package.
|
|
76936
|
+
* @note When writing an [[InteractiveTool]] it is not correct to call methods on AccuDraw directly, tools should instead
|
|
76937
|
+
* provide hints to AccuDraw using [[AccuDrawHintBuilder]].
|
|
76938
|
+
* @public
|
|
76865
76939
|
*/
|
|
76866
76940
|
class AccuDraw {
|
|
76867
76941
|
constructor() {
|
|
76868
|
-
/** @internal */
|
|
76869
76942
|
this.currentState = CurrentState.NotEnabled; // Compass state
|
|
76870
|
-
/** @internal */
|
|
76871
76943
|
this.compassMode = CompassMode.Rectangular; // Compass mode
|
|
76872
|
-
/** @internal */
|
|
76873
76944
|
this.rotationMode = RotationMode.View; // Compass rotation
|
|
76874
76945
|
/** @internal */
|
|
76875
76946
|
this.published = new AccudrawData(); // Staging area for hints
|
|
@@ -76968,13 +77039,11 @@ class AccuDraw {
|
|
|
76968
77039
|
get isDeactivated() { return (CurrentState.Deactivated === this.currentState); }
|
|
76969
77040
|
/** @internal */
|
|
76970
77041
|
setNewFocus(index) { this.newFocus = index; }
|
|
76971
|
-
/**
|
|
77042
|
+
/** Get the current lock state for the supplied input field */
|
|
76972
77043
|
getFieldLock(index) { return this._fieldLocked[index]; }
|
|
76973
77044
|
/** @internal */
|
|
76974
77045
|
getKeyinStatus(index) { return this._keyinStatus[index]; }
|
|
76975
|
-
/** Implement this method to set focus to the AccuDraw UI.
|
|
76976
|
-
* @internal
|
|
76977
|
-
*/
|
|
77046
|
+
/** Implement this method to set focus to the AccuDraw UI. */
|
|
76978
77047
|
grabInputFocus() { }
|
|
76979
77048
|
/** @internal */
|
|
76980
77049
|
activate() {
|
|
@@ -76990,21 +77059,21 @@ class AccuDraw {
|
|
|
76990
77059
|
if (CurrentState.Inactive === this.currentState)
|
|
76991
77060
|
this.currentState = CurrentState.Deactivated;
|
|
76992
77061
|
}
|
|
76993
|
-
/**
|
|
77062
|
+
/** Change current compass input mode to either polar or rectangular */
|
|
76994
77063
|
setCompassMode(mode) {
|
|
76995
77064
|
if (mode === this.compassMode)
|
|
76996
77065
|
return;
|
|
76997
77066
|
this.compassMode = mode;
|
|
76998
77067
|
this.onCompassModeChange();
|
|
76999
77068
|
}
|
|
77000
|
-
/**
|
|
77069
|
+
/** Change current compass orientation */
|
|
77001
77070
|
setRotationMode(mode) {
|
|
77002
77071
|
if (mode === this.rotationMode)
|
|
77003
77072
|
return;
|
|
77004
77073
|
this.rotationMode = mode;
|
|
77005
77074
|
this.onRotationModeChange();
|
|
77006
77075
|
}
|
|
77007
|
-
/**
|
|
77076
|
+
/** Change the lock status for the supplied input field */
|
|
77008
77077
|
setFieldLock(index, locked) {
|
|
77009
77078
|
if (locked === this._fieldLocked[index])
|
|
77010
77079
|
return;
|
|
@@ -77485,7 +77554,7 @@ class AccuDraw {
|
|
|
77485
77554
|
return this.sendDataPoint(this.point, vp);
|
|
77486
77555
|
}
|
|
77487
77556
|
}
|
|
77488
|
-
/**
|
|
77557
|
+
/** Get the current value for the supplied input field */
|
|
77489
77558
|
getValueByIndex(index) {
|
|
77490
77559
|
switch (index) {
|
|
77491
77560
|
case ItemField.X_Item: return this.delta.x;
|
|
@@ -77497,7 +77566,7 @@ class AccuDraw {
|
|
|
77497
77566
|
return 0.0;
|
|
77498
77567
|
}
|
|
77499
77568
|
}
|
|
77500
|
-
/**
|
|
77569
|
+
/** Set the current value for the supplied input field */
|
|
77501
77570
|
setValueByIndex(index, value) {
|
|
77502
77571
|
switch (index) {
|
|
77503
77572
|
case ItemField.X_Item:
|
|
@@ -77677,7 +77746,7 @@ class AccuDraw {
|
|
|
77677
77746
|
return true;
|
|
77678
77747
|
return (!_IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.toolAdmin.gridLock);
|
|
77679
77748
|
}
|
|
77680
|
-
/**
|
|
77749
|
+
/** Call from an AccuDraw UI event to sync the supplied input field value */
|
|
77681
77750
|
async processFieldInput(index, input, synchText) {
|
|
77682
77751
|
const isBearing = false;
|
|
77683
77752
|
if (_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BentleyStatus.SUCCESS !== this.updateFieldValue(index, input, { isBearing })) {
|
|
@@ -78499,17 +78568,17 @@ class AccuDraw {
|
|
|
78499
78568
|
this.saveCoordinate(ItemField.Z_Item, this.delta.z);
|
|
78500
78569
|
}
|
|
78501
78570
|
}
|
|
78502
|
-
/**
|
|
78571
|
+
/** Called after compass mode is changed between polar and rectangular */
|
|
78503
78572
|
onCompassModeChange() { }
|
|
78504
|
-
/**
|
|
78573
|
+
/** Called after compass rotation is changed */
|
|
78505
78574
|
onRotationModeChange() { }
|
|
78506
|
-
/**
|
|
78575
|
+
/** Called after input field locked state is changed */
|
|
78507
78576
|
onFieldLockChange(_index) { }
|
|
78508
|
-
/**
|
|
78577
|
+
/** Called after input field value changes */
|
|
78509
78578
|
onFieldValueChange(_index) { }
|
|
78510
|
-
/**
|
|
78579
|
+
/** Whether AccuDraw currently has input focus */
|
|
78511
78580
|
get hasInputFocus() { return true; }
|
|
78512
|
-
/**
|
|
78581
|
+
/** Set focus to the specified input field */
|
|
78513
78582
|
setFocusItem(_index) { }
|
|
78514
78583
|
static getMinPolarMag(origin) {
|
|
78515
78584
|
return (1.0e-12 * (1.0 + origin.magnitude()));
|
|
@@ -79046,7 +79115,6 @@ class AccuDraw {
|
|
|
79046
79115
|
/** Implemented by sub-classes to update ui fields to show current deltas or coordinates when inactive.
|
|
79047
79116
|
* Should also choose active x or y input field in rectangular mode based on cursor position when
|
|
79048
79117
|
* axis isn't locked to support "smart lock".
|
|
79049
|
-
* @internal
|
|
79050
79118
|
*/
|
|
79051
79119
|
onMotion(_ev) { }
|
|
79052
79120
|
/** @internal */
|
|
@@ -83465,6 +83533,44 @@ class DisplayStyleState extends _EntityState__WEBPACK_IMPORTED_MODULE_6__.Elemen
|
|
|
83465
83533
|
* @see [[overrideSubCategory]]
|
|
83466
83534
|
*/
|
|
83467
83535
|
getSubCategoryOverride(id) { return this.settings.getSubCategoryOverride(id); }
|
|
83536
|
+
/** For each subcategory belonging to any of the specified categories, make it visible by turning off the "invisible" flag in its subcategory appearance.
|
|
83537
|
+
* This requires that the categories and subcategories have been previously loaded by, e.g., a call to IModelConnection.querySubCategories.
|
|
83538
|
+
* @returns true if the visibility of any subcategory was modified.
|
|
83539
|
+
* @see Viewport.changeCategoryDisplay
|
|
83540
|
+
* @see ViewCreator3dOptions.allSubCategoriesVisible
|
|
83541
|
+
* @internal
|
|
83542
|
+
*/
|
|
83543
|
+
enableAllLoadedSubCategories(categoryIds) {
|
|
83544
|
+
let anyChanged = false;
|
|
83545
|
+
for (const categoryId of _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Id64.iterable(categoryIds)) {
|
|
83546
|
+
const subCategoryIds = this.iModel.subcategories.getSubCategories(categoryId);
|
|
83547
|
+
if (undefined !== subCategoryIds)
|
|
83548
|
+
for (const subCategoryId of subCategoryIds)
|
|
83549
|
+
if (this.setSubCategoryVisible(subCategoryId, true))
|
|
83550
|
+
anyChanged = true;
|
|
83551
|
+
}
|
|
83552
|
+
return anyChanged;
|
|
83553
|
+
}
|
|
83554
|
+
/** Change the "invisible" flag for the given subcategory's appearance.
|
|
83555
|
+
* This requires that the subcategory appearance has been previously loaded by, e.g., a call to IModelConnection.Categories.getSubCategoryInfo.
|
|
83556
|
+
* @returns true if the visibility of any subcategory was modified.
|
|
83557
|
+
* @see [[enableAllLoadedSubCategories]]
|
|
83558
|
+
* @internal
|
|
83559
|
+
*/
|
|
83560
|
+
setSubCategoryVisible(subCategoryId, visible) {
|
|
83561
|
+
const app = this.iModel.subcategories.getSubCategoryAppearance(subCategoryId);
|
|
83562
|
+
if (undefined === app)
|
|
83563
|
+
return false; // category not enabled or subcategory not found
|
|
83564
|
+
const curOvr = this.getSubCategoryOverride(subCategoryId);
|
|
83565
|
+
const isAlreadyVisible = undefined !== curOvr && undefined !== curOvr.invisible ? !curOvr.invisible : !app.invisible;
|
|
83566
|
+
if (isAlreadyVisible === visible)
|
|
83567
|
+
return false;
|
|
83568
|
+
// Preserve existing overrides - just flip the visibility flag.
|
|
83569
|
+
const json = undefined !== curOvr ? curOvr.toJSON() : {};
|
|
83570
|
+
json.invisible = !visible;
|
|
83571
|
+
this.overrideSubCategory(subCategoryId, _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.SubCategoryOverride.fromJSON(json));
|
|
83572
|
+
return true;
|
|
83573
|
+
}
|
|
83468
83574
|
/** Returns true if solar shadow display is enabled by this display style. */
|
|
83469
83575
|
get wantShadows() {
|
|
83470
83576
|
return this.is3d() && this.viewFlags.shadows && false !== _IModelApp__WEBPACK_IMPORTED_MODULE_7__.IModelApp.renderSystem.options.displaySolarShadows;
|
|
@@ -87168,9 +87274,7 @@ class IModelApp {
|
|
|
87168
87274
|
static get quantityFormatter() { return this._quantityFormatter; }
|
|
87169
87275
|
/** The [[ToolAdmin]] for this session. */
|
|
87170
87276
|
static get toolAdmin() { return this._toolAdmin; }
|
|
87171
|
-
/** The [[AccuDraw]] for this session.
|
|
87172
|
-
* @internal
|
|
87173
|
-
*/
|
|
87277
|
+
/** The [[AccuDraw]] for this session. */
|
|
87174
87278
|
static get accuDraw() { return this._accuDraw; }
|
|
87175
87279
|
/** The [[AccuSnap]] for this session. */
|
|
87176
87280
|
static get accuSnap() { return this._accuSnap; }
|
|
@@ -93886,6 +93990,9 @@ class SubCategoriesCache {
|
|
|
93886
93990
|
if (undefined === this._byCategoryId.get(id))
|
|
93887
93991
|
this._byCategoryId.set(id, invalidCategoryIdEntry);
|
|
93888
93992
|
}
|
|
93993
|
+
/** Exposed strictly for tests.
|
|
93994
|
+
* @internal
|
|
93995
|
+
*/
|
|
93889
93996
|
add(categoryId, subCategoryId, appearance) {
|
|
93890
93997
|
let set = this._byCategoryId.get(categoryId);
|
|
93891
93998
|
if (undefined === set)
|
|
@@ -94633,6 +94740,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
94633
94740
|
|
|
94634
94741
|
/** Provides context for producing [[RenderGraphic]]s for drawing within a [[Viewport]].
|
|
94635
94742
|
* @public
|
|
94743
|
+
* @extensions
|
|
94636
94744
|
*/
|
|
94637
94745
|
class RenderContext {
|
|
94638
94746
|
constructor(vp, frustum) {
|
|
@@ -94710,6 +94818,7 @@ class DynamicsContext extends RenderContext {
|
|
|
94710
94818
|
}
|
|
94711
94819
|
/** Provides context for a [[ViewportDecorator]] to add [[Decorations]] to be rendered within a [[Viewport]].
|
|
94712
94820
|
* @public
|
|
94821
|
+
* @extensions
|
|
94713
94822
|
*/
|
|
94714
94823
|
class DecorateContext extends RenderContext {
|
|
94715
94824
|
/** The [[ScreenViewport]] in which this context's [[Decorations]] will be drawn. */
|
|
@@ -95365,6 +95474,8 @@ class ViewCreator3d {
|
|
|
95365
95474
|
}
|
|
95366
95475
|
if (options?.standardViewId)
|
|
95367
95476
|
viewState.setStandardRotation(options.standardViewId);
|
|
95477
|
+
if (options?.allSubCategoriesVisible)
|
|
95478
|
+
viewState.displayStyle.enableAllLoadedSubCategories(viewState.categorySelector.categories);
|
|
95368
95479
|
const range = viewState.computeFitRange();
|
|
95369
95480
|
viewState.lookAtVolume(range, options?.vpAspect);
|
|
95370
95481
|
return viewState;
|
|
@@ -98933,6 +99044,7 @@ const ELEMENT_MARKED_FOR_REMOVAL = Symbol.for("@bentley/imodeljs/Viewport/__elem
|
|
|
98933
99044
|
*
|
|
98934
99045
|
* @see [[ViewManager]]
|
|
98935
99046
|
* @public
|
|
99047
|
+
* @extensions
|
|
98936
99048
|
*/
|
|
98937
99049
|
class Viewport {
|
|
98938
99050
|
/** @internal */
|
|
@@ -99257,13 +99369,8 @@ class Viewport {
|
|
|
99257
99369
|
});
|
|
99258
99370
|
}
|
|
99259
99371
|
enableAllSubCategories(categoryIds) {
|
|
99260
|
-
|
|
99261
|
-
|
|
99262
|
-
if (undefined !== subCategoryIds) {
|
|
99263
|
-
for (const subCategoryId of subCategoryIds)
|
|
99264
|
-
this.changeSubCategoryDisplay(subCategoryId, true);
|
|
99265
|
-
}
|
|
99266
|
-
}
|
|
99372
|
+
if (this.displayStyle.enableAllLoadedSubCategories(categoryIds))
|
|
99373
|
+
this.maybeInvalidateScene();
|
|
99267
99374
|
}
|
|
99268
99375
|
/** @internal */
|
|
99269
99376
|
getSubCategories(categoryId) { return this.iModel.subcategories.getSubCategories(categoryId); }
|
|
@@ -99272,18 +99379,8 @@ class Viewport {
|
|
|
99272
99379
|
* @param display: True to make geometry belonging to the subcategory visible within this viewport, false to make it invisible.
|
|
99273
99380
|
*/
|
|
99274
99381
|
changeSubCategoryDisplay(subCategoryId, display) {
|
|
99275
|
-
|
|
99276
|
-
|
|
99277
|
-
return; // category not enabled or subcategory not found
|
|
99278
|
-
const curOvr = this.getSubCategoryOverride(subCategoryId);
|
|
99279
|
-
const isAlreadyVisible = undefined !== curOvr && undefined !== curOvr.invisible ? !curOvr.invisible : !app.invisible;
|
|
99280
|
-
if (isAlreadyVisible === display)
|
|
99281
|
-
return;
|
|
99282
|
-
// Preserve existing overrides - just flip the visibility flag.
|
|
99283
|
-
const json = undefined !== curOvr ? curOvr.toJSON() : {};
|
|
99284
|
-
json.invisible = !display;
|
|
99285
|
-
this.overrideSubCategory(subCategoryId, _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.SubCategoryOverride.fromJSON(json)); // will set the ChangeFlag appropriately
|
|
99286
|
-
this.maybeInvalidateScene();
|
|
99382
|
+
if (this.displayStyle.setSubCategoryVisible(subCategoryId, display))
|
|
99383
|
+
this.maybeInvalidateScene();
|
|
99287
99384
|
}
|
|
99288
99385
|
/** The settings controlling how a background map is displayed within a view.
|
|
99289
99386
|
* @see [[ViewFlags.backgroundMap]] for toggling display of the map on or off.
|
|
@@ -101127,6 +101224,7 @@ Viewport.undoDelay = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BeDuration
|
|
|
101127
101224
|
* 5b. Otherwise, it is disposed of by invoking its dispose() method directly.
|
|
101128
101225
|
* ```
|
|
101129
101226
|
* @public
|
|
101227
|
+
* @extensions
|
|
101130
101228
|
*/
|
|
101131
101229
|
class ScreenViewport extends Viewport {
|
|
101132
101230
|
/** Create a new ScreenViewport that shows a View of an iModel into an HTMLDivElement. This method will create a new HTMLCanvasElement as a child of the supplied parentDiv.
|
|
@@ -101750,6 +101848,7 @@ function _clear2dCanvas(canvas) {
|
|
|
101750
101848
|
* Offscreen viewports can be useful for, e.g., producing an image from the contents of a view (see [[Viewport.readImageBuffer]] and [[Viewport.readImageToCanvas]])
|
|
101751
101849
|
* without drawing to the screen.
|
|
101752
101850
|
* @public
|
|
101851
|
+
* @extensions
|
|
101753
101852
|
*/
|
|
101754
101853
|
class OffScreenViewport extends Viewport {
|
|
101755
101854
|
constructor() {
|
|
@@ -103179,6 +103278,7 @@ const extensionExports = {
|
|
|
103179
103278
|
CoordSource: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.CoordSource,
|
|
103180
103279
|
CoordSystem: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.CoordSystem,
|
|
103181
103280
|
CoordinateLockOverrides: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.CoordinateLockOverrides,
|
|
103281
|
+
DecorateContext: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.DecorateContext,
|
|
103182
103282
|
Decorations: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.Decorations,
|
|
103183
103283
|
DisclosedTileTreeSet: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.DisclosedTileTreeSet,
|
|
103184
103284
|
DisplayStyle2dState: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.DisplayStyle2dState,
|
|
@@ -103258,6 +103358,7 @@ const extensionExports = {
|
|
|
103258
103358
|
NotificationManager: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.NotificationManager,
|
|
103259
103359
|
NotifyMessageDetails: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.NotifyMessageDetails,
|
|
103260
103360
|
Npc: _itwin_core_common__WEBPACK_IMPORTED_MODULE_3__.Npc,
|
|
103361
|
+
OffScreenViewport: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.OffScreenViewport,
|
|
103261
103362
|
OrthographicViewState: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.OrthographicViewState,
|
|
103262
103363
|
OutputMessageAlert: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.OutputMessageAlert,
|
|
103263
103364
|
OutputMessagePriority: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.OutputMessagePriority,
|
|
@@ -103283,11 +103384,13 @@ const extensionExports = {
|
|
|
103283
103384
|
QueryRowFormat: _itwin_core_common__WEBPACK_IMPORTED_MODULE_3__.QueryRowFormat,
|
|
103284
103385
|
Rank: _itwin_core_common__WEBPACK_IMPORTED_MODULE_3__.Rank,
|
|
103285
103386
|
RenderClipVolume: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.RenderClipVolume,
|
|
103387
|
+
RenderContext: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.RenderContext,
|
|
103286
103388
|
RenderGraphic: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.RenderGraphic,
|
|
103287
103389
|
RenderGraphicOwner: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.RenderGraphicOwner,
|
|
103288
103390
|
RenderMode: _itwin_core_common__WEBPACK_IMPORTED_MODULE_3__.RenderMode,
|
|
103289
103391
|
RenderSystem: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.RenderSystem,
|
|
103290
103392
|
Scene: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.Scene,
|
|
103393
|
+
ScreenViewport: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.ScreenViewport,
|
|
103291
103394
|
SectionDrawingModelState: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.SectionDrawingModelState,
|
|
103292
103395
|
SectionType: _itwin_core_common__WEBPACK_IMPORTED_MODULE_3__.SectionType,
|
|
103293
103396
|
SelectionMethod: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.SelectionMethod,
|
|
@@ -103365,6 +103468,7 @@ const extensionExports = {
|
|
|
103365
103468
|
ViewStatus: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.ViewStatus,
|
|
103366
103469
|
ViewTool: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.ViewTool,
|
|
103367
103470
|
ViewingSpace: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.ViewingSpace,
|
|
103471
|
+
Viewport: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.Viewport,
|
|
103368
103472
|
canvasToImageBuffer: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.canvasToImageBuffer,
|
|
103369
103473
|
canvasToResizedCanvasWithBars: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.canvasToResizedCanvasWithBars,
|
|
103370
103474
|
connectViewportFrusta: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.connectViewportFrusta,
|
|
@@ -103381,6 +103485,7 @@ const extensionExports = {
|
|
|
103381
103485
|
imageElementFromUrl: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.imageElementFromUrl,
|
|
103382
103486
|
queryTerrainElevationOffset: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.queryTerrainElevationOffset,
|
|
103383
103487
|
readElementGraphics: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.readElementGraphics,
|
|
103488
|
+
readGltfGraphics: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.readGltfGraphics,
|
|
103384
103489
|
synchronizeViewportFrusta: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.synchronizeViewportFrusta,
|
|
103385
103490
|
synchronizeViewportViews: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.synchronizeViewportViews,
|
|
103386
103491
|
};
|
|
@@ -142830,6 +142935,7 @@ class GltfReader {
|
|
|
142830
142935
|
* @see [Example decorator]($docs/learning/frontend/ViewDecorations#gltf-decorations) for an example of a decorator that reads and displays a glTF asset.
|
|
142831
142936
|
* @see [[readGltf]] to obtain more information about the glTF model.
|
|
142832
142937
|
* @public
|
|
142938
|
+
* @extensions
|
|
142833
142939
|
*/
|
|
142834
142940
|
async function readGltfGraphics(args) {
|
|
142835
142941
|
const result = await readGltf(args);
|
|
@@ -289069,7 +289175,7 @@ module.exports = JSON.parse('{"name":"axios","version":"0.21.4","description":"P
|
|
|
289069
289175
|
/***/ ((module) => {
|
|
289070
289176
|
|
|
289071
289177
|
"use strict";
|
|
289072
|
-
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.0.0-dev.
|
|
289178
|
+
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.0.0-dev.66","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.66","@itwin/core-bentley":"workspace:^4.0.0-dev.66","@itwin/core-common":"workspace:^4.0.0-dev.66","@itwin/core-geometry":"workspace:^4.0.0-dev.66","@itwin/core-orbitgt":"workspace:^4.0.0-dev.66","@itwin/core-quantity":"workspace:^4.0.0-dev.66"},"//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.32","@itwin/webgl-compatibility":"workspace:*","@types/chai":"4.3.1","@types/chai-as-promised":"^7","@types/deep-assign":"^0.1.0","@types/mocha":"^8.2.2","@types/node":"^18.11.5","@types/qs":"^6.5.0","@types/semver":"7.3.10","@types/superagent":"^4.1.14","@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":"^7.11.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","deep-assign":"^2.0.0","fuse.js":"^3.3.0","qs":"^6.5.3","semver":"^7.3.5","superagent":"^7.1.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"}}]}}');
|
|
289073
289179
|
|
|
289074
289180
|
/***/ })
|
|
289075
289181
|
|