@itwin/rpcinterface-full-stack-tests 3.5.0-dev.21 → 3.5.0-dev.22

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.
@@ -88523,6 +88523,7 @@ class IModelReadRpcInterface extends _RpcInterface__WEBPACK_IMPORTED_MODULE_2__.
88523
88523
  async queryBlob(_iModelToken, _request) { return this.forward(arguments); }
88524
88524
  async getModelProps(_iModelToken, _modelIds) { return this.forward(arguments); }
88525
88525
  async queryModelRanges(_iModelToken, _modelIds) { return this.forward(arguments); }
88526
+ async queryModelExtents(_iModelToken, _modelIds) { return this.forward(arguments); }
88526
88527
  async queryModelProps(_iModelToken, _params) { return this.forward(arguments); }
88527
88528
  async getElementProps(_iModelToken, _elementIds) { return this.forward(arguments); }
88528
88529
  async queryElementProps(_iModelToken, _params) { return this.forward(arguments); }
@@ -88553,7 +88554,7 @@ class IModelReadRpcInterface extends _RpcInterface__WEBPACK_IMPORTED_MODULE_2__.
88553
88554
  /** The immutable name of the interface. */
88554
88555
  IModelReadRpcInterface.interfaceName = "IModelReadRpcInterface";
88555
88556
  /** The semantic version of the interface. */
88556
- IModelReadRpcInterface.interfaceVersion = "3.3.0";
88557
+ IModelReadRpcInterface.interfaceVersion = "3.4.0";
88557
88558
  __decorate([
88558
88559
  _core_RpcOperation__WEBPACK_IMPORTED_MODULE_1__.RpcOperation.allowResponseCaching(_core_RpcConstants__WEBPACK_IMPORTED_MODULE_0__.RpcResponseCacheControl.Immutable)
88559
88560
  ], IModelReadRpcInterface.prototype, "getConnectionProps", null);
