@itwin/ecschema-rpcinterface-tests 5.8.0-dev.12 → 5.8.0-dev.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/dist/bundled-tests.js +24 -22
- package/lib/dist/bundled-tests.js.map +1 -1
- package/lib/dist/core_frontend_lib_esm_ApproximateTerrainHeightsProps_js.bundled-tests.js.map +1 -1
- package/lib/dist/vendors-common_temp_node_modules_pnpm_cross-fetch_4_0_0_node_modules_cross-fetch_dist_browser-24291b.bundled-tests.js.map +1 -1
- package/lib/dist/vendors-common_temp_node_modules_pnpm_loaders_gl_draco_4_3_4__loaders_gl_core_4_3_4_node_modu-4c1fc9.bundled-tests.js.map +1 -1
- package/package.json +15 -15
|
@@ -157442,6 +157442,11 @@ class QuantityFormatter {
|
|
|
157442
157442
|
* @internal
|
|
157443
157443
|
*/
|
|
157444
157444
|
async onInitialized() {
|
|
157445
|
+
// Remove any existing listener before re-registering to avoid duplicates when called via setUnitsProvider.
|
|
157446
|
+
if (this._removeFormatsProviderListener) {
|
|
157447
|
+
this._removeFormatsProviderListener();
|
|
157448
|
+
this._removeFormatsProviderListener = undefined;
|
|
157449
|
+
}
|
|
157445
157450
|
await this.initializeQuantityTypesRegistry();
|
|
157446
157451
|
const initialKoQs = [["DefaultToolsUnits.LENGTH", "Units.M"], ["DefaultToolsUnits.ANGLE", "Units.RAD"], ["DefaultToolsUnits.AREA", "Units.SQ_M"], ["DefaultToolsUnits.VOLUME", "Units.CUB_M"], ["DefaultToolsUnits.LENGTH_COORDINATE", "Units.M"], ["CivilUnits.STATION", "Units.M"], ["CivilUnits.LENGTH", "Units.M"], ["AecUnits.LENGTH", "Units.M"]];
|
|
157447
157452
|
for (const entry of initialKoQs) {
|
|
@@ -157510,7 +157515,11 @@ class QuantityFormatter {
|
|
|
157510
157515
|
set unitsProvider(unitsProvider) {
|
|
157511
157516
|
this.setUnitsProvider(unitsProvider); // eslint-disable-line @typescript-eslint/no-floating-promises
|
|
157512
157517
|
}
|
|
157513
|
-
/**
|
|
157518
|
+
/**
|
|
157519
|
+
* Async method to set a units provider and reload caches.
|
|
157520
|
+
* @note If the active primitive tool may be holding stale unit data, callers should follow this with
|
|
157521
|
+
* `IModelApp.toolAdmin.restartPrimitiveTool()` to allow the tool to reinitialize itself.
|
|
157522
|
+
*/
|
|
157514
157523
|
async setUnitsProvider(unitsProvider) {
|
|
157515
157524
|
this._unitsProvider = unitsProvider;
|
|
157516
157525
|
try {
|
|
@@ -157524,12 +157533,14 @@ class QuantityFormatter {
|
|
|
157524
157533
|
await _IModelApp__WEBPACK_IMPORTED_MODULE_3__.IModelApp.quantityFormatter.resetToUseInternalUnitsProvider();
|
|
157525
157534
|
return;
|
|
157526
157535
|
}
|
|
157527
|
-
// force default tool to start so any tool that may be using cached data will not be using bad data.
|
|
157528
|
-
if (_IModelApp__WEBPACK_IMPORTED_MODULE_3__.IModelApp.toolAdmin)
|
|
157529
|
-
await _IModelApp__WEBPACK_IMPORTED_MODULE_3__.IModelApp.toolAdmin.startDefaultTool();
|
|
157530
157536
|
this.onUnitsProviderChanged.emit();
|
|
157531
157537
|
}
|
|
157532
|
-
/**
|
|
157538
|
+
/**
|
|
157539
|
+
* Async call typically used after an iModel is closed to reset the UnitsProvider to the default one
|
|
157540
|
+
* that does not require a Units schema.
|
|
157541
|
+
* @note If the active primitive tool may be holding stale unit data, callers should follow this with
|
|
157542
|
+
* `IModelApp.toolAdmin.restartPrimitiveTool()` to allow the tool to reinitialize itself.
|
|
157543
|
+
*/
|
|
157533
157544
|
async resetToUseInternalUnitsProvider() {
|
|
157534
157545
|
if (this._unitsProvider instanceof _BasicUnitsProvider__WEBPACK_IMPORTED_MODULE_4__.BasicUnitsProvider)
|
|
157535
157546
|
return;
|
|
@@ -157899,7 +157910,7 @@ const DEFAULT_FORMATKEY_BY_UNIT_SYSTEM = [
|
|
|
157899
157910
|
{ type: getQuantityTypeKey(QuantityType.Coordinate), formatKey: "[units:length]meter2" },
|
|
157900
157911
|
{ type: getQuantityTypeKey(QuantityType.Stationing), formatKey: "[units:length]m-sta2" },
|
|
157901
157912
|
{ type: getQuantityTypeKey(QuantityType.LengthSurvey), formatKey: "[units:length]meter4" },
|
|
157902
|
-
{ type: getQuantityTypeKey(QuantityType.LengthEngineering), formatKey: "[units:length]
|
|
157913
|
+
{ type: getQuantityTypeKey(QuantityType.LengthEngineering), formatKey: "[units:length]meter4" },
|
|
157903
157914
|
],
|
|
157904
157915
|
},
|
|
157905
157916
|
{
|
|
@@ -157961,20 +157972,6 @@ const DEFAULT_FORMATPROPS = [
|
|
|
157961
157972
|
type: "Decimal",
|
|
157962
157973
|
},
|
|
157963
157974
|
},
|
|
157964
|
-
{
|
|
157965
|
-
key: "[units:length]millimeter3",
|
|
157966
|
-
description: "millimeters (labeled) 3 decimal places",
|
|
157967
|
-
format: {
|
|
157968
|
-
composite: {
|
|
157969
|
-
includeZero: true,
|
|
157970
|
-
spacer: "",
|
|
157971
|
-
units: [{ label: "mm", name: "Units.MM" }],
|
|
157972
|
-
},
|
|
157973
|
-
formatTraits: ["keepSingleZero", "showUnitLabel"],
|
|
157974
|
-
precision: 3,
|
|
157975
|
-
type: "Decimal",
|
|
157976
|
-
},
|
|
157977
|
-
},
|
|
157978
157975
|
{
|
|
157979
157976
|
key: "[units:length]meter2",
|
|
157980
157977
|
description: "meters (labeled) 2 decimal places",
|
|
@@ -183680,7 +183677,12 @@ class ToolAdmin {
|
|
|
183680
183677
|
await this.setPrimitiveTool(newTool);
|
|
183681
183678
|
}
|
|
183682
183679
|
// it is important to raise event after setPrimitiveTool is called
|
|
183683
|
-
|
|
183680
|
+
const activeTool = newTool ?? this._idleTool;
|
|
183681
|
+
// _idleTool is cleared during onShutDown(); skip the event if shutdown has already run
|
|
183682
|
+
// to avoid emitting activeToolChanged with an undefined tool.
|
|
183683
|
+
if (undefined === activeTool)
|
|
183684
|
+
return;
|
|
183685
|
+
this.onActiveToolChanged(activeTool, StartOrResume.Start);
|
|
183684
183686
|
}
|
|
183685
183687
|
finally {
|
|
183686
183688
|
if (resolveStarting)
|
|
@@ -324586,7 +324588,7 @@ var loadLanguages = instance.loadLanguages;
|
|
|
324586
324588
|
/***/ ((module) => {
|
|
324587
324589
|
|
|
324588
324590
|
"use strict";
|
|
324589
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.8.0-dev.
|
|
324591
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.8.0-dev.14","description":"iTwin.js frontend components","main":"lib/cjs/core-frontend.js","module":"lib/esm/core-frontend.js","typings":"lib/cjs/core-frontend","license":"MIT","scripts":{"build":"npm run -s copy:public && npm run -s build:cjs && npm run -s build:esm && npm run -s webpackWorkers && npm run -s copy:workers && npm run -s copy:draco","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 ES2022 --outDir lib/esm","clean":"rimraf -g lib .rush/temp/package-deps*.json","copy:public":"cpx \\"./src/public/**/*\\" ./lib/public","copy:js:cjs":"cpx \\"./src/**/*.js\\" ./lib/cjs","copy:js:esm":"cpx \\"./src/**/*.js\\" ./lib/esm","copy:workers":"cpx \\"./lib/workers/webpack/parse-imdl-worker.js\\" ./lib/public/scripts","copy:draco":"cpx \\"./node_modules/@loaders.gl/draco/dist/libs/*\\" ./lib/public/scripts","docs":"betools docs --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/map/*.d.ts,**/tile/*.d.ts,**/*-css.ts && npm run -s extract","extract":"betools extract --fileExt=ts --extractFrom=./src/test/example-code --recursive --out=../../generated-docs/extract","extract-api":"betools extract-api --entry=core-frontend && npm run extract-extension-api","extract-extension-api":"eslint --no-inline-config -c extraction.eslint.config.js \\"./src/**/*.ts\\" 1>&2","lint":"eslint \\"./src/**/*.ts\\" 1>&2","lint-fix":"eslint --fix -f visualstudio \\"./src/**/*.ts\\" 1>&2","lint-deprecation":"eslint --fix -f visualstudio --no-inline-config -c ../../common/config/eslint/eslint.config.deprecation-policy.js \\"./src/**/*.ts\\"","pseudolocalize":"betools pseudolocalize --englishDir ./src/public/locales/en --out ./public/locales/en-PSEUDO","test":"npm run webpackTestWorker && vitest --run","cover":"npm run webpackTestWorker && vitest --run","webpackTests":"webpack --config ./src/test/utils/webpack.config.js 1>&2 && npm run -s webpackTestWorker","webpackTestWorker":"webpack --config ./src/test/worker/webpack.config.js 1>&2 && cpx \\"./lib/test/test-worker.js\\" ./lib/test","webpackWorkers":"webpack --config ./src/workers/ImdlParser/webpack.config.js 1>&2"},"repository":{"type":"git","url":"https://github.com/iTwin/itwinjs-core.git","directory":"core/frontend"},"keywords":["Bentley","BIM","iModel","digital-twin","iTwin"],"author":{"name":"Bentley Systems, Inc.","url":"http://www.bentley.com"},"peerDependencies":{"@itwin/appui-abstract":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/ecschema-metadata":"workspace:*","@itwin/ecschema-rpcinterface-common":"workspace:*"},"//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":{"@bentley/aec-units-schema":"^1.0.3","@bentley/formats-schema":"^1.0.0","@bentley/units-schema":"^1.0.9","@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/ecschema-metadata":"workspace:*","@itwin/ecschema-rpcinterface-common":"workspace:*","@itwin/object-storage-core":"^3.0.4","@itwin/eslint-plugin":"^6.0.0","@types/chai-as-promised":"^7","@types/draco3d":"^1.4.10","@types/sinon":"^17.0.2","@vitest/browser":"^3.0.6","@vitest/coverage-v8":"^3.0.6","cpx2":"^8.0.0","eslint":"^9.31.0","glob":"^10.5.0","playwright":"~1.56.1","rimraf":"^6.0.1","sinon":"^17.0.2","source-map-loader":"^5.0.0","typescript":"~5.6.2","vitest":"^3.0.6","vite-multiple-assets":"^1.3.1","vite-plugin-static-copy":"2.2.0","webpack":"^5.97.1"},"//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/webgl-compatibility":"workspace:*","@loaders.gl/core":"^4.3.4","@loaders.gl/draco":"^4.3.4","fuse.js":"^3.3.0","wms-capabilities":"0.4.0"}}');
|
|
324590
324592
|
|
|
324591
324593
|
/***/ })
|
|
324592
324594
|
|