@itwin/rpcinterface-full-stack-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 +167 -61
- 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 +17 -17
|
@@ -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":""}
|
|
@@ -37390,11 +37390,18 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
37390
37390
|
/* harmony export */ "Tracing": () => (/* binding */ Tracing)
|
|
37391
37391
|
/* harmony export */ });
|
|
37392
37392
|
/* harmony import */ var _Logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Logger */ "../../core/bentley/lib/esm/Logger.js");
|
|
37393
|
+
/*---------------------------------------------------------------------------------------------
|
|
37394
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
37395
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
37396
|
+
*--------------------------------------------------------------------------------------------*/
|
|
37397
|
+
/** @packageDocumentation
|
|
37398
|
+
* @module Logging
|
|
37399
|
+
*/
|
|
37393
37400
|
|
|
37394
37401
|
// re-export so that consumers can construct full SpanOptions object without external dependencies
|
|
37395
37402
|
/**
|
|
37396
|
-
* Mirrors the SpanKind enum from [@opentelemetry/api](https://open-telemetry.github.io/opentelemetry-js
|
|
37397
|
-
* @
|
|
37403
|
+
* Mirrors the SpanKind enum from [@opentelemetry/api](https://open-telemetry.github.io/opentelemetry-js/enums/_opentelemetry_api.SpanKind.html)
|
|
37404
|
+
* @public
|
|
37398
37405
|
*/
|
|
37399
37406
|
var SpanKind;
|
|
37400
37407
|
(function (SpanKind) {
|
|
@@ -37452,7 +37459,7 @@ function flattenObject(obj) {
|
|
|
37452
37459
|
}
|
|
37453
37460
|
/**
|
|
37454
37461
|
* Enables OpenTelemetry tracing in addition to traditional logging.
|
|
37455
|
-
* @
|
|
37462
|
+
* @public
|
|
37456
37463
|
*/
|
|
37457
37464
|
class Tracing {
|
|
37458
37465
|
/**
|
|
@@ -37486,7 +37493,7 @@ class Tracing {
|
|
|
37486
37493
|
}
|
|
37487
37494
|
/**
|
|
37488
37495
|
* Enable logging to OpenTelemetry. [[Tracing.withSpan]] will be enabled, all log entries will be attached to active span as span events.
|
|
37489
|
-
* [
|
|
37496
|
+
* [IModelHost.startup]($backend) will call this automatically if the `enableOpenTelemetry` option is enabled and it succeeds in requiring `@opentelemetry/api`.
|
|
37490
37497
|
* @note Node.js OpenTelemetry SDK should be initialized by the user.
|
|
37491
37498
|
*/
|
|
37492
37499
|
static enableOpenTelemetry(tracer, api) {
|
|
@@ -37507,7 +37514,7 @@ class Tracing {
|
|
|
37507
37514
|
};
|
|
37508
37515
|
}
|
|
37509
37516
|
/** Set attributes on currently active openTelemetry span. Doesn't do anything if openTelemetry logging is not initialized.
|
|
37510
|
-
* @param attributes
|
|
37517
|
+
* @param attributes The attributes to set
|
|
37511
37518
|
*/
|
|
37512
37519
|
static setAttributes(attributes) {
|
|
37513
37520
|
Tracing._openTelemetry?.trace.getSpan(Tracing._openTelemetry.context.active())?.setAttributes(attributes);
|
|
@@ -61954,27 +61961,63 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
61954
61961
|
* @module Geometry
|
|
61955
61962
|
*/
|
|
61956
61963
|
|
|
61964
|
+
/*
|
|
61965
|
+
The following visualizes the contents of frustum.points, which is sent to computeFrustumPlanes().
|
|
61966
|
+
The below numbers are the indices into that array.
|
|
61967
|
+
|
|
61968
|
+
2----------3
|
|
61969
|
+
/| /|
|
|
61970
|
+
/ 0--------/-1
|
|
61971
|
+
6----------7 /
|
|
61972
|
+
| / | /
|
|
61973
|
+
|/ |/
|
|
61974
|
+
4__________5
|
|
61975
|
+
|
|
61976
|
+
0 = left bottom rear
|
|
61977
|
+
1 = right bottom rear
|
|
61978
|
+
2 = left top right
|
|
61979
|
+
3 = right top rear
|
|
61980
|
+
4 = left bottom front
|
|
61981
|
+
5 = right bottom front
|
|
61982
|
+
6 = left top front
|
|
61983
|
+
7 = right top front
|
|
61984
|
+
*/
|
|
61985
|
+
// Ordering of sub-arrays is: [origin, a, b]
|
|
61957
61986
|
const planePointIndices = [
|
|
61958
|
-
[1,
|
|
61959
|
-
[0,
|
|
61960
|
-
[2,
|
|
61961
|
-
[0,
|
|
61962
|
-
[0,
|
|
61963
|
-
|
|
61987
|
+
[1, 5, 3],
|
|
61988
|
+
[0, 2, 4],
|
|
61989
|
+
[2, 3, 6],
|
|
61990
|
+
[0, 4, 1],
|
|
61991
|
+
[0, 1, 2], // back
|
|
61992
|
+
// Skip front plane because it can be too small. Instead derive it from back plane.
|
|
61993
|
+
// Otherwise, it would be: [4, 6, 5]
|
|
61964
61994
|
];
|
|
61965
61995
|
function computeFrustumPlanes(frustum) {
|
|
61966
61996
|
const planes = [];
|
|
61967
61997
|
const points = frustum.points;
|
|
61968
61998
|
const expandPlaneDistance = 1e-6;
|
|
61999
|
+
let normal;
|
|
61969
62000
|
for (const indices of planePointIndices) {
|
|
61970
62001
|
const i0 = indices[0], i1 = indices[1], i2 = indices[2];
|
|
61971
|
-
|
|
62002
|
+
normal = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.Vector3d.createCrossProductToPoints(points[i0], points[i1], points[i2]);
|
|
61972
62003
|
normal.normalizeInPlace();
|
|
61973
62004
|
const plane = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.ClipPlane.createNormalAndDistance(normal, normal.dotProduct(points[i0]) - expandPlaneDistance);
|
|
61974
62005
|
if (!plane)
|
|
61975
62006
|
return [];
|
|
61976
62007
|
planes.push(plane);
|
|
61977
62008
|
}
|
|
62009
|
+
// 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.
|
|
62010
|
+
// The back plane was the last plane processed above, so we can just consult the current value of `normal`.
|
|
62011
|
+
if (undefined !== normal) {
|
|
62012
|
+
normal.negate(normal); // negate the back plane
|
|
62013
|
+
// NB: Below, we make sure we calculate the distance based on a point on the front rect, not the rear rect!
|
|
62014
|
+
const plane = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.ClipPlane.createNormalAndDistance(normal, normal.dotProduct(points[4]) - expandPlaneDistance);
|
|
62015
|
+
if (!plane)
|
|
62016
|
+
return [];
|
|
62017
|
+
planes.push(plane);
|
|
62018
|
+
}
|
|
62019
|
+
else
|
|
62020
|
+
return [];
|
|
61978
62021
|
return planes;
|
|
61979
62022
|
}
|
|
61980
62023
|
// Scratch variable used by FrustumPlanes.computeContainment.
|
|
@@ -61990,6 +62033,7 @@ class FrustumPlanes {
|
|
|
61990
62033
|
}
|
|
61991
62034
|
/** Compute the six planes of the specified frustum.
|
|
61992
62035
|
* If the frustum is degenerate - that is, its points do not represent a truncated pyramid - then the returned `FrustumPlanes` will contain zero planes.
|
|
62036
|
+
* @note This method assumes that the front plane is parallel to the back plane.
|
|
61993
62037
|
* @see [[isValid]] to test this condition.
|
|
61994
62038
|
*/
|
|
61995
62039
|
static fromFrustum(frustum) {
|
|
@@ -62016,6 +62060,7 @@ class FrustumPlanes {
|
|
|
62016
62060
|
}
|
|
62017
62061
|
/** Recompute the planes from the specified frustum.
|
|
62018
62062
|
* @returns true upon success, or false if the input frustum was degenerate, in which case [[isValid]] will be `false`.
|
|
62063
|
+
* @note This method assumes that the front plane is parallel to the back plane.
|
|
62019
62064
|
*/
|
|
62020
62065
|
init(frustum) {
|
|
62021
62066
|
this._planes = computeFrustumPlanes(frustum);
|
|
@@ -79285,20 +79330,32 @@ var AccuDrawFlags;
|
|
|
79285
79330
|
AccuDrawFlags[AccuDrawFlags["UpdateRotation"] = 8388608] = "UpdateRotation";
|
|
79286
79331
|
AccuDrawFlags[AccuDrawFlags["SmartRotation"] = 16777216] = "SmartRotation";
|
|
79287
79332
|
})(AccuDrawFlags || (AccuDrawFlags = {}));
|
|
79288
|
-
/**
|
|
79333
|
+
/** AccuDraw coordinate input mode
|
|
79334
|
+
* @public
|
|
79335
|
+
*/
|
|
79289
79336
|
var CompassMode;
|
|
79290
79337
|
(function (CompassMode) {
|
|
79338
|
+
/** Coordinate input using distance and angle */
|
|
79291
79339
|
CompassMode[CompassMode["Polar"] = 0] = "Polar";
|
|
79340
|
+
/** Coordinate input using x, y, and z deltas */
|
|
79292
79341
|
CompassMode[CompassMode["Rectangular"] = 1] = "Rectangular";
|
|
79293
79342
|
})(CompassMode || (CompassMode = {}));
|
|
79294
|
-
/**
|
|
79343
|
+
/** AccuDraw compass base rotation
|
|
79344
|
+
* @public
|
|
79345
|
+
*/
|
|
79295
79346
|
var RotationMode;
|
|
79296
79347
|
(function (RotationMode) {
|
|
79348
|
+
/** Aligned with standard view top or ACS top when [[ToolAdmin.acsContextLock]] is enabled */
|
|
79297
79349
|
RotationMode[RotationMode["Top"] = 1] = "Top";
|
|
79350
|
+
/** Aligned with standard view front or ACS front when [[ToolAdmin.acsContextLock]] is enabled */
|
|
79298
79351
|
RotationMode[RotationMode["Front"] = 2] = "Front";
|
|
79352
|
+
/** Aligned with standard view right or ACS right when [[ToolAdmin.acsContextLock]] is enabled */
|
|
79299
79353
|
RotationMode[RotationMode["Side"] = 3] = "Side";
|
|
79354
|
+
/** Aligned with view */
|
|
79300
79355
|
RotationMode[RotationMode["View"] = 4] = "View";
|
|
79356
|
+
/** Aligned with view ACS */
|
|
79301
79357
|
RotationMode[RotationMode["ACS"] = 5] = "ACS";
|
|
79358
|
+
/** Not aligned with a standard rotation or ACS */
|
|
79302
79359
|
RotationMode[RotationMode["Context"] = 6] = "Context";
|
|
79303
79360
|
})(RotationMode || (RotationMode = {}));
|
|
79304
79361
|
/** @internal */
|
|
@@ -79312,12 +79369,18 @@ var LockedStates;
|
|
|
79312
79369
|
LockedStates[LockedStates["XY_BM"] = 3] = "XY_BM";
|
|
79313
79370
|
LockedStates[LockedStates["ANGLE_BM"] = 7] = "ANGLE_BM";
|
|
79314
79371
|
})(LockedStates || (LockedStates = {}));
|
|
79315
|
-
/**
|
|
79372
|
+
/** AccuDraw enabled states
|
|
79373
|
+
* @public
|
|
79374
|
+
*/
|
|
79316
79375
|
var CurrentState;
|
|
79317
79376
|
(function (CurrentState) {
|
|
79377
|
+
/** Compass disabled/unwanted for this session */
|
|
79318
79378
|
CurrentState[CurrentState["NotEnabled"] = 0] = "NotEnabled";
|
|
79379
|
+
/** Compass deactivated but CAN be activated by user */
|
|
79319
79380
|
CurrentState[CurrentState["Deactivated"] = 1] = "Deactivated";
|
|
79381
|
+
/** Compass not displayed awaiting automatic activation (default tool state) */
|
|
79320
79382
|
CurrentState[CurrentState["Inactive"] = 2] = "Inactive";
|
|
79383
|
+
/** Compass displayed and adjusting points */
|
|
79321
79384
|
CurrentState[CurrentState["Active"] = 3] = "Active";
|
|
79322
79385
|
})(CurrentState || (CurrentState = {}));
|
|
79323
79386
|
/** @internal */
|
|
@@ -79330,13 +79393,20 @@ var ContextMode;
|
|
|
79330
79393
|
ContextMode[ContextMode["XAxis2"] = 4] = "XAxis2";
|
|
79331
79394
|
ContextMode[ContextMode["None"] = 15] = "None";
|
|
79332
79395
|
})(ContextMode || (ContextMode = {}));
|
|
79333
|
-
/**
|
|
79396
|
+
/** AccuDraw coordinate input fields
|
|
79397
|
+
* @public
|
|
79398
|
+
*/
|
|
79334
79399
|
var ItemField;
|
|
79335
79400
|
(function (ItemField) {
|
|
79401
|
+
/** Distance for polar mode */
|
|
79336
79402
|
ItemField[ItemField["DIST_Item"] = 0] = "DIST_Item";
|
|
79403
|
+
/** Angle for polar mode */
|
|
79337
79404
|
ItemField[ItemField["ANGLE_Item"] = 1] = "ANGLE_Item";
|
|
79405
|
+
/** X delta for rectangular mode */
|
|
79338
79406
|
ItemField[ItemField["X_Item"] = 2] = "X_Item";
|
|
79407
|
+
/** Y delta for rectangular mode */
|
|
79339
79408
|
ItemField[ItemField["Y_Item"] = 3] = "Y_Item";
|
|
79409
|
+
/** Z delta (3d only) */
|
|
79340
79410
|
ItemField[ItemField["Z_Item"] = 4] = "Z_Item";
|
|
79341
79411
|
})(ItemField || (ItemField = {}));
|
|
79342
79412
|
/** @internal */
|
|
@@ -79448,15 +79518,16 @@ class ThreeAxes {
|
|
|
79448
79518
|
equals(other) { return this.x.isExactEqual(other.x) && this.y.isExactEqual(other.y) && this.z.isExactEqual(other.z); }
|
|
79449
79519
|
}
|
|
79450
79520
|
/** Accudraw is an aide for entering coordinate data.
|
|
79451
|
-
*
|
|
79521
|
+
* This class is public to allow applications to provide a user interface for AccuDraw, either by implementing their own, or
|
|
79522
|
+
* using the one supplied by the itwin appui package.
|
|
79523
|
+
* @note When writing an [[InteractiveTool]] it is not correct to call methods on AccuDraw directly, tools should instead
|
|
79524
|
+
* provide hints to AccuDraw using [[AccuDrawHintBuilder]].
|
|
79525
|
+
* @public
|
|
79452
79526
|
*/
|
|
79453
79527
|
class AccuDraw {
|
|
79454
79528
|
constructor() {
|
|
79455
|
-
/** @internal */
|
|
79456
79529
|
this.currentState = CurrentState.NotEnabled; // Compass state
|
|
79457
|
-
/** @internal */
|
|
79458
79530
|
this.compassMode = CompassMode.Rectangular; // Compass mode
|
|
79459
|
-
/** @internal */
|
|
79460
79531
|
this.rotationMode = RotationMode.View; // Compass rotation
|
|
79461
79532
|
/** @internal */
|
|
79462
79533
|
this.published = new AccudrawData(); // Staging area for hints
|
|
@@ -79555,13 +79626,11 @@ class AccuDraw {
|
|
|
79555
79626
|
get isDeactivated() { return (CurrentState.Deactivated === this.currentState); }
|
|
79556
79627
|
/** @internal */
|
|
79557
79628
|
setNewFocus(index) { this.newFocus = index; }
|
|
79558
|
-
/**
|
|
79629
|
+
/** Get the current lock state for the supplied input field */
|
|
79559
79630
|
getFieldLock(index) { return this._fieldLocked[index]; }
|
|
79560
79631
|
/** @internal */
|
|
79561
79632
|
getKeyinStatus(index) { return this._keyinStatus[index]; }
|
|
79562
|
-
/** Implement this method to set focus to the AccuDraw UI.
|
|
79563
|
-
* @internal
|
|
79564
|
-
*/
|
|
79633
|
+
/** Implement this method to set focus to the AccuDraw UI. */
|
|
79565
79634
|
grabInputFocus() { }
|
|
79566
79635
|
/** @internal */
|
|
79567
79636
|
activate() {
|
|
@@ -79577,21 +79646,21 @@ class AccuDraw {
|
|
|
79577
79646
|
if (CurrentState.Inactive === this.currentState)
|
|
79578
79647
|
this.currentState = CurrentState.Deactivated;
|
|
79579
79648
|
}
|
|
79580
|
-
/**
|
|
79649
|
+
/** Change current compass input mode to either polar or rectangular */
|
|
79581
79650
|
setCompassMode(mode) {
|
|
79582
79651
|
if (mode === this.compassMode)
|
|
79583
79652
|
return;
|
|
79584
79653
|
this.compassMode = mode;
|
|
79585
79654
|
this.onCompassModeChange();
|
|
79586
79655
|
}
|
|
79587
|
-
/**
|
|
79656
|
+
/** Change current compass orientation */
|
|
79588
79657
|
setRotationMode(mode) {
|
|
79589
79658
|
if (mode === this.rotationMode)
|
|
79590
79659
|
return;
|
|
79591
79660
|
this.rotationMode = mode;
|
|
79592
79661
|
this.onRotationModeChange();
|
|
79593
79662
|
}
|
|
79594
|
-
/**
|
|
79663
|
+
/** Change the lock status for the supplied input field */
|
|
79595
79664
|
setFieldLock(index, locked) {
|
|
79596
79665
|
if (locked === this._fieldLocked[index])
|
|
79597
79666
|
return;
|
|
@@ -80072,7 +80141,7 @@ class AccuDraw {
|
|
|
80072
80141
|
return this.sendDataPoint(this.point, vp);
|
|
80073
80142
|
}
|
|
80074
80143
|
}
|
|
80075
|
-
/**
|
|
80144
|
+
/** Get the current value for the supplied input field */
|
|
80076
80145
|
getValueByIndex(index) {
|
|
80077
80146
|
switch (index) {
|
|
80078
80147
|
case ItemField.X_Item: return this.delta.x;
|
|
@@ -80084,7 +80153,7 @@ class AccuDraw {
|
|
|
80084
80153
|
return 0.0;
|
|
80085
80154
|
}
|
|
80086
80155
|
}
|
|
80087
|
-
/**
|
|
80156
|
+
/** Set the current value for the supplied input field */
|
|
80088
80157
|
setValueByIndex(index, value) {
|
|
80089
80158
|
switch (index) {
|
|
80090
80159
|
case ItemField.X_Item:
|
|
@@ -80264,7 +80333,7 @@ class AccuDraw {
|
|
|
80264
80333
|
return true;
|
|
80265
80334
|
return (!_IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.toolAdmin.gridLock);
|
|
80266
80335
|
}
|
|
80267
|
-
/**
|
|
80336
|
+
/** Call from an AccuDraw UI event to sync the supplied input field value */
|
|
80268
80337
|
async processFieldInput(index, input, synchText) {
|
|
80269
80338
|
const isBearing = false;
|
|
80270
80339
|
if (_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BentleyStatus.SUCCESS !== this.updateFieldValue(index, input, { isBearing })) {
|
|
@@ -81086,17 +81155,17 @@ class AccuDraw {
|
|
|
81086
81155
|
this.saveCoordinate(ItemField.Z_Item, this.delta.z);
|
|
81087
81156
|
}
|
|
81088
81157
|
}
|
|
81089
|
-
/**
|
|
81158
|
+
/** Called after compass mode is changed between polar and rectangular */
|
|
81090
81159
|
onCompassModeChange() { }
|
|
81091
|
-
/**
|
|
81160
|
+
/** Called after compass rotation is changed */
|
|
81092
81161
|
onRotationModeChange() { }
|
|
81093
|
-
/**
|
|
81162
|
+
/** Called after input field locked state is changed */
|
|
81094
81163
|
onFieldLockChange(_index) { }
|
|
81095
|
-
/**
|
|
81164
|
+
/** Called after input field value changes */
|
|
81096
81165
|
onFieldValueChange(_index) { }
|
|
81097
|
-
/**
|
|
81166
|
+
/** Whether AccuDraw currently has input focus */
|
|
81098
81167
|
get hasInputFocus() { return true; }
|
|
81099
|
-
/**
|
|
81168
|
+
/** Set focus to the specified input field */
|
|
81100
81169
|
setFocusItem(_index) { }
|
|
81101
81170
|
static getMinPolarMag(origin) {
|
|
81102
81171
|
return (1.0e-12 * (1.0 + origin.magnitude()));
|
|
@@ -81633,7 +81702,6 @@ class AccuDraw {
|
|
|
81633
81702
|
/** Implemented by sub-classes to update ui fields to show current deltas or coordinates when inactive.
|
|
81634
81703
|
* Should also choose active x or y input field in rectangular mode based on cursor position when
|
|
81635
81704
|
* axis isn't locked to support "smart lock".
|
|
81636
|
-
* @internal
|
|
81637
81705
|
*/
|
|
81638
81706
|
onMotion(_ev) { }
|
|
81639
81707
|
/** @internal */
|
|
@@ -86052,6 +86120,44 @@ class DisplayStyleState extends _EntityState__WEBPACK_IMPORTED_MODULE_6__.Elemen
|
|
|
86052
86120
|
* @see [[overrideSubCategory]]
|
|
86053
86121
|
*/
|
|
86054
86122
|
getSubCategoryOverride(id) { return this.settings.getSubCategoryOverride(id); }
|
|
86123
|
+
/** For each subcategory belonging to any of the specified categories, make it visible by turning off the "invisible" flag in its subcategory appearance.
|
|
86124
|
+
* This requires that the categories and subcategories have been previously loaded by, e.g., a call to IModelConnection.querySubCategories.
|
|
86125
|
+
* @returns true if the visibility of any subcategory was modified.
|
|
86126
|
+
* @see Viewport.changeCategoryDisplay
|
|
86127
|
+
* @see ViewCreator3dOptions.allSubCategoriesVisible
|
|
86128
|
+
* @internal
|
|
86129
|
+
*/
|
|
86130
|
+
enableAllLoadedSubCategories(categoryIds) {
|
|
86131
|
+
let anyChanged = false;
|
|
86132
|
+
for (const categoryId of _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Id64.iterable(categoryIds)) {
|
|
86133
|
+
const subCategoryIds = this.iModel.subcategories.getSubCategories(categoryId);
|
|
86134
|
+
if (undefined !== subCategoryIds)
|
|
86135
|
+
for (const subCategoryId of subCategoryIds)
|
|
86136
|
+
if (this.setSubCategoryVisible(subCategoryId, true))
|
|
86137
|
+
anyChanged = true;
|
|
86138
|
+
}
|
|
86139
|
+
return anyChanged;
|
|
86140
|
+
}
|
|
86141
|
+
/** Change the "invisible" flag for the given subcategory's appearance.
|
|
86142
|
+
* This requires that the subcategory appearance has been previously loaded by, e.g., a call to IModelConnection.Categories.getSubCategoryInfo.
|
|
86143
|
+
* @returns true if the visibility of any subcategory was modified.
|
|
86144
|
+
* @see [[enableAllLoadedSubCategories]]
|
|
86145
|
+
* @internal
|
|
86146
|
+
*/
|
|
86147
|
+
setSubCategoryVisible(subCategoryId, visible) {
|
|
86148
|
+
const app = this.iModel.subcategories.getSubCategoryAppearance(subCategoryId);
|
|
86149
|
+
if (undefined === app)
|
|
86150
|
+
return false; // category not enabled or subcategory not found
|
|
86151
|
+
const curOvr = this.getSubCategoryOverride(subCategoryId);
|
|
86152
|
+
const isAlreadyVisible = undefined !== curOvr && undefined !== curOvr.invisible ? !curOvr.invisible : !app.invisible;
|
|
86153
|
+
if (isAlreadyVisible === visible)
|
|
86154
|
+
return false;
|
|
86155
|
+
// Preserve existing overrides - just flip the visibility flag.
|
|
86156
|
+
const json = undefined !== curOvr ? curOvr.toJSON() : {};
|
|
86157
|
+
json.invisible = !visible;
|
|
86158
|
+
this.overrideSubCategory(subCategoryId, _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.SubCategoryOverride.fromJSON(json));
|
|
86159
|
+
return true;
|
|
86160
|
+
}
|
|
86055
86161
|
/** Returns true if solar shadow display is enabled by this display style. */
|
|
86056
86162
|
get wantShadows() {
|
|
86057
86163
|
return this.is3d() && this.viewFlags.shadows && false !== _IModelApp__WEBPACK_IMPORTED_MODULE_7__.IModelApp.renderSystem.options.displaySolarShadows;
|
|
@@ -89755,9 +89861,7 @@ class IModelApp {
|
|
|
89755
89861
|
static get quantityFormatter() { return this._quantityFormatter; }
|
|
89756
89862
|
/** The [[ToolAdmin]] for this session. */
|
|
89757
89863
|
static get toolAdmin() { return this._toolAdmin; }
|
|
89758
|
-
/** The [[AccuDraw]] for this session.
|
|
89759
|
-
* @internal
|
|
89760
|
-
*/
|
|
89864
|
+
/** The [[AccuDraw]] for this session. */
|
|
89761
89865
|
static get accuDraw() { return this._accuDraw; }
|
|
89762
89866
|
/** The [[AccuSnap]] for this session. */
|
|
89763
89867
|
static get accuSnap() { return this._accuSnap; }
|
|
@@ -96473,6 +96577,9 @@ class SubCategoriesCache {
|
|
|
96473
96577
|
if (undefined === this._byCategoryId.get(id))
|
|
96474
96578
|
this._byCategoryId.set(id, invalidCategoryIdEntry);
|
|
96475
96579
|
}
|
|
96580
|
+
/** Exposed strictly for tests.
|
|
96581
|
+
* @internal
|
|
96582
|
+
*/
|
|
96476
96583
|
add(categoryId, subCategoryId, appearance) {
|
|
96477
96584
|
let set = this._byCategoryId.get(categoryId);
|
|
96478
96585
|
if (undefined === set)
|
|
@@ -97220,6 +97327,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
97220
97327
|
|
|
97221
97328
|
/** Provides context for producing [[RenderGraphic]]s for drawing within a [[Viewport]].
|
|
97222
97329
|
* @public
|
|
97330
|
+
* @extensions
|
|
97223
97331
|
*/
|
|
97224
97332
|
class RenderContext {
|
|
97225
97333
|
constructor(vp, frustum) {
|
|
@@ -97297,6 +97405,7 @@ class DynamicsContext extends RenderContext {
|
|
|
97297
97405
|
}
|
|
97298
97406
|
/** Provides context for a [[ViewportDecorator]] to add [[Decorations]] to be rendered within a [[Viewport]].
|
|
97299
97407
|
* @public
|
|
97408
|
+
* @extensions
|
|
97300
97409
|
*/
|
|
97301
97410
|
class DecorateContext extends RenderContext {
|
|
97302
97411
|
/** The [[ScreenViewport]] in which this context's [[Decorations]] will be drawn. */
|
|
@@ -97952,6 +98061,8 @@ class ViewCreator3d {
|
|
|
97952
98061
|
}
|
|
97953
98062
|
if (options?.standardViewId)
|
|
97954
98063
|
viewState.setStandardRotation(options.standardViewId);
|
|
98064
|
+
if (options?.allSubCategoriesVisible)
|
|
98065
|
+
viewState.displayStyle.enableAllLoadedSubCategories(viewState.categorySelector.categories);
|
|
97955
98066
|
const range = viewState.computeFitRange();
|
|
97956
98067
|
viewState.lookAtVolume(range, options?.vpAspect);
|
|
97957
98068
|
return viewState;
|
|
@@ -101520,6 +101631,7 @@ const ELEMENT_MARKED_FOR_REMOVAL = Symbol.for("@bentley/imodeljs/Viewport/__elem
|
|
|
101520
101631
|
*
|
|
101521
101632
|
* @see [[ViewManager]]
|
|
101522
101633
|
* @public
|
|
101634
|
+
* @extensions
|
|
101523
101635
|
*/
|
|
101524
101636
|
class Viewport {
|
|
101525
101637
|
/** @internal */
|
|
@@ -101844,13 +101956,8 @@ class Viewport {
|
|
|
101844
101956
|
});
|
|
101845
101957
|
}
|
|
101846
101958
|
enableAllSubCategories(categoryIds) {
|
|
101847
|
-
|
|
101848
|
-
|
|
101849
|
-
if (undefined !== subCategoryIds) {
|
|
101850
|
-
for (const subCategoryId of subCategoryIds)
|
|
101851
|
-
this.changeSubCategoryDisplay(subCategoryId, true);
|
|
101852
|
-
}
|
|
101853
|
-
}
|
|
101959
|
+
if (this.displayStyle.enableAllLoadedSubCategories(categoryIds))
|
|
101960
|
+
this.maybeInvalidateScene();
|
|
101854
101961
|
}
|
|
101855
101962
|
/** @internal */
|
|
101856
101963
|
getSubCategories(categoryId) { return this.iModel.subcategories.getSubCategories(categoryId); }
|
|
@@ -101859,18 +101966,8 @@ class Viewport {
|
|
|
101859
101966
|
* @param display: True to make geometry belonging to the subcategory visible within this viewport, false to make it invisible.
|
|
101860
101967
|
*/
|
|
101861
101968
|
changeSubCategoryDisplay(subCategoryId, display) {
|
|
101862
|
-
|
|
101863
|
-
|
|
101864
|
-
return; // category not enabled or subcategory not found
|
|
101865
|
-
const curOvr = this.getSubCategoryOverride(subCategoryId);
|
|
101866
|
-
const isAlreadyVisible = undefined !== curOvr && undefined !== curOvr.invisible ? !curOvr.invisible : !app.invisible;
|
|
101867
|
-
if (isAlreadyVisible === display)
|
|
101868
|
-
return;
|
|
101869
|
-
// Preserve existing overrides - just flip the visibility flag.
|
|
101870
|
-
const json = undefined !== curOvr ? curOvr.toJSON() : {};
|
|
101871
|
-
json.invisible = !display;
|
|
101872
|
-
this.overrideSubCategory(subCategoryId, _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.SubCategoryOverride.fromJSON(json)); // will set the ChangeFlag appropriately
|
|
101873
|
-
this.maybeInvalidateScene();
|
|
101969
|
+
if (this.displayStyle.setSubCategoryVisible(subCategoryId, display))
|
|
101970
|
+
this.maybeInvalidateScene();
|
|
101874
101971
|
}
|
|
101875
101972
|
/** The settings controlling how a background map is displayed within a view.
|
|
101876
101973
|
* @see [[ViewFlags.backgroundMap]] for toggling display of the map on or off.
|
|
@@ -103714,6 +103811,7 @@ Viewport.undoDelay = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BeDuration
|
|
|
103714
103811
|
* 5b. Otherwise, it is disposed of by invoking its dispose() method directly.
|
|
103715
103812
|
* ```
|
|
103716
103813
|
* @public
|
|
103814
|
+
* @extensions
|
|
103717
103815
|
*/
|
|
103718
103816
|
class ScreenViewport extends Viewport {
|
|
103719
103817
|
/** 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.
|
|
@@ -104337,6 +104435,7 @@ function _clear2dCanvas(canvas) {
|
|
|
104337
104435
|
* Offscreen viewports can be useful for, e.g., producing an image from the contents of a view (see [[Viewport.readImageBuffer]] and [[Viewport.readImageToCanvas]])
|
|
104338
104436
|
* without drawing to the screen.
|
|
104339
104437
|
* @public
|
|
104438
|
+
* @extensions
|
|
104340
104439
|
*/
|
|
104341
104440
|
class OffScreenViewport extends Viewport {
|
|
104342
104441
|
constructor() {
|
|
@@ -105766,6 +105865,7 @@ const extensionExports = {
|
|
|
105766
105865
|
CoordSource: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.CoordSource,
|
|
105767
105866
|
CoordSystem: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.CoordSystem,
|
|
105768
105867
|
CoordinateLockOverrides: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.CoordinateLockOverrides,
|
|
105868
|
+
DecorateContext: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.DecorateContext,
|
|
105769
105869
|
Decorations: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.Decorations,
|
|
105770
105870
|
DisclosedTileTreeSet: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.DisclosedTileTreeSet,
|
|
105771
105871
|
DisplayStyle2dState: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.DisplayStyle2dState,
|
|
@@ -105845,6 +105945,7 @@ const extensionExports = {
|
|
|
105845
105945
|
NotificationManager: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.NotificationManager,
|
|
105846
105946
|
NotifyMessageDetails: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.NotifyMessageDetails,
|
|
105847
105947
|
Npc: _itwin_core_common__WEBPACK_IMPORTED_MODULE_3__.Npc,
|
|
105948
|
+
OffScreenViewport: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.OffScreenViewport,
|
|
105848
105949
|
OrthographicViewState: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.OrthographicViewState,
|
|
105849
105950
|
OutputMessageAlert: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.OutputMessageAlert,
|
|
105850
105951
|
OutputMessagePriority: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.OutputMessagePriority,
|
|
@@ -105870,11 +105971,13 @@ const extensionExports = {
|
|
|
105870
105971
|
QueryRowFormat: _itwin_core_common__WEBPACK_IMPORTED_MODULE_3__.QueryRowFormat,
|
|
105871
105972
|
Rank: _itwin_core_common__WEBPACK_IMPORTED_MODULE_3__.Rank,
|
|
105872
105973
|
RenderClipVolume: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.RenderClipVolume,
|
|
105974
|
+
RenderContext: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.RenderContext,
|
|
105873
105975
|
RenderGraphic: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.RenderGraphic,
|
|
105874
105976
|
RenderGraphicOwner: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.RenderGraphicOwner,
|
|
105875
105977
|
RenderMode: _itwin_core_common__WEBPACK_IMPORTED_MODULE_3__.RenderMode,
|
|
105876
105978
|
RenderSystem: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.RenderSystem,
|
|
105877
105979
|
Scene: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.Scene,
|
|
105980
|
+
ScreenViewport: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.ScreenViewport,
|
|
105878
105981
|
SectionDrawingModelState: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.SectionDrawingModelState,
|
|
105879
105982
|
SectionType: _itwin_core_common__WEBPACK_IMPORTED_MODULE_3__.SectionType,
|
|
105880
105983
|
SelectionMethod: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.SelectionMethod,
|
|
@@ -105952,6 +106055,7 @@ const extensionExports = {
|
|
|
105952
106055
|
ViewStatus: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.ViewStatus,
|
|
105953
106056
|
ViewTool: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.ViewTool,
|
|
105954
106057
|
ViewingSpace: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.ViewingSpace,
|
|
106058
|
+
Viewport: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.Viewport,
|
|
105955
106059
|
canvasToImageBuffer: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.canvasToImageBuffer,
|
|
105956
106060
|
canvasToResizedCanvasWithBars: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.canvasToResizedCanvasWithBars,
|
|
105957
106061
|
connectViewportFrusta: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.connectViewportFrusta,
|
|
@@ -105968,6 +106072,7 @@ const extensionExports = {
|
|
|
105968
106072
|
imageElementFromUrl: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.imageElementFromUrl,
|
|
105969
106073
|
queryTerrainElevationOffset: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.queryTerrainElevationOffset,
|
|
105970
106074
|
readElementGraphics: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.readElementGraphics,
|
|
106075
|
+
readGltfGraphics: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.readGltfGraphics,
|
|
105971
106076
|
synchronizeViewportFrusta: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.synchronizeViewportFrusta,
|
|
105972
106077
|
synchronizeViewportViews: _core_frontend__WEBPACK_IMPORTED_MODULE_2__.synchronizeViewportViews,
|
|
105973
106078
|
};
|
|
@@ -145417,6 +145522,7 @@ class GltfReader {
|
|
|
145417
145522
|
* @see [Example decorator]($docs/learning/frontend/ViewDecorations#gltf-decorations) for an example of a decorator that reads and displays a glTF asset.
|
|
145418
145523
|
* @see [[readGltf]] to obtain more information about the glTF model.
|
|
145419
145524
|
* @public
|
|
145525
|
+
* @extensions
|
|
145420
145526
|
*/
|
|
145421
145527
|
async function readGltfGraphics(args) {
|
|
145422
145528
|
const result = await readGltf(args);
|
|
@@ -281328,7 +281434,7 @@ class TestContext {
|
|
|
281328
281434
|
this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
|
|
281329
281435
|
const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${process.env.IMJS_URL_PREFIX ?? ""}api.bentley.com/imodels` } });
|
|
281330
281436
|
await core_frontend_1.NoRenderApp.startup({
|
|
281331
|
-
applicationVersion: "4.0.0-dev.
|
|
281437
|
+
applicationVersion: "4.0.0-dev.66",
|
|
281332
281438
|
applicationId: this.settings.gprid,
|
|
281333
281439
|
authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.adminUserAccessToken),
|
|
281334
281440
|
hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
|
|
@@ -300901,7 +301007,7 @@ module.exports = JSON.parse('{"name":"axios","version":"0.21.4","description":"P
|
|
|
300901
301007
|
/***/ ((module) => {
|
|
300902
301008
|
|
|
300903
301009
|
"use strict";
|
|
300904
|
-
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.0.0-dev.
|
|
301010
|
+
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"}}]}}');
|
|
300905
301011
|
|
|
300906
301012
|
/***/ }),
|
|
300907
301013
|
|