@itwin/rpcinterface-full-stack-tests 3.2.0-dev.40 → 3.2.0-dev.43

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.
@@ -23401,9 +23401,9 @@ Backend.type = 'backend';
23401
23401
 
23402
23402
  /***/ }),
23403
23403
 
23404
- /***/ "../../common/temp/node_modules/.pnpm/i18next@21.6.14/node_modules/i18next/dist/esm/i18next.js":
23404
+ /***/ "../../common/temp/node_modules/.pnpm/i18next@21.6.16/node_modules/i18next/dist/esm/i18next.js":
23405
23405
  /*!*************************************************************************************************************!*\
23406
- !*** D:/vsts_a/1/s/common/temp/node_modules/.pnpm/i18next@21.6.14/node_modules/i18next/dist/esm/i18next.js ***!
23406
+ !*** D:/vsts_a/1/s/common/temp/node_modules/.pnpm/i18next@21.6.16/node_modules/i18next/dist/esm/i18next.js ***!
23407
23407
  \*************************************************************************************************************/
23408
23408
  /*! exports provided: default, changeLanguage, createInstance, exists, getFixedT, hasLoadedNamespace, init, loadLanguages, loadNamespaces, loadResources, reloadResources, setDefaultNamespace, t, use */
23409
23409
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
@@ -24243,7 +24243,7 @@ var Translator = function (_EventEmitter) {
24243
24243
  var _this3 = this;
24244
24244
 
24245
24245
  if (this.i18nFormat && this.i18nFormat.parse) {
24246
- res = this.i18nFormat.parse(res, options, resolved.usedLng, resolved.usedNS, resolved.usedKey, {
24246
+ res = this.i18nFormat.parse(res, _objectSpread$2(_objectSpread$2({}, this.options.interpolation.defaultVariables), options), resolved.usedLng, resolved.usedNS, resolved.usedKey, {
24247
24247
  resolved: resolved
24248
24248
  });
24249
24249
  } else if (!options.skipInterpolation) {
@@ -26051,7 +26051,7 @@ var I18n = function (_EventEmitter) {
26051
26051
  }
26052
26052
 
26053
26053
  if (this.hasResourceBundle(lng, ns)) return true;
26054
- if (!this.services.backendConnector.backend) return true;
26054
+ if (!this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages) return true;
26055
26055
  if (loadNotPending(lng, ns) && (!fallbackLng || loadNotPending(lastLng, ns))) return true;
26056
26056
  return false;
26057
26057
  }
@@ -70352,10 +70352,13 @@ class IModelReadRpcInterface extends _RpcInterface__WEBPACK_IMPORTED_MODULE_0__[
70352
70352
  /** @deprecated */
70353
70353
  async getViewThumbnail(_iModelToken, _viewId) { return this.forward(arguments); }
70354
70354
  async getDefaultViewId(_iModelToken) { return this.forward(arguments); }
70355
+ async getCustomViewState3dData(_iModelToken, _options) { return this.forward(arguments); }
70356
+ async hydrateViewState(_iModelToken, _options) { return this.forward(arguments); }
70355
70357
  async requestSnap(_iModelToken, _sessionId, _props) { return this.forward(arguments); }
70356
70358
  async cancelSnap(_iModelToken, _sessionId) { return this.forward(arguments); }
70357
70359
  async getGeometryContainment(_iModelToken, _props) { return this.forward(arguments); }
70358
70360
  async getMassProperties(_iModelToken, _props) { return this.forward(arguments); }
70361
+ async getMassPropertiesPerCandidate(_iModelToken, _props) { return this.forward(arguments); }
70359
70362
  async getIModelCoordinatesFromGeoCoordinates(_iModelToken, _props) { return this.forward(arguments); }
70360
70363
  async getGeoCoordinatesFromIModelCoordinates(_iModelToken, _props) { return this.forward(arguments); }
70361
70364
  async getGeometrySummary(_iModelToken, _props) { return this.forward(arguments); }
@@ -70367,7 +70370,7 @@ class IModelReadRpcInterface extends _RpcInterface__WEBPACK_IMPORTED_MODULE_0__[
70367
70370
  /** The immutable name of the interface. */
70368
70371
  IModelReadRpcInterface.interfaceName = "IModelReadRpcInterface";
70369
70372
  /** The semantic version of the interface. */
70370
- IModelReadRpcInterface.interfaceVersion = "3.0.0";
70373
+ IModelReadRpcInterface.interfaceVersion = "3.1.0";
70371
70374
 
70372
70375
 
70373
70376
  /***/ }),
@@ -73803,7 +73806,7 @@ class WebAppRpcRequest extends _core_RpcRequest__WEBPACK_IMPORTED_MODULE_4__["Rp
73803
73806
  /** The maximum size permitted for an encoded component in a URL.
73804
73807
  * @note This is used for features like encoding the payload of a cacheable request in the URL.
73805
73808
  */
73806
- WebAppRpcRequest.maxUrlComponentSize = 1024;
73809
+ WebAppRpcRequest.maxUrlComponentSize = 4096;
73807
73810
 
73808
73811
  /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../../common/temp/node_modules/.pnpm/buffer@4.9.2/node_modules/buffer/index.js */ "../../common/temp/node_modules/.pnpm/buffer@4.9.2/node_modules/buffer/index.js").Buffer))
73809
73812
 
@@ -82322,6 +82325,21 @@ class SectionAttachmentInfo {
82322
82325
  clone() {
82323
82326
  return new SectionAttachmentInfo(this._spatialView, this._drawingToSpatialTransform, this._displaySpatialView);
82324
82327
  }
82328
+ preload(options) {
82329
+ if (!this.wantDisplayed)
82330
+ return;
82331
+ if (this._spatialView instanceof _ViewState__WEBPACK_IMPORTED_MODULE_14__["ViewState3d"])
82332
+ return;
82333
+ if (!_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__["Id64"].isValidId64(this._spatialView))
82334
+ return;
82335
+ options.spatialViewId = this._spatialView;
82336
+ options.viewStateLoadProps = {
82337
+ displayStyle: {
82338
+ omitScheduleScriptElementIds: true,
82339
+ compressExcludedElementIds: true,
82340
+ },
82341
+ };
82342
+ }
82325
82343
  async load(iModel) {
82326
82344
  if (!this.wantDisplayed)
82327
82345
  return;
@@ -82333,6 +82351,14 @@ class SectionAttachmentInfo {
82333
82351
  if (spatialView instanceof _ViewState__WEBPACK_IMPORTED_MODULE_14__["ViewState3d"])
82334
82352
  this._spatialView = spatialView;
82335
82353
  }
82354
+ async postload(options, iModel) {
82355
+ let spatialView;
82356
+ if (options.spatialViewProps) {
82357
+ spatialView = await iModel.views.convertViewStatePropsToViewState(options.spatialViewProps);
82358
+ }
82359
+ if (spatialView instanceof _ViewState__WEBPACK_IMPORTED_MODULE_14__["ViewState3d"])
82360
+ this._spatialView = spatialView;
82361
+ }
82336
82362
  createAttachment(toSheet) {
82337
82363
  if (!this.wantDisplayed || !(this._spatialView instanceof _ViewState__WEBPACK_IMPORTED_MODULE_14__["ViewState3d"]))
82338
82364
  return undefined;
@@ -82550,10 +82576,17 @@ class DrawingViewState extends _ViewState__WEBPACK_IMPORTED_MODULE_14__["ViewSta
82550
82576
  return { spatialView, displaySpatialView, drawingToSpatialTransform };
82551
82577
  }
82552
82578
  /** @internal */
82553
- async load() {
82579
+ preload(hydrateRequest) {
82554
82580
  Object(_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__["assert"])(!this.isAttachedToViewport);
82555
- await super.load();
82556
- await this._attachmentInfo.load(this.iModel);
82581
+ super.preload(hydrateRequest);
82582
+ this._attachmentInfo.preload(hydrateRequest);
82583
+ }
82584
+ /** @internal */
82585
+ async postload(hydrateResponse) {
82586
+ const promises = [];
82587
+ promises.push(super.postload(hydrateResponse));
82588
+ promises.push(this._attachmentInfo.postload(hydrateResponse, this.iModel));
82589
+ await Promise.all(promises);
82557
82590
  }
82558
82591
  static createFromProps(props, iModel) {
82559
82592
  const cat = new _CategorySelectorState__WEBPACK_IMPORTED_MODULE_3__["CategorySelectorState"](props.categorySelectorProps, iModel);
@@ -86388,8 +86421,14 @@ class IModelConnection extends _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__["
86388
86421
  }
86389
86422
  return undefined;
86390
86423
  }
86391
- /** Request element mass properties from the backend. */
86424
+ /** Request element mass properties from the backend.
86425
+ * @note For better performance use [[getMassPropertiesPerCandidate]] when called from a loop with identical operations and a single candidate per iteration.
86426
+ */
86392
86427
  async getMassProperties(requestProps) { return _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__["IModelReadRpcInterface"].getClientForRouting(this.routingContext.token).getMassProperties(this.getRpcProps(), requestProps); }
86428
+ /** Request mass properties for multiple elements from the backend. */
86429
+ async getMassPropertiesPerCandidate(requestProps) {
86430
+ return _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__["IModelReadRpcInterface"].getClientForRouting(this.routingContext.token).getMassPropertiesPerCandidate(this.getRpcProps(), requestProps);
86431
+ }
86393
86432
  /** Convert a point in this iModel's Spatial coordinates to a [[Cartographic]] using the Geographic location services for this IModelConnection.
86394
86433
  * @param spatial A point in the iModel's spatial coordinates
86395
86434
  * @param result If defined, use this for output
@@ -86678,7 +86717,16 @@ class SnapshotConnection extends IModelConnection {
86678
86717
  return; // all requested models are already loaded
86679
86718
  try {
86680
86719
  const propArray = await this.getProps(notLoaded);
86681
- for (const props of propArray) {
86720
+ await this.updateLoadedWithModelProps(propArray);
86721
+ }
86722
+ catch (err) {
86723
+ // ignore error, we had nothing to do.
86724
+ }
86725
+ }
86726
+ /** Given an array of modelProps, find the class for each model and construct it. save it in the iModelConnection's loaded set. */
86727
+ async updateLoadedWithModelProps(modelProps) {
86728
+ try {
86729
+ for (const props of modelProps) {
86682
86730
  const ctor = await this._iModel.findClassFor(props.classFullName, _ModelState__WEBPACK_IMPORTED_MODULE_7__["ModelState"]);
86683
86731
  if (undefined === this.getLoaded(props.id)) { // do not overwrite if someone else loads it while we await
86684
86732
  const modelState = new ctor(props, this._iModel); // create a new instance of the appropriate ModelState subclass
@@ -86957,6 +87005,11 @@ class SnapshotConnection extends IModelConnection {
86957
87005
  },
86958
87006
  };
86959
87007
  const viewProps = await _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__["IModelReadRpcInterface"].getClientForRouting(this._iModel.routingContext.token).getViewStateData(this._iModel.getRpcProps(), viewDefinitionId, options);
87008
+ const viewState = await this.convertViewStatePropsToViewState(viewProps);
87009
+ return viewState;
87010
+ }
87011
+ /** Return the [[ViewState]] object associated with the [[ViewStateProps]] passed in. */
87012
+ async convertViewStatePropsToViewState(viewProps) {
86960
87013
  const className = viewProps.viewDefinitionProps.classFullName;
86961
87014
  const ctor = await this._iModel.findClassFor(className, undefined);
86962
87015
  if (undefined === ctor)
@@ -90867,6 +90920,52 @@ class ViewAttachmentsInfo {
90867
90920
  // No reason to clone the array.
90868
90921
  return new ViewAttachmentsInfo(this._attachments);
90869
90922
  }
90923
+ preload(options) {
90924
+ if (this.isLoaded)
90925
+ return;
90926
+ options.sheetViewAttachmentIds = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__["CompressedId64Set"].sortAndCompress(this._ids);
90927
+ options.viewStateLoadProps = {
90928
+ displayStyle: {
90929
+ omitScheduleScriptElementIds: true,
90930
+ compressExcludedElementIds: true,
90931
+ },
90932
+ };
90933
+ }
90934
+ async postload(options, iModel) {
90935
+ if (options.sheetViewViews === undefined)
90936
+ return;
90937
+ if (options.sheetViewAttachmentProps === undefined)
90938
+ return;
90939
+ const viewStateProps = options.sheetViewViews; // This is viewstateProps, need to turn this into ViewState
90940
+ const promises = [];
90941
+ for (const viewProps of viewStateProps) {
90942
+ const loadView = async () => {
90943
+ try {
90944
+ if (viewProps === undefined)
90945
+ return undefined;
90946
+ const view = await iModel.views.convertViewStatePropsToViewState(viewProps);
90947
+ return view;
90948
+ }
90949
+ catch {
90950
+ return undefined;
90951
+ }
90952
+ };
90953
+ promises.push(loadView());
90954
+ }
90955
+ const views = await Promise.all(promises);
90956
+ const attachmentProps = options.sheetViewAttachmentProps;
90957
+ Object(_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__["assert"])(views.length === attachmentProps.length);
90958
+ const attachments = [];
90959
+ for (let i = 0; i < views.length; i++) {
90960
+ const view = views[i];
90961
+ if (view && !(view instanceof SheetViewState)) {
90962
+ const props = attachmentProps[i];
90963
+ props.attachedView = view;
90964
+ attachments.push(props);
90965
+ }
90966
+ }
90967
+ this._attachments = attachments;
90968
+ }
90870
90969
  async load(iModel) {
90871
90970
  if (this.isLoaded)
90872
90971
  return;
@@ -91043,12 +91142,17 @@ class SheetViewState extends _ViewState__WEBPACK_IMPORTED_MODULE_14__["ViewState
91043
91142
  getViewedExtents() {
91044
91143
  return this._viewedExtents;
91045
91144
  }
91046
- /** Load the size and attachment for this sheet, as well as any other 2d view state characteristics.
91047
- * @internal override
91048
- */
91049
- async load() {
91050
- await super.load();
91051
- await this._attachmentsInfo.load(this.iModel);
91145
+ /** @internal */
91146
+ preload(hydrateRequest) {
91147
+ super.preload(hydrateRequest);
91148
+ this._attachmentsInfo.preload(hydrateRequest);
91149
+ }
91150
+ /** @internal */
91151
+ async postload(hydrateResponse) {
91152
+ const promises = [];
91153
+ promises.push(super.postload(hydrateResponse));
91154
+ promises.push(this._attachmentsInfo.postload(hydrateResponse, this.iModel));
91155
+ await Promise.all(promises);
91052
91156
  }
91053
91157
  /** @internal */
91054
91158
  createScene(context) {
@@ -91673,9 +91777,21 @@ class SpatialViewState extends _ViewState__WEBPACK_IMPORTED_MODULE_6__["ViewStat
91673
91777
  val.modelSelectorId = this.modelSelector.id;
91674
91778
  return val;
91675
91779
  }
91676
- async load() {
91677
- await super.load();
91678
- return this.modelSelector.load();
91780
+ /** @internal */
91781
+ preload(hydrateRequest) {
91782
+ super.preload(hydrateRequest);
91783
+ const notLoaded = this.iModel.models.filterLoaded(this.modelSelector.models);
91784
+ if (undefined === notLoaded)
91785
+ return; // all requested models are already loaded
91786
+ hydrateRequest.notLoadedModelSelectorStateModels = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__["CompressedId64Set"].sortAndCompress(notLoaded);
91787
+ }
91788
+ /** @internal */
91789
+ async postload(hydrateResponse) {
91790
+ const promises = [];
91791
+ promises.push(super.postload(hydrateResponse));
91792
+ if (hydrateResponse.modelSelectorStateModels !== undefined)
91793
+ promises.push(this.iModel.models.updateLoadedWithModelProps(hydrateResponse.modelSelectorStateModels));
91794
+ await Promise.all(promises);
91679
91795
  }
91680
91796
  viewsModel(modelId) { return this.modelSelector.containsModel(modelId); }
91681
91797
  clearViewedModels() { this.modelSelector.models.clear(); }
@@ -92026,14 +92142,7 @@ class SubCategoriesCache {
92026
92142
  * containing the corresponding promise and the set of categories still to be loaded.
92027
92143
  */
92028
92144
  load(categoryIds) {
92029
- let missing;
92030
- for (const catId of _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__["Id64"].iterable(categoryIds)) {
92031
- if (undefined === this._byCategoryId.get(catId)) {
92032
- if (undefined === missing)
92033
- missing = new Set();
92034
- missing.add(catId);
92035
- }
92036
- }
92145
+ const missing = this.getMissing(categoryIds);
92037
92146
  if (undefined === missing)
92038
92147
  return undefined;
92039
92148
  const request = new SubCategoriesCache.Request(missing, this._imodel);
@@ -92048,6 +92157,41 @@ class SubCategoriesCache {
92048
92157
  cancel: () => request.cancel(),
92049
92158
  };
92050
92159
  }
92160
+ /**
92161
+ * Populates the notLoadedCategoryIds property of the HydrateViewStateRequestProps.
92162
+ * notLoadedCategoryIds is a subset of categoryIds, filtering out any ids which already have an entry in the cache.
92163
+ */
92164
+ preload(options, categoryIds) {
92165
+ const missing = this.getMissing(categoryIds);
92166
+ if (undefined === missing)
92167
+ return;
92168
+ this._missingAtTimeOfPreload = missing;
92169
+ options.notLoadedCategoryIds = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__["CompressedId64Set"].sortAndCompress(missing);
92170
+ }
92171
+ /**
92172
+ * Populates the SubCategoriesCache using the categoryIdsResult of the HydrateViewStateResponseProps
92173
+ */
92174
+ postload(options) {
92175
+ if (options.categoryIdsResult === undefined)
92176
+ return;
92177
+ // missingAtTimeOfPreload shouldn't be undefined if options.categoryIdsResult is defined... but just to be safe we'll check
92178
+ const missing = this._missingAtTimeOfPreload === undefined ? new Set() : this._missingAtTimeOfPreload;
92179
+ this.processResults(options.categoryIdsResult, missing);
92180
+ // clear missing
92181
+ this._missingAtTimeOfPreload = undefined;
92182
+ }
92183
+ /** Given categoryIds, return which of these are not cached. */
92184
+ getMissing(categoryIds) {
92185
+ let missing;
92186
+ for (const catId of _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__["Id64"].iterable(categoryIds)) {
92187
+ if (undefined === this._byCategoryId.get(catId)) {
92188
+ if (undefined === missing)
92189
+ missing = new Set();
92190
+ missing.add(catId);
92191
+ }
92192
+ }
92193
+ return missing;
92194
+ }
92051
92195
  clear() {
92052
92196
  this._byCategoryId.clear();
92053
92197
  this._appearances.clear();
@@ -93530,13 +93674,22 @@ ViewCreator2d._sheetModelClasses = [_ModelState__WEBPACK_IMPORTED_MODULE_4__["Sh
93530
93674
  "use strict";
93531
93675
  __webpack_require__.r(__webpack_exports__);
93532
93676
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ViewCreator3d", function() { return ViewCreator3d; });
93533
- /* harmony import */ var _itwin_core_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-common */ "../../core/common/lib/esm/core-common.js");
93534
- /* harmony import */ var _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @itwin/core-geometry */ "../../core/geometry/lib/esm/core-geometry.js");
93535
- /* harmony import */ var _SpatialViewState__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./SpatialViewState */ "../../core/frontend/lib/esm/SpatialViewState.js");
93677
+ /* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
93678
+ /* harmony import */ var _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @itwin/core-common */ "../../core/common/lib/esm/core-common.js");
93679
+ /* harmony import */ var _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @itwin/core-geometry */ "../../core/geometry/lib/esm/core-geometry.js");
93680
+ /* harmony import */ var _SpatialViewState__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./SpatialViewState */ "../../core/frontend/lib/esm/SpatialViewState.js");
93536
93681
  /*---------------------------------------------------------------------------------------------
93537
93682
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
93538
93683
  * See LICENSE.md in the project root for license terms and full copyright notice.
93539
93684
  *--------------------------------------------------------------------------------------------*/
93685
+ /** @packageDocumentation
93686
+ * @module Views
93687
+ */
93688
+ /*
93689
+ API for creating a 3D default view for an iModel.
93690
+ Either takes in a list of modelIds, or displays all 3D models by default.
93691
+ */
93692
+
93540
93693
 
93541
93694
 
93542
93695
 
@@ -93562,7 +93715,7 @@ class ViewCreator3d {
93562
93715
  */
93563
93716
  this._executeQuery = async (query) => {
93564
93717
  const rows = [];
93565
- for await (const row of this._imodel.query(query, undefined, { rowFormat: _itwin_core_common__WEBPACK_IMPORTED_MODULE_0__["QueryRowFormat"].UseJsPropertyNames }))
93718
+ for await (const row of this._imodel.query(query, undefined, { rowFormat: _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__["QueryRowFormat"].UseJsPropertyNames }))
93566
93719
  rows.push(row.id);
93567
93720
  return rows;
93568
93721
  };
@@ -93574,9 +93727,9 @@ class ViewCreator3d {
93574
93727
  * @throws [IModelError]($common) If no 3d models are found in the iModel.
93575
93728
  */
93576
93729
  async createDefaultView(options, modelIds) {
93577
- const models = modelIds !== null && modelIds !== void 0 ? modelIds : await this._getAllModels();
93578
- const props = await this._createViewStateProps(models, options);
93579
- const viewState = _SpatialViewState__WEBPACK_IMPORTED_MODULE_2__["SpatialViewState"].createFromProps(props, this._imodel);
93730
+ const serializedProps = await _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__["IModelReadRpcInterface"].getClientForRouting(this._imodel.routingContext.token).getCustomViewState3dData(this._imodel.getRpcProps(), modelIds === undefined ? {} : { modelIds: _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__["CompressedId64Set"].sortAndCompress(modelIds) });
93731
+ const props = await this._createViewStateProps(_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__["CompressedId64Set"].decompressArray(serializedProps.modelIds), _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__["CompressedId64Set"].decompressArray(serializedProps.categoryIds), _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__["Range3d"].fromJSON(serializedProps.modelExtents), options);
93732
+ const viewState = _SpatialViewState__WEBPACK_IMPORTED_MODULE_3__["SpatialViewState"].createFromProps(props, this._imodel);
93580
93733
  try {
93581
93734
  await viewState.load();
93582
93735
  }
@@ -93593,17 +93746,9 @@ class ViewCreator3d {
93593
93746
  * @param models Models to put in view props
93594
93747
  * @param options view creation options like camera On and skybox On
93595
93748
  */
93596
- async _createViewStateProps(models, options) {
93749
+ async _createViewStateProps(models, categories, modelExtents, options) {
93597
93750
  // Use dictionary model in all props
93598
- const dictionaryId = _itwin_core_common__WEBPACK_IMPORTED_MODULE_0__["IModel"].dictionaryId;
93599
- const categories = await this._getAllCategories();
93600
- // model extents
93601
- const modelExtents = new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__["Range3d"]();
93602
- if (models.length > 0) {
93603
- const modelProps = await this._imodel.models.queryModelRanges(models);
93604
- for (const props of modelProps)
93605
- modelExtents.union(_itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__["Range3d"].fromJSON(props), modelExtents);
93606
- }
93751
+ const dictionaryId = _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__["IModel"].dictionaryId;
93607
93752
  if (modelExtents.isNull)
93608
93753
  modelExtents.setFrom(this._imodel.projectExtents);
93609
93754
  let originX = modelExtents.low.x;
@@ -93628,22 +93773,22 @@ class ViewCreator3d {
93628
93773
  }
93629
93774
  const categorySelectorProps = {
93630
93775
  categories,
93631
- code: _itwin_core_common__WEBPACK_IMPORTED_MODULE_0__["Code"].createEmpty(),
93776
+ code: _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__["Code"].createEmpty(),
93632
93777
  model: dictionaryId,
93633
93778
  classFullName: "BisCore:CategorySelector",
93634
93779
  };
93635
93780
  const modelSelectorProps = {
93636
93781
  models,
93637
- code: _itwin_core_common__WEBPACK_IMPORTED_MODULE_0__["Code"].createEmpty(),
93782
+ code: _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__["Code"].createEmpty(),
93638
93783
  model: dictionaryId,
93639
93784
  classFullName: "BisCore:ModelSelector",
93640
93785
  };
93641
- const cameraData = new _itwin_core_common__WEBPACK_IMPORTED_MODULE_0__["Camera"]();
93786
+ const cameraData = new _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__["Camera"]();
93642
93787
  const cameraOn = (options === null || options === void 0 ? void 0 : options.cameraOn) !== false;
93643
93788
  const viewDefinitionProps = {
93644
93789
  categorySelectorId: "",
93645
93790
  displayStyleId: "",
93646
- code: _itwin_core_common__WEBPACK_IMPORTED_MODULE_0__["Code"].createEmpty(),
93791
+ code: _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__["Code"].createEmpty(),
93647
93792
  model: dictionaryId,
93648
93793
  origin: { x: originX, y: originY, z: originZ },
93649
93794
  extents: { x: deltaX, y: deltaY, z: deltaZ },
@@ -93656,13 +93801,13 @@ class ViewCreator3d {
93656
93801
  },
93657
93802
  };
93658
93803
  const displayStyleProps = {
93659
- code: _itwin_core_common__WEBPACK_IMPORTED_MODULE_0__["Code"].createEmpty(),
93804
+ code: _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__["Code"].createEmpty(),
93660
93805
  model: dictionaryId,
93661
93806
  classFullName: "BisCore:DisplayStyle3d",
93662
93807
  jsonProperties: {
93663
93808
  styles: {
93664
93809
  viewflags: {
93665
- renderMode: _itwin_core_common__WEBPACK_IMPORTED_MODULE_0__["RenderMode"].SmoothShade,
93810
+ renderMode: _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__["RenderMode"].SmoothShade,
93666
93811
  noSourceLights: false,
93667
93812
  noCameraLights: false,
93668
93813
  noSolarLight: false,
@@ -93674,7 +93819,7 @@ class ViewCreator3d {
93674
93819
  environment: options !== undefined &&
93675
93820
  options.skyboxOn !== undefined &&
93676
93821
  options.skyboxOn
93677
- ? _itwin_core_common__WEBPACK_IMPORTED_MODULE_0__["Environment"].defaults.withDisplay({ sky: true }).toJSON()
93822
+ ? _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__["Environment"].defaults.withDisplay({ sky: true }).toJSON()
93678
93823
  : undefined,
93679
93824
  },
93680
93825
  },
@@ -93719,10 +93864,10 @@ class ViewCreator3d {
93719
93864
  async _getDefaultViewId() {
93720
93865
  const viewId = await this._imodel.views.queryDefaultViewId();
93721
93866
  const params = {};
93722
- params.from = _SpatialViewState__WEBPACK_IMPORTED_MODULE_2__["SpatialViewState"].classFullName;
93867
+ params.from = _SpatialViewState__WEBPACK_IMPORTED_MODULE_3__["SpatialViewState"].classFullName;
93723
93868
  params.where = `ECInstanceId=${viewId}`;
93724
93869
  // Check validity of default view
93725
- const viewProps = await _itwin_core_common__WEBPACK_IMPORTED_MODULE_0__["IModelReadRpcInterface"].getClient().queryElementProps(this._imodel.getRpcProps(), params);
93870
+ const viewProps = await _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__["IModelReadRpcInterface"].getClient().queryElementProps(this._imodel.getRpcProps(), params);
93726
93871
  if (viewProps.length === 0) {
93727
93872
  // Return the first view we can find
93728
93873
  const viewList = await this._imodel.views.getViewList({ wantPrivate: false });
@@ -93735,33 +93880,6 @@ class ViewCreator3d {
93735
93880
  }
93736
93881
  return viewId;
93737
93882
  }
93738
- /**
93739
- * Get all categories containing elements
93740
- */
93741
- async _getAllCategories() {
93742
- // Only use categories with elements in them
93743
- const query = `SELECT DISTINCT Category.Id AS id FROM BisCore.GeometricElement3d WHERE Category.Id IN (SELECT ECInstanceId FROM BisCore.SpatialCategory)`;
93744
- const categories = await this._executeQuery(query);
93745
- return categories;
93746
- }
93747
- /**
93748
- * Get all PhysicalModel ids in the connection
93749
- */
93750
- async _getAllModels() {
93751
- // Note: IsNotSpatiallyLocated was introduced in a later version of the BisCore ECSchema.
93752
- // If the iModel has an earlier version, the statement will throw because the property does not exist.
93753
- // If the iModel was created from an earlier version and later upgraded to a newer version, the property may be NULL for models created prior to the upgrade.
93754
- const select = "SELECT ECInstanceId FROM Bis.GeometricModel3D WHERE IsPrivate = false AND IsTemplate = false";
93755
- const spatialCriterion = "AND (IsNotSpatiallyLocated IS NULL OR IsNotSpatiallyLocated = false)";
93756
- let models = [];
93757
- try {
93758
- models = await this._executeQuery(`${select} ${spatialCriterion}`);
93759
- }
93760
- catch {
93761
- models = await this._executeQuery(select);
93762
- }
93763
- return models;
93764
- }
93765
93883
  }
93766
93884
 
93767
93885
 
@@ -94863,19 +94981,37 @@ class ViewState extends _EntityState__WEBPACK_IMPORTED_MODULE_5__["ElementState"
94863
94981
  catch { }
94864
94982
  }
94865
94983
  }
94984
+ /**
94985
+ * Populates the hydrateRequest object stored on the ViewState with:
94986
+ * not loaded categoryIds based off of the ViewStates categorySelector.
94987
+ * Auxiliary coordinate system id if valid.
94988
+ */
94989
+ preload(hydrateRequest) {
94990
+ const acsId = this.getAuxiliaryCoordinateSystemId();
94991
+ if (_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__["Id64"].isValid(acsId))
94992
+ hydrateRequest.acsId = acsId;
94993
+ this.iModel.subcategories.preload(hydrateRequest, this.categorySelector.categories);
94994
+ }
94866
94995
  /** Asynchronously load any required data for this ViewState from the backend.
94996
+ * FINAL, No subclass should override load. If additional load behavior is needed, see preload and postload.
94867
94997
  * @note callers should await the Promise returned by this method before using this ViewState.
94868
94998
  * @see [Views]($docs/learning/frontend/Views.md)
94869
94999
  */
94870
95000
  async load() {
95001
+ const hydrateRequest = {};
95002
+ this.preload(hydrateRequest);
94871
95003
  const promises = [
94872
- this.loadAcs(),
95004
+ _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__["IModelReadRpcInterface"].getClientForRouting(this.iModel.routingContext.token).hydrateViewState(this.iModel.getRpcProps(), hydrateRequest),
94873
95005
  this.displayStyle.load(),
94874
95006
  ];
94875
- const subcategories = this.iModel.subcategories.load(this.categorySelector.categories);
94876
- if (undefined !== subcategories)
94877
- promises.push(subcategories.promise.then((_) => { }));
94878
- await Promise.all(promises);
95007
+ const result = await Promise.all(promises);
95008
+ const hydrateResponse = result[0];
95009
+ await this.postload(hydrateResponse);
95010
+ }
95011
+ async postload(hydrateResponse) {
95012
+ this.iModel.subcategories.postload(hydrateResponse);
95013
+ if (hydrateResponse.acsElementProps)
95014
+ this._auxCoordSystem = _AuxCoordSys__WEBPACK_IMPORTED_MODULE_3__["AuxCoordSystemState"].fromProps(hydrateResponse.acsElementProps, this.iModel);
94879
95015
  }
94880
95016
  /** Returns true if all [[TileTree]]s required by this view have been loaded.
94881
95017
  * Note that the map tile trees associated to the viewport rather than the view, to check the
@@ -96405,9 +96541,19 @@ class ViewState2d extends ViewState {
96405
96541
  computeFitRange() {
96406
96542
  return this.getViewedExtents();
96407
96543
  }
96408
- async load() {
96409
- await super.load();
96410
- return this.iModel.models.load(this.baseModelId);
96544
+ /** @internal */
96545
+ preload(hydrateRequest) {
96546
+ super.preload(hydrateRequest);
96547
+ if (this.iModel.models.getLoaded(this.baseModelId) === undefined)
96548
+ hydrateRequest.baseModelId = this.baseModelId;
96549
+ }
96550
+ /** @internal */
96551
+ async postload(hydrateResponse) {
96552
+ const promises = [];
96553
+ promises.push(super.postload(hydrateResponse));
96554
+ if (hydrateResponse.baseModelProps !== undefined)
96555
+ promises.push(this.iModel.models.updateLoadedWithModelProps([hydrateResponse.baseModelProps]));
96556
+ await Promise.all(promises);
96411
96557
  }
96412
96558
  /** Provides access to optional detail settings for this view. */
96413
96559
  get details() {
@@ -167445,7 +167591,6 @@ class DefaultViewTouchTool extends ViewManip {
167445
167591
  this._startDistance = 0.0;
167446
167592
  this._startTouchCount = 0;
167447
167593
  this._singleTouch = false;
167448
- this._hasZoom = false;
167449
167594
  this._rotate2dDisabled = false;
167450
167595
  this._only2dManipulations = false;
167451
167596
  this._only2dManipulations = only2dManipulations;
@@ -167492,7 +167637,6 @@ class DefaultViewTouchTool extends ViewManip {
167492
167637
  this._startDistance = (2 === ev.touchCount ? this._startDirection.magnitude() : 0.0);
167493
167638
  }
167494
167639
  computeZoomRatio(ev) {
167495
- this._hasZoom = false;
167496
167640
  if (undefined === ev || 0.0 === this._startDistance)
167497
167641
  return 1.0;
167498
167642
  const vp = this.viewport;
@@ -167500,7 +167644,8 @@ class DefaultViewTouchTool extends ViewManip {
167500
167644
  const threshold = this.viewport.pixelsFromInches(_ToolSettings__WEBPACK_IMPORTED_MODULE_22__["ToolSettings"].touchZoomChangeThresholdInches);
167501
167645
  if (0.0 === distance || Math.abs(this._startDistance - distance) < threshold)
167502
167646
  return 1.0;
167503
- this._hasZoom = true;
167647
+ // Remove inertia if the viewing operation includes zoom, only use it for pan and rotate.
167648
+ this._inertiaVec = undefined;
167504
167649
  const adjustedDist = (distance > this._startDistance ? (distance - threshold) : (distance + threshold)); // Avoid sudden jump in zoom scale by subtracting zoom threshold distance...
167505
167650
  return _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__["Geometry"].clamp(this._startDistance / adjustedDist, .1, 10);
167506
167651
  }
@@ -167612,8 +167757,7 @@ class DefaultViewTouchTool extends ViewManip {
167612
167757
  this._lastPtView.setFrom(this._startPtView);
167613
167758
  }
167614
167759
  else {
167615
- // Don't add inertia if the viewing operation included zoom, only do this for pan and rotate.
167616
- if (!samePoint && !this._hasZoom) {
167760
+ if (!samePoint) {
167617
167761
  this._inertiaVec = this._lastPtView.vectorTo(thisPt);
167618
167762
  this._inertiaVec.z = 0;
167619
167763
  }
@@ -167633,6 +167777,10 @@ class DefaultViewTouchTool extends ViewManip {
167633
167777
  }
167634
167778
  async onDataButtonDown(_ev) { return _Tool__WEBPACK_IMPORTED_MODULE_20__["EventHandled"].Yes; }
167635
167779
  async onDataButtonUp(_ev) { return _Tool__WEBPACK_IMPORTED_MODULE_20__["EventHandled"].Yes; }
167780
+ async onTouchStart(ev) {
167781
+ if (undefined !== this.viewport)
167782
+ this.onStart(ev);
167783
+ }
167636
167784
  async onTouchMove(ev) {
167637
167785
  this.handleEvent(ev);
167638
167786
  }
@@ -168126,7 +168274,7 @@ SetupWalkCameraTool.iconSpec = "icon-camera-location";
168126
168274
  /*! exports provided: name, version, description, main, module, typings, license, scripts, repository, keywords, author, peerDependencies, //devDependencies, devDependencies, //dependencies, dependencies, nyc, eslintConfig, default */
168127
168275
  /***/ (function(module) {
168128
168276
 
168129
- module.exports = JSON.parse("{\"name\":\"@itwin/core-frontend\",\"version\":\"3.2.0-dev.40\",\"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\":\"tsc 1>&2 --outDir lib/cjs\",\"build:esm\":\"tsc 1>&2 --module ES2020 --outDir lib/esm\",\"clean\":\"rimraf lib .rush/temp/package-deps*.json\",\"copy:public\":\"cpx \\\"./src/public/**/*\\\" ./lib/public\",\"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.2.0-dev.40\",\"@itwin/core-bentley\":\"workspace:^3.2.0-dev.40\",\"@itwin/core-common\":\"workspace:^3.2.0-dev.40\",\"@itwin/core-geometry\":\"workspace:^3.2.0-dev.40\",\"@itwin/core-orbitgt\":\"workspace:^3.2.0-dev.40\",\"@itwin/core-quantity\":\"workspace:^3.2.0-dev.40\",\"@itwin/webgl-compatibility\":\"workspace:^3.2.0-dev.40\"},\"//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.1.4\",\"@types/chai-as-promised\":\"^7\",\"@types/deep-assign\":\"^0.1.0\",\"@types/lodash\":\"^4.14.0\",\"@types/mocha\":\"^8.2.2\",\"@types/node\":\"14.14.31\",\"@types/qs\":\"^6.5.0\",\"@types/semver\":\"^5.5.0\",\"@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\":\"^8.3.2\",\"nyc\":\"^15.1.0\",\"rimraf\":\"^3.0.2\",\"sinon\":\"^9.0.2\",\"source-map-loader\":\"^1.0.0\",\"typescript\":\"~4.4.0\",\"webpack\":\"4.42.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/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\":\"^5.5.0\",\"superagent\":\"^7.0.1\",\"wms-capabilities\":\"0.4.0\",\"xml-js\":\"~1.6.11\"},\"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\",\"**/test/**/*.tsx\"],\"rules\":{\"@itwin/no-internal-barrel-imports\":\"off\"}}]}}");
168277
+ module.exports = JSON.parse("{\"name\":\"@itwin/core-frontend\",\"version\":\"3.2.0-dev.43\",\"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\":\"tsc 1>&2 --outDir lib/cjs\",\"build:esm\":\"tsc 1>&2 --module ES2020 --outDir lib/esm\",\"clean\":\"rimraf lib .rush/temp/package-deps*.json\",\"copy:public\":\"cpx \\\"./src/public/**/*\\\" ./lib/public\",\"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.2.0-dev.43\",\"@itwin/core-bentley\":\"workspace:^3.2.0-dev.43\",\"@itwin/core-common\":\"workspace:^3.2.0-dev.43\",\"@itwin/core-geometry\":\"workspace:^3.2.0-dev.43\",\"@itwin/core-orbitgt\":\"workspace:^3.2.0-dev.43\",\"@itwin/core-quantity\":\"workspace:^3.2.0-dev.43\",\"@itwin/webgl-compatibility\":\"workspace:^3.2.0-dev.43\"},\"//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.1.4\",\"@types/chai-as-promised\":\"^7\",\"@types/deep-assign\":\"^0.1.0\",\"@types/lodash\":\"^4.14.0\",\"@types/mocha\":\"^8.2.2\",\"@types/node\":\"14.14.31\",\"@types/qs\":\"^6.5.0\",\"@types/semver\":\"^5.5.0\",\"@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\":\"^8.3.2\",\"nyc\":\"^15.1.0\",\"rimraf\":\"^3.0.2\",\"sinon\":\"^9.0.2\",\"source-map-loader\":\"^1.0.0\",\"typescript\":\"~4.4.0\",\"webpack\":\"4.42.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/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\":\"^5.5.0\",\"superagent\":\"^7.0.1\",\"wms-capabilities\":\"0.4.0\",\"xml-js\":\"~1.6.11\"},\"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\",\"**/test/**/*.tsx\"],\"rules\":{\"@itwin/no-internal-barrel-imports\":\"off\"}}]}}");
168130
168278
 
168131
168279
  /***/ }),
168132
168280
 
@@ -246433,7 +246581,7 @@ class XYParitySearchContext {
246433
246581
  "use strict";
246434
246582
  __webpack_require__.r(__webpack_exports__);
246435
246583
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ITwinLocalization", function() { return ITwinLocalization; });
246436
- /* harmony import */ var i18next__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! i18next */ "../../common/temp/node_modules/.pnpm/i18next@21.6.14/node_modules/i18next/dist/esm/i18next.js");
246584
+ /* harmony import */ var i18next__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! i18next */ "../../common/temp/node_modules/.pnpm/i18next@21.6.16/node_modules/i18next/dist/esm/i18next.js");
246437
246585
  /* harmony import */ var i18next_browser_languagedetector__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! i18next-browser-languagedetector */ "../../common/temp/node_modules/.pnpm/i18next-browser-languagedetector@6.1.4/node_modules/i18next-browser-languagedetector/dist/esm/i18nextBrowserLanguageDetector.js");
246438
246586
  /* harmony import */ var i18next_xhr_backend__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! i18next-xhr-backend */ "../../common/temp/node_modules/.pnpm/i18next-xhr-backend@3.2.2/node_modules/i18next-xhr-backend/dist/esm/i18nextXHRBackend.js");
246439
246587
  /* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
@@ -280681,6 +280829,27 @@ describe("IModelReadRpcInterface Methods from an IModelConnection", () => {
280681
280829
  const result = await core_common_1.IModelReadRpcInterface.getClient().getMassProperties(iModel.getRpcProps(), requestProps);
280682
280830
  expect(result).to.not.be.null;
280683
280831
  });
280832
+ it("getMassPropertiesPerCandidate should be able to process multiple elements", async () => {
280833
+ const candidates = [...await iModel.elements.queryIds({ from: "BisCore.GeometricElement3d", limit: 2, where: "GeometryStream IS NOT NULL" })];
280834
+ expect(candidates.length).to.be.equal(2);
280835
+ const requestProps = {
280836
+ operations: [core_common_1.MassPropertiesOperation.AccumulateVolumes],
280837
+ candidates: core_bentley_1.CompressedId64Set.compressIds(candidates),
280838
+ };
280839
+ const result = await core_common_1.IModelReadRpcInterface.getClient().getMassPropertiesPerCandidate(iModel.getRpcProps(), requestProps);
280840
+ expect(result).to.not.be.null;
280841
+ expect(result.length).to.be.equal(2);
280842
+ const candidate1Result = result.find((r) => r.candidate === candidates[0]);
280843
+ const candidate2Result = result.find((r) => r.candidate === candidates[1]);
280844
+ expect(candidate1Result).to.not.be.undefined;
280845
+ expect(candidate2Result).to.not.be.undefined;
280846
+ expect(candidate1Result === null || candidate1Result === void 0 ? void 0 : candidate1Result.status).to.be.equal(core_bentley_1.BentleyStatus.SUCCESS);
280847
+ expect(candidate2Result === null || candidate2Result === void 0 ? void 0 : candidate2Result.status).to.be.equal(core_bentley_1.BentleyStatus.SUCCESS);
280848
+ const expectedCandidate1Result = await core_common_1.IModelReadRpcInterface.getClient().getMassProperties(iModel.getRpcProps(), { operation: core_common_1.MassPropertiesOperation.AccumulateVolumes, candidates: [candidates[0]] });
280849
+ const expectedCandidate2Result = await core_common_1.IModelReadRpcInterface.getClient().getMassProperties(iModel.getRpcProps(), { operation: core_common_1.MassPropertiesOperation.AccumulateVolumes, candidates: [candidates[1]] });
280850
+ expect(candidate1Result).to.deep.eq(Object.assign(Object.assign({}, expectedCandidate1Result), { candidate: candidates[0] }));
280851
+ expect(candidate2Result).to.deep.eq(Object.assign(Object.assign({}, expectedCandidate2Result), { candidate: candidates[1] }));
280852
+ });
280684
280853
  });
280685
280854
  describe("Snapping", () => {
280686
280855
  let iModel;
@@ -281016,6 +281185,11 @@ describe("IModel Views", () => {
281016
281185
  const viewState = await views.load(props[0].id);
281017
281186
  expect(viewState).to.exist.and.be.not.empty;
281018
281187
  });
281188
+ it("should create viewstate3d using viewcreator3d", async () => {
281189
+ const viewcreator3d = new core_frontend_1.ViewCreator3d(iModel);
281190
+ const viewState = await viewcreator3d.createDefaultView();
281191
+ expect(viewState).to.exist.and.be.not.empty;
281192
+ });
281019
281193
  });
281020
281194
 
281021
281195
 
@@ -281202,7 +281376,7 @@ class TestContext {
281202
281376
  this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
281203
281377
  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` } });
281204
281378
  await core_frontend_1.NoRenderApp.startup({
281205
- applicationVersion: "3.2.0-dev.40",
281379
+ applicationVersion: "3.2.0-dev.43",
281206
281380
  applicationId: this.settings.gprid,
281207
281381
  authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.adminUserAccessToken),
281208
281382
  hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),