@itwin/rpcinterface-full-stack-tests 3.2.0-dev.42 → 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
  }
@@ -70358,6 +70358,7 @@ class IModelReadRpcInterface extends _RpcInterface__WEBPACK_IMPORTED_MODULE_0__[
70358
70358
  async cancelSnap(_iModelToken, _sessionId) { return this.forward(arguments); }
70359
70359
  async getGeometryContainment(_iModelToken, _props) { return this.forward(arguments); }
70360
70360
  async getMassProperties(_iModelToken, _props) { return this.forward(arguments); }
70361
+ async getMassPropertiesPerCandidate(_iModelToken, _props) { return this.forward(arguments); }
70361
70362
  async getIModelCoordinatesFromGeoCoordinates(_iModelToken, _props) { return this.forward(arguments); }
70362
70363
  async getGeoCoordinatesFromIModelCoordinates(_iModelToken, _props) { return this.forward(arguments); }
70363
70364
  async getGeometrySummary(_iModelToken, _props) { return this.forward(arguments); }
@@ -70369,7 +70370,7 @@ class IModelReadRpcInterface extends _RpcInterface__WEBPACK_IMPORTED_MODULE_0__[
70369
70370
  /** The immutable name of the interface. */
70370
70371
  IModelReadRpcInterface.interfaceName = "IModelReadRpcInterface";
70371
70372
  /** The semantic version of the interface. */
70372
- IModelReadRpcInterface.interfaceVersion = "3.0.0";
70373
+ IModelReadRpcInterface.interfaceVersion = "3.1.0";
70373
70374
 
70374
70375
 
70375
70376
  /***/ }),
@@ -86420,8 +86421,14 @@ class IModelConnection extends _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__["
86420
86421
  }
86421
86422
  return undefined;
86422
86423
  }
86423
- /** 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
+ */
86424
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
+ }
86425
86432
  /** Convert a point in this iModel's Spatial coordinates to a [[Cartographic]] using the Geographic location services for this IModelConnection.
86426
86433
  * @param spatial A point in the iModel's spatial coordinates
86427
86434
  * @param result If defined, use this for output
@@ -96542,9 +96549,11 @@ class ViewState2d extends ViewState {
96542
96549
  }
96543
96550
  /** @internal */
96544
96551
  async postload(hydrateResponse) {
96545
- if (hydrateResponse.baseModelProps === undefined)
96546
- return;
96547
- await this.iModel.models.updateLoadedWithModelProps([hydrateResponse.baseModelProps]);
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);
96548
96557
  }
96549
96558
  /** Provides access to optional detail settings for this view. */
96550
96559
  get details() {
@@ -168265,7 +168274,7 @@ SetupWalkCameraTool.iconSpec = "icon-camera-location";
168265
168274
  /*! exports provided: name, version, description, main, module, typings, license, scripts, repository, keywords, author, peerDependencies, //devDependencies, devDependencies, //dependencies, dependencies, nyc, eslintConfig, default */
168266
168275
  /***/ (function(module) {
168267
168276
 
168268
- module.exports = JSON.parse("{\"name\":\"@itwin/core-frontend\",\"version\":\"3.2.0-dev.42\",\"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.42\",\"@itwin/core-bentley\":\"workspace:^3.2.0-dev.42\",\"@itwin/core-common\":\"workspace:^3.2.0-dev.42\",\"@itwin/core-geometry\":\"workspace:^3.2.0-dev.42\",\"@itwin/core-orbitgt\":\"workspace:^3.2.0-dev.42\",\"@itwin/core-quantity\":\"workspace:^3.2.0-dev.42\",\"@itwin/webgl-compatibility\":\"workspace:^3.2.0-dev.42\"},\"//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\"}}]}}");
168269
168278
 
168270
168279
  /***/ }),
168271
168280
 
@@ -246572,7 +246581,7 @@ class XYParitySearchContext {
246572
246581
  "use strict";
246573
246582
  __webpack_require__.r(__webpack_exports__);
246574
246583
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ITwinLocalization", function() { return ITwinLocalization; });
246575
- /* 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");
246576
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");
246577
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");
246578
246587
  /* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
@@ -280820,6 +280829,27 @@ describe("IModelReadRpcInterface Methods from an IModelConnection", () => {
280820
280829
  const result = await core_common_1.IModelReadRpcInterface.getClient().getMassProperties(iModel.getRpcProps(), requestProps);
280821
280830
  expect(result).to.not.be.null;
280822
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
+ });
280823
280853
  });
280824
280854
  describe("Snapping", () => {
280825
280855
  let iModel;
@@ -281346,7 +281376,7 @@ class TestContext {
281346
281376
  this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
281347
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` } });
281348
281378
  await core_frontend_1.NoRenderApp.startup({
281349
- applicationVersion: "3.2.0-dev.42",
281379
+ applicationVersion: "3.2.0-dev.43",
281350
281380
  applicationId: this.settings.gprid,
281351
281381
  authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.adminUserAccessToken),
281352
281382
  hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),