@@ -88566,6 +88567,9 @@ __decorate([
88566
88567
  __decorate([
88567
88568
  _core_RpcOperation__WEBPACK_IMPORTED_MODULE_1__.RpcOperation.allowResponseCaching(_core_RpcConstants__WEBPACK_IMPORTED_MODULE_0__.RpcResponseCacheControl.Immutable)
88568
88569
  ], IModelReadRpcInterface.prototype, "queryModelRanges", null);
88570
+ __decorate([
88571
+ _core_RpcOperation__WEBPACK_IMPORTED_MODULE_1__.RpcOperation.allowResponseCaching(_core_RpcConstants__WEBPACK_IMPORTED_MODULE_0__.RpcResponseCacheControl.Immutable)
88572
+ ], IModelReadRpcInterface.prototype, "queryModelExtents", null);
88569
88573
  __decorate([
88570
88574
  _core_RpcOperation__WEBPACK_IMPORTED_MODULE_1__.RpcOperation.allowResponseCaching(_core_RpcConstants__WEBPACK_IMPORTED_MODULE_0__.RpcResponseCacheControl.Immutable)
88571
88575
  ], IModelReadRpcInterface.prototype, "getClassHierarchy", null);
@@ -105443,11 +105447,31 @@ class SnapshotConnection extends IModelConnection {
105443
105447
  unload(modelId) {
105444
105448
  this._loaded.delete(modelId);
105445
105449
  }
105446
- /** Query for a set of model ranges by ModelIds. */
105450
+ /** Query for a set of model ranges by ModelIds.
105451
+ * @param modelIds the Id or Ids of the [GeometricModel]($backend)s for which to query the ranges.
105452
+ * @returns An array containing the range of each model of each unique model Id, omitting the range for any Id which did no identify a GeometricModel.
105453
+ * @note The contents of the returned array do not follow a deterministic order.
105454
+ * @throws [IModelError]($common) if exactly one model Id is specified and that Id does not identify a GeoemtricModel.
105455
+ * @see [[queryExtents]] for a similar function that does not throw and produces a deterministically-ordered result.
105456
+ */
105447
105457
  async queryModelRanges(modelIds) {
105448
105458
  const iModel = this._iModel;
105449
105459
  return iModel.isOpen ? _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.IModelReadRpcInterface.getClientForRouting(iModel.routingContext.token).queryModelRanges(iModel.getRpcProps(), [..._itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Id64.toIdSet(modelIds)]) : [];
105450
105460
  }
105461
+ /** For each [GeometricModel]($backend) specified by Id, attempts to obtain the union of the volumes of all geometric elements within that model.
105462
+ * @param modelIds The Id or Ids of the geometric models for which to obtain the extents.
105463
+ * @returns An array of results, one per supplied Id, in the order in which the Ids were supplied. If the extents could not be obtained, the
105464
+ * corresponding results entry's `extents` will be a "null" range (@see [Range3d.isNull]($geometry) and its `status` will indicate
105465
+ * why the extents could not be obtained (e.g., because the Id did not identify a [GeometricModel]($backend)).
105466
+ */
105467
+ async queryExtents(modelIds) {
105468
+ const iModel = this._iModel;
105469
+ if (!iModel.isOpen)
105470
+ return [];
105471
+ if (typeof modelIds === "string")
105472
+ modelIds = [modelIds];
105473
+ return _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.IModelReadRpcInterface.getClientForRouting(iModel.routingContext.token).queryModelExtents(iModel.getRpcProps(), modelIds);
105474
+ }
105451
105475
  /** Query for a set of ModelProps of the specified ModelQueryParams.
105452
105476
  * @param queryParams The query parameters. The `limit` and `offset` members should be used to page results.
105453
105477
  * @throws [IModelError]($common) If the generated statement is invalid or would return too many props.
@@ -107232,12 +107256,14 @@ class GeometricModelState extends ModelState {
107232
107256
  /** @internal */
107233
107257
  get treeModelId() { return this.id; }
107234
107258
  /** Query for the union of the ranges of all the elements in this GeometricModel.
107235
- * @internal
107259
+ * @note This value is cached after the first time it is called.
107260
+ * @public
107236
107261
  */
107237
107262
  async queryModelRange() {
107263
+ var _a;
107238
107264
  if (undefined === this._modelRange) {
107239
- const ranges = await this.iModel.models.queryModelRanges(this.id);
107240
- this._modelRange = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.Range3d.fromJSON(ranges[0]);
107265
+ const ranges = await this.iModel.models.queryExtents(this.id);
107266
+ this._modelRange = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.Range3d.fromJSON((_a = ranges[0]) === null || _a === void 0 ? void 0 : _a.extents);
107241
107267
  }
107242
107268
  return this._modelRange;
107243
107269
  }
@@ -112105,14 +112131,15 @@ class ViewCreator2d {
112105
112131
  * @param options for view creation.
112106
112132
  */
112107
112133
  this._createViewStateProps = async (modelId, options) => {
112134
+ var _a;
112108
112135
  // Use dictionary model in all props
112109
112136
  const dictionaryId = _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.IModel.dictionaryId;
112110
112137
  const categories = await this._getAllCategories();
112111
112138
  // Get bg color from options or default to white
112112
112139
  const bgColor = (options === null || options === void 0 ? void 0 : options.bgColor) ? options.bgColor : _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.ColorDef.white;
112113
112140
  // model extents
112114
- const modelProps = await this._imodel.models.queryModelRanges(modelId);
112115
- const modelExtents = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.Range3d.fromJSON(modelProps[0]);
112141
+ const modelProps = await this._imodel.models.queryExtents(modelId);
112142
+ const modelExtents = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.Range3d.fromJSON((_a = modelProps[0]) === null || _a === void 0 ? void 0 : _a.extents);
112116
112143
  let originX = modelExtents.low.x;
112117
112144
  let originY = modelExtents.low.y;
112118
112145
  let deltaX = modelExtents.xLength();
@@ -116427,6 +116454,7 @@ class Viewport {
116427
116454
  * @note this method clones the current ViewState2d and sets its baseModelId to the supplied value. The DisplayStyle and CategorySelector remain unchanged.
116428
116455
  */
116429
116456
  async changeViewedModel2d(baseModelId, options) {
116457
+ var _a;
116430
116458
  if (!this.view.is2d())
116431
116459
  return;
116432
116460
  // Clone the current ViewState, change its baseModelId, and ensure the new model is loaded.
@@ -116434,8 +116462,8 @@ class Viewport {
116434
116462
  await newView.changeViewedModel(baseModelId);
116435
116463
  this.changeView(newView, options); // switch this viewport to use new ViewState2d
116436
116464
  if (options && options.doFit) { // optionally fit view to the extents of the new model
116437
- const range = await this.iModel.models.queryModelRanges([baseModelId]);
116438
- this.zoomToVolume(_itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Range3d.fromJSON(range[0]), options);
116465
+ const range = await this.iModel.models.queryExtents([baseModelId]);
116466
+ this.zoomToVolume(_itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Range3d.fromJSON((_a = range[0]) === null || _a === void 0 ? void 0 : _a.extents), options);
116439
116467
  }
116440
116468
  }
116441
116469
  /** Attempt to replace the set of models currently viewed by this viewport, if it is displaying a SpatialView
@@ -162993,9 +163021,9 @@ class PrimaryTreeSupplier {
162993
163021
  return new _internal__WEBPACK_IMPORTED_MODULE_5__.IModelTileTree(params, id.treeId);
162994
163022
  let elevation = 0;
162995
163023
  try {
162996
- const ranges = await iModel.models.queryModelRanges(id.modelId);
163024
+ const ranges = await iModel.models.queryExtents(id.modelId);
162997
163025
  if (1 === ranges.length) {
162998
- const range = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.Range3d.fromJSON(ranges[0]);
163026
+ const range = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.Range3d.fromJSON(ranges[0].extents);
162999
163027
  const lo = range.low.z;
163000
163028
  const hi = range.high.z;
163001
163029
  if (lo <= hi)
@@ -290402,7 +290430,7 @@ class TestContext {
290402
290430
  this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
290403
290431
  const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${(_a = process.env.IMJS_URL_PREFIX) !== null && _a !== void 0 ? _a : ""}api.bentley.com/imodels` } });
290404
290432
  await core_frontend_1.NoRenderApp.startup({
290405
- applicationVersion: "3.5.0-dev.21",
290433
+ applicationVersion: "3.5.0-dev.22",
290406
290434
  applicationId: this.settings.gprid,
290407
290435
  authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.adminUserAccessToken),
290408
290436
  hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
@@ -309535,7 +309563,7 @@ module.exports = JSON.parse('{"name":"axios","version":"0.21.4","description":"P
309535
309563
  /***/ ((module) => {
309536
309564
 
309537
309565
  "use strict";
309538
- module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"3.5.0-dev.21","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.21","@itwin/core-bentley":"workspace:^3.5.0-dev.21","@itwin/core-common":"workspace:^3.5.0-dev.21","@itwin/core-geometry":"workspace:^3.5.0-dev.21","@itwin/core-orbitgt":"workspace:^3.5.0-dev.21","@itwin/core-quantity":"workspace:^3.5.0-dev.21","@itwin/webgl-compatibility":"workspace:^3.5.0-dev.21"},"//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":"16.11.59","@types/qs":"^6.5.0","@types/semver":"7.3.10","@types/superagent":"^4.1.14","@types/sinon":"^9.0.0","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"}}]}}');
309566
+ module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"3.5.0-dev.22","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.22","@itwin/core-bentley":"workspace:^3.5.0-dev.22","@itwin/core-common":"workspace:^3.5.0-dev.22","@itwin/core-geometry":"workspace:^3.5.0-dev.22","@itwin/core-orbitgt":"workspace:^3.5.0-dev.22","@itwin/core-quantity":"workspace:^3.5.0-dev.22","@itwin/webgl-compatibility":"workspace:^3.5.0-dev.22"},"//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":"16.11.59","@types/qs":"^6.5.0","@types/semver":"7.3.10","@types/superagent":"^4.1.14","@types/sinon":"^9.0.0","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"}}]}}');
309539
309567
 
309540
309568
  /***/ }),
309541
309569