@itwin/rpcinterface-full-stack-tests 4.4.0-dev.7 → 4.4.0-dev.9
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/_bea9.bundled-tests.js.map +1 -1
- package/lib/dist/bundled-tests.js +75 -18
- 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/vendors-common_temp_node_modules_pnpm_loaders_gl_draco_3_1_6_node_modules_loaders_gl_draco_di-0642a6.bundled-tests.js.map +1 -1
- package/package.json +14 -14
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_bea9.bundled-tests.js","mappings":";;;;;;;;AAAA","sources":["file:///ignored|D:\\
|
|
1
|
+
{"version":3,"file":"_bea9.bundled-tests.js","mappings":";;;;;;;;AAAA","sources":["file:///ignored|D:\\vsts_b\\10\\s\\common\\temp\\node_modules\\.pnpm\\@loaders.gl+worker-utils@3.1.6\\node_modules\\@loaders.gl\\worker-utils\\dist\\esm\\lib\\library-utils|../node/require-utils.node"],"names":[],"sourceRoot":""}
|
|
@@ -42301,6 +42301,8 @@ class EcefLocation {
|
|
|
42301
42301
|
getTransform() { return this._transform; }
|
|
42302
42302
|
/** Construct a new EcefLocation. Once constructed, it is frozen and cannot be modified. */
|
|
42303
42303
|
constructor(props) {
|
|
42304
|
+
/** The transform from iModel Spatial coordinates to ECEF from this EcefLocation */
|
|
42305
|
+
this._transform = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createIdentity();
|
|
42304
42306
|
this.origin = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Point3d.fromJSON(props.origin).freeze();
|
|
42305
42307
|
this.orientation = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.YawPitchRollAngles.fromJSON(props.orientation).freeze();
|
|
42306
42308
|
if (props.cartographicOrigin)
|
|
@@ -42309,16 +42311,22 @@ class EcefLocation {
|
|
|
42309
42311
|
this.xVector = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Vector3d.fromJSON(props.xVector).freeze();
|
|
42310
42312
|
this.yVector = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Vector3d.fromJSON(props.yVector).freeze();
|
|
42311
42313
|
}
|
|
42312
|
-
|
|
42313
|
-
|
|
42314
|
-
|
|
42315
|
-
|
|
42316
|
-
|
|
42314
|
+
if (props.transform) {
|
|
42315
|
+
this._transform.setFromJSON(props.transform);
|
|
42316
|
+
this._transform.freeze();
|
|
42317
|
+
}
|
|
42318
|
+
else {
|
|
42319
|
+
let matrix;
|
|
42320
|
+
if (this.xVector && this.yVector) {
|
|
42321
|
+
const zVector = this.xVector.crossProduct(this.yVector);
|
|
42322
|
+
if (zVector.normalizeInPlace())
|
|
42323
|
+
matrix = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.createColumns(this.xVector, this.yVector, zVector);
|
|
42324
|
+
}
|
|
42325
|
+
if (!matrix)
|
|
42326
|
+
matrix = this.orientation.toMatrix3d();
|
|
42327
|
+
this._transform = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createOriginAndMatrix(this.origin, matrix);
|
|
42328
|
+
this._transform.freeze();
|
|
42317
42329
|
}
|
|
42318
|
-
if (!matrix)
|
|
42319
|
-
matrix = this.orientation.toMatrix3d();
|
|
42320
|
-
this._transform = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createOriginAndMatrix(this.origin, matrix);
|
|
42321
|
-
this._transform.freeze();
|
|
42322
42330
|
}
|
|
42323
42331
|
/** Returns true if this EcefLocation is not located at the center of the Earth.
|
|
42324
42332
|
* @alpha are locations very close to the center considered valid? What are the specific criteria?
|
|
@@ -42347,6 +42355,14 @@ class EcefLocation {
|
|
|
42347
42355
|
}
|
|
42348
42356
|
return new EcefLocation({ origin: ecefOrigin, orientation: _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.YawPitchRollAngles.createFromMatrix3d(matrix), cartographicOrigin: origin });
|
|
42349
42357
|
}
|
|
42358
|
+
/** Construct ECEF Location from transform with optional position on the earth used to establish the ECEF origin and orientation. */
|
|
42359
|
+
static createFromTransform(transform) {
|
|
42360
|
+
const ecefOrigin = transform.getOrigin();
|
|
42361
|
+
const angleFromInput = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.YawPitchRollAngles.createDegrees(0, 0, 0);
|
|
42362
|
+
const locationOrientationFromInputT = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.YawPitchRollAngles.createFromMatrix3d(transform.getMatrix(), angleFromInput);
|
|
42363
|
+
const transformProps = transform.toJSON();
|
|
42364
|
+
return new EcefLocation({ origin: ecefOrigin, orientation: locationOrientationFromInputT ?? angleFromInput, transform: transformProps });
|
|
42365
|
+
}
|
|
42350
42366
|
/** Get the location center of the earth in the iModel coordinate system. */
|
|
42351
42367
|
get earthCenter() {
|
|
42352
42368
|
const matrix = this.orientation.toMatrix3d();
|
|
@@ -42362,6 +42378,8 @@ class EcefLocation {
|
|
|
42362
42378
|
return false;
|
|
42363
42379
|
if (this.yVector !== undefined && other.yVector !== undefined && !this.yVector.isAlmostEqual(other.yVector))
|
|
42364
42380
|
return false;
|
|
42381
|
+
if (!this.getTransform().isAlmostEqual(other.getTransform()))
|
|
42382
|
+
return false;
|
|
42365
42383
|
const thisCarto = this.cartographicOrigin;
|
|
42366
42384
|
const otherCarto = other.cartographicOrigin;
|
|
42367
42385
|
if (undefined === thisCarto || undefined === otherCarto)
|
|
@@ -42372,6 +42390,7 @@ class EcefLocation {
|
|
|
42372
42390
|
const props = {
|
|
42373
42391
|
origin: this.origin.toJSON(),
|
|
42374
42392
|
orientation: this.orientation.toJSON(),
|
|
42393
|
+
transform: this.getTransform().toJSON(),
|
|
42375
42394
|
};
|
|
42376
42395
|
if (this.cartographicOrigin)
|
|
42377
42396
|
props.cartographicOrigin = this.cartographicOrigin.toJSON();
|
|
@@ -53192,8 +53211,28 @@ var ElementGeometry;
|
|
|
53192
53211
|
return textString.toJSON();
|
|
53193
53212
|
}
|
|
53194
53213
|
ElementGeometry.toTextString = toTextString;
|
|
53214
|
+
/** Returns only the [[TextStringGlyphData]] embedded in the [[TextString]] flatbuffer. This data is only internal to the native display libaries. */
|
|
53215
|
+
function toTextStringGlyphData(entry) {
|
|
53216
|
+
if (ElementGeometryOpcode.TextString !== entry.opcode)
|
|
53217
|
+
return undefined;
|
|
53218
|
+
const buffer = new flatbuffers__WEBPACK_IMPORTED_MODULE_0__.flatbuffers.ByteBuffer(entry.data);
|
|
53219
|
+
const ppfb = _ElementGeometryFB__WEBPACK_IMPORTED_MODULE_3__.EGFBAccessors.TextString.getRootAsTextString(buffer);
|
|
53220
|
+
const glyphOriginToPoint2d = (origin) => {
|
|
53221
|
+
if (!origin)
|
|
53222
|
+
throw new Error("Value cannot be null.");
|
|
53223
|
+
return new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.Point2d(origin.x(), origin.y());
|
|
53224
|
+
};
|
|
53225
|
+
const textStringRangeToRange2d = (r) => r ? new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.Range2d(r.lowx(), r.lowy(), r.highx(), r.highy()) : null;
|
|
53226
|
+
const range = textStringRangeToRange2d(ppfb.range());
|
|
53227
|
+
const glyphIds = Array.from({ length: ppfb.glyphIdsLength() }, (_, i) => ppfb.glyphIds(i) ?? 0);
|
|
53228
|
+
const glyphOrigins = Array.from({ length: ppfb.glyphOriginsLength() }, (_, i) => glyphOriginToPoint2d(ppfb.glyphOrigins(i)));
|
|
53229
|
+
if (!range || range.isNull || glyphIds.length === 0 || glyphOrigins.length === 0)
|
|
53230
|
+
return undefined;
|
|
53231
|
+
return { glyphIds, glyphOrigins, range };
|
|
53232
|
+
}
|
|
53233
|
+
ElementGeometry.toTextStringGlyphData = toTextStringGlyphData;
|
|
53195
53234
|
/** Create entry from a [[TextString]] */
|
|
53196
|
-
function fromTextString(text, worldToLocal) {
|
|
53235
|
+
function fromTextString(text, worldToLocal, glyphs) {
|
|
53197
53236
|
if (undefined !== worldToLocal) {
|
|
53198
53237
|
const localText = new _TextString__WEBPACK_IMPORTED_MODULE_5__.TextString(text);
|
|
53199
53238
|
if (!localText.transformInPlace(worldToLocal))
|
|
@@ -53204,6 +53243,17 @@ var ElementGeometry;
|
|
|
53204
53243
|
const builder = _ElementGeometryFB__WEBPACK_IMPORTED_MODULE_3__.EGFBAccessors.TextString;
|
|
53205
53244
|
const textOffset = fbb.createString(text.text);
|
|
53206
53245
|
const styleOffset = _ElementGeometryFB__WEBPACK_IMPORTED_MODULE_3__.EGFBAccessors.TextStringStyle.createTextStringStyle(fbb, 1, 0, text.font, undefined === text.bold ? false : text.bold, undefined === text.italic ? false : text.italic, undefined === text.underline ? false : text.underline, text.height, undefined === text.widthFactor ? 1.0 : text.widthFactor);
|
|
53246
|
+
const fbbGlyphs = (() => {
|
|
53247
|
+
if (!glyphs || glyphs.range.isNull)
|
|
53248
|
+
return undefined;
|
|
53249
|
+
const glyphIdsOffset = builder.createGlyphIdsVector(fbb, glyphs.glyphIds);
|
|
53250
|
+
builder.startGlyphOriginsVector(fbb, glyphs.glyphOrigins.length);
|
|
53251
|
+
for (const origin of [...glyphs.glyphOrigins].reverse()) {
|
|
53252
|
+
_ElementGeometryFB__WEBPACK_IMPORTED_MODULE_3__.EGFBAccessors.TextStringGlyphOrigin.createTextStringGlyphOrigin(fbb, origin.x, origin.y);
|
|
53253
|
+
}
|
|
53254
|
+
const glyphOriginsOffset = fbb.endVector();
|
|
53255
|
+
return { glyphIdsOffset, glyphOriginsOffset, range: glyphs.range };
|
|
53256
|
+
})();
|
|
53207
53257
|
builder.startTextString(fbb);
|
|
53208
53258
|
builder.addMajorVersion(fbb, 1);
|
|
53209
53259
|
builder.addMinorVersion(fbb, 0);
|
|
@@ -53217,6 +53267,11 @@ var ElementGeometry;
|
|
|
53217
53267
|
const transformOffset = _ElementGeometryFB__WEBPACK_IMPORTED_MODULE_3__.EGFBAccessors.TextStringTransform.createTextStringTransform(fbb, coffs[0], coffs[1], coffs[2], origin.x, coffs[3], coffs[4], coffs[5], origin.y, coffs[6], coffs[7], coffs[8], origin.z);
|
|
53218
53268
|
builder.addTransform(fbb, transformOffset);
|
|
53219
53269
|
}
|
|
53270
|
+
if (fbbGlyphs) {
|
|
53271
|
+
builder.addRange(fbb, _ElementGeometryFB__WEBPACK_IMPORTED_MODULE_3__.EGFBAccessors.TextStringRange.createTextStringRange(fbb, fbbGlyphs.range.low.x, fbbGlyphs.range.low.y, fbbGlyphs.range.high.x, fbbGlyphs.range.high.y));
|
|
53272
|
+
builder.addGlyphIds(fbb, fbbGlyphs.glyphIdsOffset);
|
|
53273
|
+
builder.addGlyphOrigins(fbb, fbbGlyphs.glyphOriginsOffset);
|
|
53274
|
+
}
|
|
53220
53275
|
const mLoc = builder.endTextString(fbb);
|
|
53221
53276
|
fbb.finish(mLoc);
|
|
53222
53277
|
const data = fbb.asUint8Array();
|
|
@@ -150804,14 +150859,16 @@ class ThreeDTileFormatInterpreter {
|
|
|
150804
150859
|
_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.logTrace(loggerCategory, "RealityData NOT Geolocated", () => ({ ...location }));
|
|
150805
150860
|
}
|
|
150806
150861
|
else {
|
|
150807
|
-
let ecefLocation;
|
|
150808
|
-
const locationOrientation = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.YawPitchRollAngles.tryFromTransform(worldToEcefTransform);
|
|
150862
|
+
let ecefLocation = _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.EcefLocation.createFromTransform(worldToEcefTransform);
|
|
150809
150863
|
// Fix Bug 445630: [RDV][Regression] Orientation of georeferenced Reality Mesh is wrong.
|
|
150810
150864
|
// Use json.root.transform only if defined and not identity -> otherwise will use a transform computed from cartographic center.
|
|
150811
|
-
if (
|
|
150812
|
-
|
|
150813
|
-
|
|
150814
|
-
|
|
150865
|
+
if (worldToEcefTransform.matrix.isIdentity) {
|
|
150866
|
+
// For georeferenced Reality Meshes, its origin is translated to model origin (0,0,0).
|
|
150867
|
+
// Apply range center to translate it back to its original position.
|
|
150868
|
+
const worldCenter = !worldToEcefTransform.matrix.isIdentity ? range.center : undefined;
|
|
150869
|
+
if (cartoCenter)
|
|
150870
|
+
ecefLocation = _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.EcefLocation.createFromCartographicOrigin(cartoCenter, worldCenter);
|
|
150871
|
+
}
|
|
150815
150872
|
location = ecefLocation;
|
|
150816
150873
|
_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.logTrace(loggerCategory, "RealityData is worldToEcefTransform.matrix.isIdentity", () => ({ isIdentity: worldToEcefTransform.matrix.isIdentity }));
|
|
150817
150874
|
// iModelDb.setEcefLocation(ecefLocation);
|
|
@@ -286076,7 +286133,7 @@ class TestContext {
|
|
|
286076
286133
|
this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
|
|
286077
286134
|
const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${process.env.IMJS_URL_PREFIX ?? ""}api.bentley.com/imodels` } });
|
|
286078
286135
|
await core_frontend_1.NoRenderApp.startup({
|
|
286079
|
-
applicationVersion: "4.4.0-dev.
|
|
286136
|
+
applicationVersion: "4.4.0-dev.9",
|
|
286080
286137
|
applicationId: this.settings.gprid,
|
|
286081
286138
|
authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.adminUserAccessToken),
|
|
286082
286139
|
hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
|
|
@@ -304853,7 +304910,7 @@ module.exports = JSON.parse('{"name":"axios","version":"0.21.4","description":"P
|
|
|
304853
304910
|
/***/ ((module) => {
|
|
304854
304911
|
|
|
304855
304912
|
"use strict";
|
|
304856
|
-
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.4.0-dev.
|
|
304913
|
+
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.4.0-dev.9","description":"iTwin.js frontend components","main":"lib/cjs/core-frontend.js","module":"lib/esm/core-frontend.js","typings":"lib/cjs/core-frontend","license":"MIT","scripts":{"build":"npm run -s copy:public && npm run -s build:cjs && npm run -s build:esm && npm run -s webpackWorkers && npm run -s copy:workers","build:cjs":"npm run -s copy:js:cjs && tsc 1>&2 --outDir lib/cjs","build:esm":"npm run -s copy:js:esm && tsc 1>&2 --module 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","copy:workers":"cpx \\"./lib/workers/webpack/parse-imdl-worker.js\\" ./lib/public/scripts","docs":"betools docs --includes=../../generated-docs/extract --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/map/*.d.ts,**/tile/*.d.ts,**/*-css.ts","extract-api":"betools extract-api --entry=core-frontend && npm run extract-extension-api","extract-extension-api":"eslint -c extraction.eslint.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 && npm run -s webpackTestWorker","webpackTestWorker":"webpack --config ./src/test/worker/webpack.config.js 1>&2 && cpx \\"./lib/test/test-worker.js\\" ./lib/test","webpackWorkers":"webpack --config ./src/workers/ImdlParser/webpack.config.js 1>&2"},"repository":{"type":"git","url":"https://github.com/iTwin/itwinjs-core.git","directory":"core/frontend"},"keywords":["Bentley","BIM","iModel","digital-twin","iTwin"],"author":{"name":"Bentley Systems, Inc.","url":"http://www.bentley.com"},"peerDependencies":{"@itwin/appui-abstract":"workspace:^4.4.0-dev.9","@itwin/core-bentley":"workspace:^4.4.0-dev.9","@itwin/core-common":"workspace:^4.4.0-dev.9","@itwin/core-geometry":"workspace:^4.4.0-dev.9","@itwin/core-orbitgt":"workspace:^4.4.0-dev.9","@itwin/core-quantity":"workspace:^4.4.0-dev.9"},"//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.44","@types/chai":"4.3.1","@types/chai-as-promised":"^7","@types/mocha":"^10.0.6","@types/sinon":"^17.0.2","babel-loader":"~8.2.5","babel-plugin-istanbul":"~6.1.1","chai":"^4.3.10","chai-as-promised":"^7.1.1","cpx2":"^3.0.0","eslint":"^8.44.0","glob":"^7.1.2","mocha":"^10.2.0","nyc":"^15.1.0","rimraf":"^3.0.2","sinon":"^17.0.1","source-map-loader":"^4.0.0","typescript":"~5.0.2","typemoq":"^2.1.0","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/cloud-agnostic-core":"^2.1.0","@itwin/object-storage-core":"^2.1.0","@itwin/core-i18n":"workspace:*","@itwin/core-telemetry":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"^3.1.6","@loaders.gl/draco":"^3.1.6","fuse.js":"^3.3.0","wms-capabilities":"0.4.0"},"nyc":{"extends":"./node_modules/@itwin/build-tools/.nycrc"}}');
|
|
304857
304914
|
|
|
304858
304915
|
/***/ }),
|
|
304859
304916
|
|