@itwin/ecschema-rpcinterface-tests 3.5.0-dev.21 → 3.5.0-dev.24

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.
@@ -1 +1 @@
1
- {"version":3,"file":"_554f.bundled-tests.js","mappings":";;;;;;;;AAAA","sources":["file:///ignored|D:\\vsts_a\\1147\\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":""}
1
+ {"version":3,"file":"_554f.bundled-tests.js","mappings":";;;;;;;;AAAA","sources":["file:///ignored|D:\\vsts_a\\6\\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":""}
@@ -88186,6 +88186,7 @@ class IModelReadRpcInterface extends _RpcInterface__WEBPACK_IMPORTED_MODULE_2__.
88186
88186
  async queryBlob(_iModelToken, _request) { return this.forward(arguments); }
88187
88187
  async getModelProps(_iModelToken, _modelIds) { return this.forward(arguments); }
88188
88188
  async queryModelRanges(_iModelToken, _modelIds) { return this.forward(arguments); }
88189
+ async queryModelExtents(_iModelToken, _modelIds) { return this.forward(arguments); }
88189
88190
  async queryModelProps(_iModelToken, _params) { return this.forward(arguments); }
88190
88191
  async getElementProps(_iModelToken, _elementIds) { return this.forward(arguments); }
88191
88192
  async queryElementProps(_iModelToken, _params) { return this.forward(arguments); }
@@ -88216,7 +88217,7 @@ class IModelReadRpcInterface extends _RpcInterface__WEBPACK_IMPORTED_MODULE_2__.
88216
88217
  /** The immutable name of the interface. */
88217
88218
  IModelReadRpcInterface.interfaceName = "IModelReadRpcInterface";
88218
88219
  /** The semantic version of the interface. */
88219
- IModelReadRpcInterface.interfaceVersion = "3.3.0";
88220
+ IModelReadRpcInterface.interfaceVersion = "3.4.0";
88220
88221
  __decorate([
88221
88222
  _core_RpcOperation__WEBPACK_IMPORTED_MODULE_1__.RpcOperation.allowResponseCaching(_core_RpcConstants__WEBPACK_IMPORTED_MODULE_0__.RpcResponseCacheControl.Immutable)
88222
88223
  ], IModelReadRpcInterface.prototype, "getConnectionProps", null);
@@ -88229,6 +88230,9 @@ __decorate([
88229
88230
  __decorate([
88230
88231
  _core_RpcOperation__WEBPACK_IMPORTED_MODULE_1__.RpcOperation.allowResponseCaching(_core_RpcConstants__WEBPACK_IMPORTED_MODULE_0__.RpcResponseCacheControl.Immutable)
88231
88232
  ], IModelReadRpcInterface.prototype, "queryModelRanges", null);
88233
+ __decorate([
88234
+ _core_RpcOperation__WEBPACK_IMPORTED_MODULE_1__.RpcOperation.allowResponseCaching(_core_RpcConstants__WEBPACK_IMPORTED_MODULE_0__.RpcResponseCacheControl.Immutable)
88235
+ ], IModelReadRpcInterface.prototype, "queryModelExtents", null);
88232
88236
  __decorate([
88233
88237
  _core_RpcOperation__WEBPACK_IMPORTED_MODULE_1__.RpcOperation.allowResponseCaching(_core_RpcConstants__WEBPACK_IMPORTED_MODULE_0__.RpcResponseCacheControl.Immutable)
88234
88238
  ], IModelReadRpcInterface.prototype, "getClassHierarchy", null);
@@ -114790,11 +114794,31 @@ class SnapshotConnection extends IModelConnection {
114790
114794
  unload(modelId) {
114791
114795
  this._loaded.delete(modelId);
114792
114796
  }
114793
- /** Query for a set of model ranges by ModelIds. */
114797
+ /** Query for a set of model ranges by ModelIds.
114798
+ * @param modelIds the Id or Ids of the [GeometricModel]($backend)s for which to query the ranges.
114799
+ * @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.
114800
+ * @note The contents of the returned array do not follow a deterministic order.
114801
+ * @throws [IModelError]($common) if exactly one model Id is specified and that Id does not identify a GeoemtricModel.
114802
+ * @see [[queryExtents]] for a similar function that does not throw and produces a deterministically-ordered result.
114803
+ */
114794
114804
  async queryModelRanges(modelIds) {
114795
114805
  const iModel = this._iModel;
114796
114806
  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)]) : [];
114797
114807
  }
114808
+ /** For each [GeometricModel]($backend) specified by Id, attempts to obtain the union of the volumes of all geometric elements within that model.
114809
+ * @param modelIds The Id or Ids of the geometric models for which to obtain the extents.
114810
+ * @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
114811
+ * corresponding results entry's `extents` will be a "null" range (@see [Range3d.isNull]($geometry) and its `status` will indicate
114812
+ * why the extents could not be obtained (e.g., because the Id did not identify a [GeometricModel]($backend)).
114813
+ */
114814
+ async queryExtents(modelIds) {
114815
+ const iModel = this._iModel;
114816
+ if (!iModel.isOpen)
114817
+ return [];
114818
+ if (typeof modelIds === "string")
114819
+ modelIds = [modelIds];
114820
+ return _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.IModelReadRpcInterface.getClientForRouting(iModel.routingContext.token).queryModelExtents(iModel.getRpcProps(), modelIds);
114821
+ }
114798
114822
  /** Query for a set of ModelProps of the specified ModelQueryParams.
114799
114823
  * @param queryParams The query parameters. The `limit` and `offset` members should be used to page results.
114800
114824
  * @throws [IModelError]($common) If the generated statement is invalid or would return too many props.
@@ -116579,12 +116603,14 @@ class GeometricModelState extends ModelState {
116579
116603
  /** @internal */
116580
116604
  get treeModelId() { return this.id; }
116581
116605
  /** Query for the union of the ranges of all the elements in this GeometricModel.
116582
- * @internal
116606
+ * @note This value is cached after the first time it is called.
116607
+ * @public
116583
116608
  */
116584
116609
  async queryModelRange() {
116610
+ var _a;
116585
116611
  if (undefined === this._modelRange) {
116586
- const ranges = await this.iModel.models.queryModelRanges(this.id);
116587
- this._modelRange = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.Range3d.fromJSON(ranges[0]);
116612
+ const ranges = await this.iModel.models.queryExtents(this.id);
116613
+ this._modelRange = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.Range3d.fromJSON((_a = ranges[0]) === null || _a === void 0 ? void 0 : _a.extents);
116588
116614
  }
116589
116615
  return this._modelRange;
116590
116616
  }
@@ -121452,14 +121478,15 @@ class ViewCreator2d {
121452
121478
  * @param options for view creation.
121453
121479
  */
121454
121480
  this._createViewStateProps = async (modelId, options) => {
121481
+ var _a;
121455
121482
  // Use dictionary model in all props
121456
121483
  const dictionaryId = _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.IModel.dictionaryId;
121457
121484
  const categories = await this._getAllCategories();
121458
121485
  // Get bg color from options or default to white
121459
121486
  const bgColor = (options === null || options === void 0 ? void 0 : options.bgColor) ? options.bgColor : _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.ColorDef.white;
121460
121487
  // model extents
121461
- const modelProps = await this._imodel.models.queryModelRanges(modelId);
121462
- const modelExtents = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.Range3d.fromJSON(modelProps[0]);
121488
+ const modelProps = await this._imodel.models.queryExtents(modelId);
121489
+ const modelExtents = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.Range3d.fromJSON((_a = modelProps[0]) === null || _a === void 0 ? void 0 : _a.extents);
121463
121490
  let originX = modelExtents.low.x;
121464
121491
  let originY = modelExtents.low.y;
121465
121492
  let deltaX = modelExtents.xLength();
@@ -125774,6 +125801,7 @@ class Viewport {
125774
125801
  * @note this method clones the current ViewState2d and sets its baseModelId to the supplied value. The DisplayStyle and CategorySelector remain unchanged.
125775
125802
  */
125776
125803
  async changeViewedModel2d(baseModelId, options) {
125804
+ var _a;
125777
125805
  if (!this.view.is2d())
125778
125806
  return;
125779
125807
  // Clone the current ViewState, change its baseModelId, and ensure the new model is loaded.
@@ -125781,8 +125809,8 @@ class Viewport {
125781
125809
  await newView.changeViewedModel(baseModelId);
125782
125810
  this.changeView(newView, options); // switch this viewport to use new ViewState2d
125783
125811
  if (options && options.doFit) { // optionally fit view to the extents of the new model
125784
- const range = await this.iModel.models.queryModelRanges([baseModelId]);
125785
- this.zoomToVolume(_itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Range3d.fromJSON(range[0]), options);
125812
+ const range = await this.iModel.models.queryExtents([baseModelId]);
125813
+ this.zoomToVolume(_itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Range3d.fromJSON((_a = range[0]) === null || _a === void 0 ? void 0 : _a.extents), options);
125786
125814
  }
125787
125815
  }
125788
125816
  /** Attempt to replace the set of models currently viewed by this viewport, if it is displaying a SpatialView
@@ -172340,9 +172368,9 @@ class PrimaryTreeSupplier {
172340
172368
  return new _internal__WEBPACK_IMPORTED_MODULE_5__.IModelTileTree(params, id.treeId);
172341
172369
  let elevation = 0;
172342
172370
  try {
172343
- const ranges = await iModel.models.queryModelRanges(id.modelId);
172371
+ const ranges = await iModel.models.queryExtents(id.modelId);
172344
172372
  if (1 === ranges.length) {
172345
- const range = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.Range3d.fromJSON(ranges[0]);
172373
+ const range = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.Range3d.fromJSON(ranges[0].extents);
172346
172374
  const lo = range.low.z;
172347
172375
  const hi = range.high.z;
172348
172376
  if (lo <= hi)
@@ -309213,7 +309241,7 @@ module.exports = JSON.parse('{"name":"axios","version":"0.21.4","description":"P
309213
309241
  /***/ ((module) => {
309214
309242
 
309215
309243
  "use strict";
309216
- 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"}}]}}');
309244
+ module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"3.5.0-dev.24","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.24","@itwin/core-bentley":"workspace:^3.5.0-dev.24","@itwin/core-common":"workspace:^3.5.0-dev.24","@itwin/core-geometry":"workspace:^3.5.0-dev.24","@itwin/core-orbitgt":"workspace:^3.5.0-dev.24","@itwin/core-quantity":"workspace:^3.5.0-dev.24","@itwin/webgl-compatibility":"workspace:^3.5.0-dev.24"},"//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"}}]}}');
309217
309245
 
309218
309246
  /***/ })
309219
309247