@itwin/ecschema-rpcinterface-tests 3.5.0-dev.45 → 3.5.0-dev.49
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/_554f.bundled-tests.js.map +1 -1
- package/lib/dist/bundled-tests.js +77 -40
- 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_4_0_node_modules_itwin_obj-3576c6.bundled-tests.js.map +1 -1
- package/lib/dist/vendors-common_temp_node_modules_pnpm_loaders_gl_draco_3_2_10_node_modules_loaders_gl_draco_d-13469a.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 +16 -16
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_554f.bundled-tests.js","mappings":";;;;;;;;AAAA","sources":["file:///ignored|D:\\vsts_a\\
|
|
1
|
+
{"version":3,"file":"_554f.bundled-tests.js","mappings":";;;;;;;;AAAA","sources":["file:///ignored|D:\\vsts_a\\9\\s\\common\\temp\\node_modules\\.pnpm\\@loaders.gl+worker-utils@3.2.10\\node_modules\\@loaders.gl\\worker-utils\\dist\\esm\\lib\\library-utils|../node/require-utils.node"],"names":[],"sourceRoot":""}
|
|
@@ -75266,24 +75266,26 @@ var RenderSchedule;
|
|
|
75266
75266
|
}
|
|
75267
75267
|
}
|
|
75268
75268
|
RenderSchedule.ScriptReference = ScriptReference;
|
|
75269
|
-
/** Used as part of a [[RenderSchedule.ScriptBuilder]] to define a [[RenderSchedule.Timeline]].
|
|
75269
|
+
/** Used as part of a [[RenderSchedule.ScriptBuilder]] to define a [[RenderSchedule.Timeline]]. Functions that append
|
|
75270
|
+
* to the timeline expect entries to be appended in chronological order - i.e., you cannot append an entry that is earlier
|
|
75271
|
+
* than a previously appended entry.
|
|
75270
75272
|
* @see [[RenderSchedule.ElementTimelineBuilder]] and [[RenderSchedule.ModelTimelineBuilder]].
|
|
75271
75273
|
*/
|
|
75272
75274
|
class TimelineBuilder {
|
|
75273
|
-
/** Append a new [[RenderSchedule.VisibilityEntry]] to the timeline. */
|
|
75275
|
+
/** Append a new [[RenderSchedule.VisibilityEntry]] to the timeline. `time` must be more recent than any previously-appended visibility entries. */
|
|
75274
75276
|
addVisibility(time, visibility, interpolation = Interpolation.Linear) {
|
|
75275
75277
|
if (!this.visibility)
|
|
75276
75278
|
this.visibility = [];
|
|
75277
75279
|
this.visibility.push({ time, value: visibility, interpolation });
|
|
75278
75280
|
}
|
|
75279
|
-
/** Append a new [[RenderSchedule.ColorEntry]] to the timeline. */
|
|
75281
|
+
/** Append a new [[RenderSchedule.ColorEntry]] to the timeline. `time` must be more recent than any previously-appended color entries. */
|
|
75280
75282
|
addColor(time, color, interpolation = Interpolation.Linear) {
|
|
75281
75283
|
if (!this.color)
|
|
75282
75284
|
this.color = [];
|
|
75283
75285
|
const value = color instanceof _RgbColor__WEBPACK_IMPORTED_MODULE_2__.RgbColor ? { red: color.r, green: color.g, blue: color.b } : color;
|
|
75284
75286
|
this.color.push({ time, value, interpolation });
|
|
75285
75287
|
}
|
|
75286
|
-
/** Append a new [[RenderSchedule.CuttingPlaneEntry]] to the timeline. */
|
|
75288
|
+
/** Append a new [[RenderSchedule.CuttingPlaneEntry]] to the timeline. `time` must be more recent than any previously-appended cutting plane entries. */
|
|
75287
75289
|
addCuttingPlane(time, plane, interpolation = Interpolation.Linear) {
|
|
75288
75290
|
if (!this.cuttingPlane)
|
|
75289
75291
|
this.cuttingPlane = [];
|
|
@@ -75300,7 +75302,7 @@ var RenderSchedule;
|
|
|
75300
75302
|
}
|
|
75301
75303
|
this.cuttingPlane.push({ time, value, interpolation });
|
|
75302
75304
|
}
|
|
75303
|
-
/** Append a new [[RenderSchedule.TransformEntry]] to the timeline. */
|
|
75305
|
+
/** Append a new [[RenderSchedule.TransformEntry]] to the timeline. `time` must be more recent than any previously-appended transform entries. */
|
|
75304
75306
|
addTransform(time, transform, components, interpolation = Interpolation.Linear) {
|
|
75305
75307
|
if (!this.transform)
|
|
75306
75308
|
this.transform = [];
|
|
@@ -75402,7 +75404,7 @@ var RenderSchedule;
|
|
|
75402
75404
|
}
|
|
75403
75405
|
}
|
|
75404
75406
|
RenderSchedule.ModelTimelineBuilder = ModelTimelineBuilder;
|
|
75405
|
-
/** Assembles the JSON representation for a new [[RenderSchedule.Script]]. As an extremely simple example, the following code produces a script that changes the color of a single element:
|
|
75407
|
+
/** Assembles the JSON representation for a new [[RenderSchedule.Script]]. Ensure that entries on any given element timeline are added chronologically. As an extremely simple example, the following code produces a script that changes the color of a single element:
|
|
75406
75408
|
* ```ts
|
|
75407
75409
|
* const script = new ScriptBuilder();
|
|
75408
75410
|
* const model = script.addModelTimeline("0x123");
|
|
@@ -174278,7 +174280,7 @@ class RealityTile extends _internal__WEBPACK_IMPORTED_MODULE_5__.Tile {
|
|
|
174278
174280
|
}
|
|
174279
174281
|
/** @internal */
|
|
174280
174282
|
useAdditiveRefinementStepchildren() {
|
|
174281
|
-
// Create additive stepchildren only if we are this tile is additive and we are
|
|
174283
|
+
// Create additive stepchildren only if we are this tile is additive and we are re-projecting and the radius exceeds the additiveRefinementThreshold.
|
|
174282
174284
|
// This criteria is currently only met by the Cesium OSM tileset.
|
|
174283
174285
|
const rangeDiagonal = this.rangeCorners ? this.rangeCorners[0].distance(this.rangeCorners[3]) : 0;
|
|
174284
174286
|
return this.additiveRefinement && this.isDisplayable && rangeDiagonal > additiveRefinementThreshold && this.depth < additiveRefinementDepthLimit && this.realityRoot.doReprojectChildren(this);
|
|
@@ -174286,12 +174288,12 @@ class RealityTile extends _internal__WEBPACK_IMPORTED_MODULE_5__.Tile {
|
|
|
174286
174288
|
/** @internal */
|
|
174287
174289
|
_loadChildren(resolve, reject) {
|
|
174288
174290
|
this.realityRoot.loader.loadChildren(this).then((children) => {
|
|
174289
|
-
/* If this is a large tile is to be included additively, but we are
|
|
174291
|
+
/* If this is a large tile is to be included additively, but we are re-projecting (Cesium OSM) then we must add step-children to display the geometry as an overly large
|
|
174290
174292
|
tile cannot be reprojected accurately. */
|
|
174291
174293
|
if (this.useAdditiveRefinementStepchildren())
|
|
174292
174294
|
this.loadAdditiveRefinementChildren((stepChildren) => { children = children ? children === null || children === void 0 ? void 0 : children.concat(stepChildren) : stepChildren; });
|
|
174293
174295
|
if (children)
|
|
174294
|
-
this.realityRoot.reprojectAndResolveChildren(this, children, resolve); /* Potentially
|
|
174296
|
+
this.realityRoot.reprojectAndResolveChildren(this, children, resolve); /* Potentially reproject and resolve these children */
|
|
174295
174297
|
}).catch((err) => {
|
|
174296
174298
|
reject(err);
|
|
174297
174299
|
});
|
|
@@ -175612,6 +175614,11 @@ class Tile {
|
|
|
175612
175614
|
get isNotFound() { return TileLoadStatus.NotFound === this.loadStatus; }
|
|
175613
175615
|
/** True if this tile's content has been loaded and is ready to be drawn. */
|
|
175614
175616
|
get isReady() { return TileLoadStatus.Ready === this.loadStatus; }
|
|
175617
|
+
/** Indicates the tile should not be selected for display because it is out of the range of LODs supported by the tile provider.
|
|
175618
|
+
* @see [[ImageryMapTile.isOutOfLodRange]].
|
|
175619
|
+
* @alpha
|
|
175620
|
+
*/
|
|
175621
|
+
get isOutOfLodRange() { return false; }
|
|
175615
175622
|
/** @public */
|
|
175616
175623
|
setNotFound() {
|
|
175617
175624
|
this._state = 4 /* NotFound */;
|
|
@@ -181387,10 +181394,12 @@ class ImageryMapTile extends _internal__WEBPACK_IMPORTED_MODULE_4__.RealityTile
|
|
|
181387
181394
|
this.quadId = quadId;
|
|
181388
181395
|
this.rectangle = rectangle;
|
|
181389
181396
|
this._mapTileUsageCount = 0;
|
|
181397
|
+
this._outOfLodRange = this.depth < imageryTree.minDepth;
|
|
181390
181398
|
}
|
|
181391
181399
|
get texture() { return this._texture; }
|
|
181392
181400
|
get tilingScheme() { return this.imageryTree.tilingScheme; }
|
|
181393
181401
|
get isDisplayable() { return (this.depth > 1) && super.isDisplayable; }
|
|
181402
|
+
get isOutOfLodRange() { return this._outOfLodRange; }
|
|
181394
181403
|
setContent(content) {
|
|
181395
181404
|
this._texture = content.imageryTexture; // No dispose - textures may be shared by terrain tiles so let garbage collector dispose them.
|
|
181396
181405
|
if (undefined === content.imageryTexture)
|
|
@@ -181400,7 +181409,7 @@ class ImageryMapTile extends _internal__WEBPACK_IMPORTED_MODULE_4__.RealityTile
|
|
|
181400
181409
|
selectCartoDrapeTiles(drapeTiles, rectangleToDrape, drapePixelSize, args) {
|
|
181401
181410
|
// Base draping overlap on width rather than height so that tiling schemes with multiple root nodes overlay correctly.
|
|
181402
181411
|
if (this.isLeaf || (this.rectangle.xLength() / this.maximumSize) < drapePixelSize || this._anyChildNotFound) {
|
|
181403
|
-
if (this.isDisplayable && !this.isNotFound)
|
|
181412
|
+
if (this.isDisplayable && !this.isNotFound && !this.isOutOfLodRange)
|
|
181404
181413
|
drapeTiles.push(this);
|
|
181405
181414
|
return _internal__WEBPACK_IMPORTED_MODULE_4__.TileTreeLoadStatus.Loaded;
|
|
181406
181415
|
}
|
|
@@ -181444,12 +181453,12 @@ class ImageryMapTile extends _internal__WEBPACK_IMPORTED_MODULE_4__.RealityTile
|
|
|
181444
181453
|
// If children depth is lower than min LOD, mark them as disabled.
|
|
181445
181454
|
// This is important: if those tiles are requested and the server refuse to serve them,
|
|
181446
181455
|
// they will be marked as not found and their descendant will never be displayed.
|
|
181447
|
-
const childrenAreDisabled = (this.depth + 1) < imageryTree.minDepth;
|
|
181448
181456
|
childIds.forEach((quadId) => {
|
|
181449
181457
|
const rectangle = imageryTree.tilingScheme.tileXYToRectangle(quadId.column, quadId.row, quadId.level);
|
|
181450
181458
|
const range = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Range3d.createXYZXYZ(rectangle.low.x, rectangle.low.x, 0, rectangle.high.x, rectangle.high.y, 0);
|
|
181451
|
-
const maximumSize =
|
|
181452
|
-
|
|
181459
|
+
const maximumSize = imageryTree.imageryLoader.maximumScreenSize;
|
|
181460
|
+
const tile = new ImageryMapTile({ parent: this, isLeaf: childrenAreLeaves, contentId: quadId.contentId, range, maximumSize }, imageryTree, quadId, rectangle);
|
|
181461
|
+
children.push(tile);
|
|
181453
181462
|
});
|
|
181454
181463
|
resolve(children);
|
|
181455
181464
|
};
|
|
@@ -199841,7 +199850,10 @@ class Geometry {
|
|
|
199841
199850
|
static isSmallMetricDistanceSquared(distanceSquared) {
|
|
199842
199851
|
return Math.abs(distanceSquared) <= Geometry.smallMetricDistanceSquared;
|
|
199843
199852
|
}
|
|
199844
|
-
/**
|
|
199853
|
+
/**
|
|
199854
|
+
* Return `axis modulo 3` with proper handling of negative indices
|
|
199855
|
+
* ..., -3:x, -2:y, -1:z, 0:x, 1:y, 2:z, 3:x, 4:y, 5:z, 6:x, 7:y, 8:z, ...
|
|
199856
|
+
* */
|
|
199845
199857
|
static cyclic3dAxis(axis) {
|
|
199846
199858
|
/* Direct test for the most common cases, avoid modulo */
|
|
199847
199859
|
if (axis >= 0) {
|
|
@@ -238657,7 +238669,10 @@ class Point3d extends XYZ {
|
|
|
238657
238669
|
crossProductToPointsXY(pointA, pointB) {
|
|
238658
238670
|
return _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.crossProductXYXY(pointA.x - this.x, pointA.y - this.y, pointB.x - this.x, pointB.y - this.y);
|
|
238659
238671
|
}
|
|
238660
|
-
/**
|
|
238672
|
+
/**
|
|
238673
|
+
* Return a point interpolated between `this` point and the `other` point.
|
|
238674
|
+
* * fraction specifies where the interpolated point is located on the line passing `this` and `other`.
|
|
238675
|
+
* */
|
|
238661
238676
|
interpolate(fraction, other, result) {
|
|
238662
238677
|
if (fraction <= 0.5)
|
|
238663
238678
|
return Point3d.create(this.x + fraction * (other.x - this.x), this.y + fraction * (other.y - this.y), this.z + fraction * (other.z - this.z), result);
|
|
@@ -239003,8 +239018,18 @@ class Vector3d extends XYZ {
|
|
|
239003
239018
|
this.z *= a;
|
|
239004
239019
|
return true;
|
|
239005
239020
|
}
|
|
239006
|
-
/**
|
|
239021
|
+
/**
|
|
239022
|
+
* Return fractional projection of target vector onto this
|
|
239023
|
+
* * It's returning the signed projection magnitude divided by the target magnitude. In other words,
|
|
239024
|
+
* it's returning the length of the projection as a fraction of the target magnitude.
|
|
239025
|
+
* @param target the target vector
|
|
239026
|
+
* @param defaultFraction the returned value in case magnitude square of target vector is very small
|
|
239027
|
+
* */
|
|
239007
239028
|
fractionOfProjectionToVector(target, defaultFraction = 0) {
|
|
239029
|
+
/*
|
|
239030
|
+
* projection length is (this.target)/||target||
|
|
239031
|
+
* but here we return (this.target)/||target||^2
|
|
239032
|
+
*/
|
|
239008
239033
|
const numerator = this.dotProduct(target);
|
|
239009
239034
|
const denominator = target.magnitudeSquared();
|
|
239010
239035
|
if (denominator < _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.smallMetricDistanceSquared)
|
|
@@ -239247,7 +239272,8 @@ class Vector3d extends XYZ {
|
|
|
239247
239272
|
return true;
|
|
239248
239273
|
}
|
|
239249
239274
|
/**
|
|
239250
|
-
* Compute cross product with `vectorB
|
|
239275
|
+
* Compute cross product with `vectorB`
|
|
239276
|
+
* * cross product vector will have the given length.
|
|
239251
239277
|
* @param vectorB second vector for cross product.
|
|
239252
239278
|
* @param productLength desired length of result vector.
|
|
239253
239279
|
* @param result optional preallocated vector
|
|
@@ -239393,7 +239419,7 @@ class Vector3d extends XYZ {
|
|
|
239393
239419
|
* * The returned angle is always positive and no larger than 180 degrees (PI radians)
|
|
239394
239420
|
* * The returned angle is "in the plane containing the two vectors"
|
|
239395
239421
|
* * Use `planarRadiansTo` and `signedRadiansTo` to take have angle measured in specific plane.
|
|
239396
|
-
* @param vectorB target vector
|
|
239422
|
+
* @param vectorB target vector.
|
|
239397
239423
|
*/
|
|
239398
239424
|
radiansTo(vectorB) {
|
|
239399
239425
|
// ||axb|| = ||a|| ||b|| |sin(t)| and a.b = ||a|| ||b|| cos(t) ==>
|
|
@@ -239405,7 +239431,7 @@ class Vector3d extends XYZ {
|
|
|
239405
239431
|
* * The returned angle is always positive and no larger than 180 degrees (PI radians)
|
|
239406
239432
|
* * The returned angle is "in the plane containing the two vectors"
|
|
239407
239433
|
* * Use `planarAngleTo` and `signedAngleTo` to take have angle measured in specific plane.
|
|
239408
|
-
* @param vectorB target vector
|
|
239434
|
+
* @param vectorB target vector.
|
|
239409
239435
|
*/
|
|
239410
239436
|
angleTo(vectorB) {
|
|
239411
239437
|
return _Angle__WEBPACK_IMPORTED_MODULE_2__.Angle.createRadians(this.radiansTo(vectorB));
|
|
@@ -239425,7 +239451,7 @@ class Vector3d extends XYZ {
|
|
|
239425
239451
|
* * The returned angle can range from negative 180 degrees (negative PI radians) to positive 180
|
|
239426
239452
|
* * degrees (positive PI radians), not closed on the negative side.
|
|
239427
239453
|
* * Use `planarAngleTo` and `signedAngleTo` to take have angle measured in other planes.
|
|
239428
|
-
* @param vectorB target vector
|
|
239454
|
+
* @param vectorB target vector.
|
|
239429
239455
|
*/
|
|
239430
239456
|
angleToXY(vectorB) {
|
|
239431
239457
|
return _Angle__WEBPACK_IMPORTED_MODULE_2__.Angle.createAtan2(this.crossProductXY(vectorB), this.dotProductXY(vectorB));
|
|
@@ -239437,7 +239463,8 @@ class Vector3d extends XYZ {
|
|
|
239437
239463
|
* * The returned angle is "in the plane containing the two vectors"
|
|
239438
239464
|
* * The returned angle has the same sign as vectorW dot product (thisVector cross vectorB)
|
|
239439
239465
|
* * vectorW does not have to be perpendicular to the plane.
|
|
239440
|
-
*
|
|
239466
|
+
* * Use planarRadiansTo to measure the angle between vectors that are projected to another plane.
|
|
239467
|
+
* @param vectorB target vector.
|
|
239441
239468
|
* @param vectorW distinguishes between the sides of the plane.
|
|
239442
239469
|
*/
|
|
239443
239470
|
signedRadiansTo(vectorB, vectorW) {
|
|
@@ -239456,34 +239483,39 @@ class Vector3d extends XYZ {
|
|
|
239456
239483
|
* * The returned angle is "in the plane containing the two vectors"
|
|
239457
239484
|
* * `vectorW` distinguishes between the sides of the plane, but does not have to be perpendicular.
|
|
239458
239485
|
* * The returned angle has the same sign as vectorW dot product (thisVector cross vectorB)
|
|
239459
|
-
*
|
|
239486
|
+
* * Use planarRadiansTo to measure the angle between vectors that are projected to another plane.
|
|
239487
|
+
* @param vectorB target vector.
|
|
239460
239488
|
* @param vectorW distinguishes between the sides of the plane.
|
|
239461
239489
|
*/
|
|
239462
239490
|
signedAngleTo(vectorB, vectorW) {
|
|
239463
239491
|
return _Angle__WEBPACK_IMPORTED_MODULE_2__.Angle.createRadians(this.signedRadiansTo(vectorB, vectorW));
|
|
239464
239492
|
}
|
|
239465
239493
|
/**
|
|
239466
|
-
* Return the
|
|
239494
|
+
* Return the radians (as a simple number, not strongly typed Angle) from this vector to vectorB,
|
|
239495
|
+
* measured between their projections to the plane with the given normal.
|
|
239467
239496
|
* * The returned angle can be positive or negative, with magnitude no larger than PI radians
|
|
239468
|
-
*
|
|
239469
|
-
* @param
|
|
239470
|
-
* @param planeNormal a normal vector to the plane.
|
|
239497
|
+
* @param vectorB target vector
|
|
239498
|
+
* @param planeNormal the normal vector to the plane.
|
|
239471
239499
|
*/
|
|
239472
239500
|
planarRadiansTo(vectorB, planeNormal) {
|
|
239473
239501
|
const square = planeNormal.dotProduct(planeNormal);
|
|
239474
239502
|
if (square === 0.0)
|
|
239475
239503
|
return 0.0;
|
|
239476
239504
|
const factor = 1.0 / square;
|
|
239477
|
-
|
|
239478
|
-
|
|
239479
|
-
|
|
239505
|
+
/*
|
|
239506
|
+
* projection of vector 'v' on normal 'n' is given by vProj = [dot(v,n)/||n||^2]*n
|
|
239507
|
+
* and projection of 'v' on the plane is given by 'v - vProj'
|
|
239508
|
+
*/
|
|
239509
|
+
const thisProj = this.plusScaled(planeNormal, -this.dotProduct(planeNormal) * factor);
|
|
239510
|
+
const vectorBProj = vectorB.plusScaled(planeNormal, -vectorB.dotProduct(planeNormal) * factor);
|
|
239511
|
+
return thisProj.signedRadiansTo(vectorBProj, planeNormal);
|
|
239480
239512
|
}
|
|
239481
239513
|
/**
|
|
239482
|
-
* Return the (as strongly typed Angle)
|
|
239514
|
+
* Return the angle (as strongly typed Angle) from this vector to vectorB,
|
|
239515
|
+
* measured between their projections to the plane with the given normal.
|
|
239483
239516
|
* * The returned angle can range from negative PI to positive PI (not closed on negative side)
|
|
239484
|
-
*
|
|
239485
|
-
* @param
|
|
239486
|
-
* @param planeNormal a normal vector to the plane.
|
|
239517
|
+
* @param vectorB target vector.
|
|
239518
|
+
* @param planeNormal the normal vector to the plane.
|
|
239487
239519
|
*/
|
|
239488
239520
|
planarAngleTo(vectorB, planeNormal) {
|
|
239489
239521
|
return _Angle__WEBPACK_IMPORTED_MODULE_2__.Angle.createRadians(this.planarRadiansTo(vectorB, planeNormal));
|
|
@@ -244154,12 +244186,12 @@ class Ray3d {
|
|
|
244154
244186
|
return pair;
|
|
244155
244187
|
}
|
|
244156
244188
|
/**
|
|
244157
|
-
* Return a ray
|
|
244158
|
-
* scale factor
|
|
244159
|
-
* @param pt1 start point of interpolation
|
|
244189
|
+
* Return a ray with `ray.origin` interpolated between pt1 and pt2 at the given fraction
|
|
244190
|
+
* and `ray.direction` set to the vector from pt1 to pt2 multiplied by the given scale factor.
|
|
244191
|
+
* @param pt1 start point of interpolation.
|
|
244160
244192
|
* @param fraction fractional position between points.
|
|
244161
|
-
* @param pt2 endpoint of interpolation
|
|
244162
|
-
* @param tangentScale scale factor to apply to the startToEnd vector
|
|
244193
|
+
* @param pt2 endpoint of interpolation.
|
|
244194
|
+
* @param tangentScale scale factor to apply to the startToEnd vector.
|
|
244163
244195
|
* @param result optional receiver.
|
|
244164
244196
|
*/
|
|
244165
244197
|
static interpolatePointAndTangent(pt1, fraction, pt2, tangentScale, result) {
|
|
@@ -279795,7 +279827,8 @@ class ITwinLocalization {
|
|
|
279795
279827
|
}
|
|
279796
279828
|
return value;
|
|
279797
279829
|
}
|
|
279798
|
-
/** Similar to `getLocalizedString` but the namespace is a separate
|
|
279830
|
+
/** Similar to `getLocalizedString` but the default namespace is a separate parameter and the key does not need
|
|
279831
|
+
* to include a namespace. If a key includes a namespace, that namespace will be used for interpolating that key.
|
|
279799
279832
|
* @param namespace - the namespace that identifies the particular localization file that contains the property.
|
|
279800
279833
|
* @param key - the key that matches a property in the JSON localization file.
|
|
279801
279834
|
* @returns The string corresponding to the first key that resolves.
|
|
@@ -279825,6 +279858,10 @@ class ITwinLocalization {
|
|
|
279825
279858
|
if ((options === null || options === void 0 ? void 0 : options.returnDetails) || (options === null || options === void 0 ? void 0 : options.returnObjects)) {
|
|
279826
279859
|
throw new Error("Translation key must map to a string, but the given options will result in an object");
|
|
279827
279860
|
}
|
|
279861
|
+
options = {
|
|
279862
|
+
...options,
|
|
279863
|
+
ns: namespace, // ensure namespace argument is used
|
|
279864
|
+
};
|
|
279828
279865
|
const en = this.i18next.getFixedT("en", namespace);
|
|
279829
279866
|
const str = en(key, options);
|
|
279830
279867
|
if (typeof str !== "string")
|
|
@@ -310497,7 +310534,7 @@ module.exports = JSON.parse('{"name":"axios","version":"0.21.4","description":"P
|
|
|
310497
310534
|
/***/ ((module) => {
|
|
310498
310535
|
|
|
310499
310536
|
"use strict";
|
|
310500
|
-
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"3.5.0-dev.
|
|
310537
|
+
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"3.5.0-dev.49","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","build:ci":"npm run -s build && 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 \\"../../tools/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/tree/master/core/frontend"},"keywords":["Bentley","BIM","iModel","digital-twin","iTwin"],"author":{"name":"Bentley Systems, Inc.","url":"http://www.bentley.com"},"peerDependencies":{"@itwin/appui-abstract":"workspace:^3.5.0-dev.49","@itwin/core-bentley":"workspace:^3.5.0-dev.49","@itwin/core-common":"workspace:^3.5.0-dev.49","@itwin/core-geometry":"workspace:^3.5.0-dev.49","@itwin/core-orbitgt":"workspace:^3.5.0-dev.49","@itwin/core-quantity":"workspace:^3.5.0-dev.49","@itwin/webgl-compatibility":"workspace:^3.5.0-dev.49"},"//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":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@types/chai":"4.3.1","@types/chai-as-promised":"^7","@types/deep-assign":"^0.1.0","@types/lodash":"^4.14.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":"~4.4.0","webpack":"^5.64.4"},"//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.4.0","@itwin/cloud-agnostic-core":"~1.4.0","@itwin/object-storage-core":"~1.4.0","@itwin/core-i18n":"workspace:*","@itwin/core-telemetry":"workspace:*","@loaders.gl/core":"^3.1.6","@loaders.gl/draco":"^3.1.6","deep-assign":"^2.0.0","fuse.js":"^3.3.0","lodash":"^4.17.10","qs":"^6.5.1","semver":"^7.3.5","superagent":"7.1.3","wms-capabilities":"0.4.0","xml-js":"~1.6.11","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"}}]}}');
|
|
310501
310538
|
|
|
310502
310539
|
/***/ })
|
|
310503
310540
|
|