@itwin/rpcinterface-full-stack-tests 5.15.0-dev.18 → 5.15.0-dev.19
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 +46 -8
- package/lib/dist/bundled-tests.js.map +1 -1
- package/package.json +14 -14
|
@@ -181918,7 +181918,12 @@ var QuantityType;
|
|
|
181918
181918
|
class AlternateUnitLabelsRegistry {
|
|
181919
181919
|
_alternateLabelRegistry = new Map();
|
|
181920
181920
|
addAlternateLabels(key, ...labels) {
|
|
181921
|
-
|
|
181921
|
+
let entry = this._alternateLabelRegistry.get(key);
|
|
181922
|
+
if (!entry) {
|
|
181923
|
+
entry = new Set();
|
|
181924
|
+
this._alternateLabelRegistry.set(key, entry);
|
|
181925
|
+
}
|
|
181926
|
+
labels.forEach((value) => entry.add(value));
|
|
181922
181927
|
}
|
|
181923
181928
|
constructor(defaultAlternates) {
|
|
181924
181929
|
if (defaultAlternates) {
|
|
@@ -182721,7 +182726,7 @@ class QuantityFormatter {
|
|
|
182721
182726
|
const entry = this.quantityTypesRegistry.get(quantityKey);
|
|
182722
182727
|
if (!entry)
|
|
182723
182728
|
throw new Error(`Unable to find registered quantity type with key ${quantityKey}`);
|
|
182724
|
-
return entry.generateParserSpec(this.getFormatPropsByQuantityTypeEntryAndSystem(entry, requestedSystem), this.unitsProvider);
|
|
182729
|
+
return entry.generateParserSpec(this.getFormatPropsByQuantityTypeEntryAndSystem(entry, requestedSystem), this.unitsProvider, this.alternateUnitLabelsProvider);
|
|
182725
182730
|
}
|
|
182726
182731
|
/** Asynchronous Call to get a ParserSpec for a QuantityType.
|
|
182727
182732
|
* @param type One of the built-in quantity types supported.
|
|
@@ -182869,7 +182874,7 @@ class QuantityFormatter {
|
|
|
182869
182874
|
const { persistenceUnitName, formatProps, formatName } = props;
|
|
182870
182875
|
const persistenceUnitProps = await this._unitsProvider.findUnitByName(persistenceUnitName);
|
|
182871
182876
|
const format = await _itwin_core_quantity__WEBPACK_IMPORTED_MODULE_1__.Format.createFromJSON(formatName ?? "temp", this._unitsProvider, formatProps);
|
|
182872
|
-
return _itwin_core_quantity__WEBPACK_IMPORTED_MODULE_1__.ParserSpec.create(format, this._unitsProvider, persistenceUnitProps);
|
|
182877
|
+
return _itwin_core_quantity__WEBPACK_IMPORTED_MODULE_1__.ParserSpec.create(format, this._unitsProvider, persistenceUnitProps, this.alternateUnitLabelsProvider);
|
|
182873
182878
|
}
|
|
182874
182879
|
/**
|
|
182875
182880
|
* @beta
|
|
@@ -183411,6 +183416,9 @@ const UNIT_EXTRA_DATA = [
|
|
|
183411
183416
|
{ name: "Units.CUB_US_SURVEY_FT", altDisplayLabels: ["cf"] },
|
|
183412
183417
|
{ name: "Units.CUB_YRD", altDisplayLabels: ["cy"] },
|
|
183413
183418
|
{ name: "Units.CUB_M", altDisplayLabels: ["cm"] },
|
|
183419
|
+
// Velocity ( base unit m/s )
|
|
183420
|
+
{ name: "Units.KM_PER_HR", altDisplayLabels: ["kph", "kmh"] },
|
|
183421
|
+
{ name: "Units.MPH", altDisplayLabels: ["mph"] },
|
|
183414
183422
|
];
|
|
183415
183423
|
|
|
183416
183424
|
|
|
@@ -210216,7 +210224,14 @@ class ToolAdmin {
|
|
|
210216
210224
|
return false;
|
|
210217
210225
|
if (!await this.finishEditCommandForTxnOperation())
|
|
210218
210226
|
return false;
|
|
210219
|
-
|
|
210227
|
+
try {
|
|
210228
|
+
await imodel.txns.reverseSingleTxnAsync();
|
|
210229
|
+
return true;
|
|
210230
|
+
}
|
|
210231
|
+
catch (error) {
|
|
210232
|
+
await this.onTxnOperationError("undo", error);
|
|
210233
|
+
return false;
|
|
210234
|
+
}
|
|
210220
210235
|
}
|
|
210221
210236
|
/** Called to redo previous data button for primitive tools or undo last write operation. */
|
|
210222
210237
|
async doRedoOperation() {
|
|
@@ -210231,8 +210246,22 @@ class ToolAdmin {
|
|
|
210231
210246
|
return false;
|
|
210232
210247
|
if (!await this.finishEditCommandForTxnOperation())
|
|
210233
210248
|
return false;
|
|
210234
|
-
|
|
210249
|
+
try {
|
|
210250
|
+
await imodel.txns.reinstateTxnAsync();
|
|
210251
|
+
return true;
|
|
210252
|
+
}
|
|
210253
|
+
catch (error) {
|
|
210254
|
+
await this.onTxnOperationError("redo", error);
|
|
210255
|
+
return false;
|
|
210256
|
+
}
|
|
210235
210257
|
}
|
|
210258
|
+
/** Called when [[doUndoOperation]] or [[doRedoOperation]] fails to reverse or reinstate a Txn.
|
|
210259
|
+
* @param _operation The operation that failed.
|
|
210260
|
+
* @param _error The error thrown by [[BriefcaseTxns.reverseSingleTxnAsync]] or [[BriefcaseTxns.reinstateTxnAsync]].
|
|
210261
|
+
* @note Implementations should not throw. Any exception thrown by this method propagates to the caller of [[doUndoOperation]] or [[doRedoOperation]].
|
|
210262
|
+
* @beta
|
|
210263
|
+
*/
|
|
210264
|
+
async onTxnOperationError(_operation, _error) { }
|
|
210236
210265
|
onActiveToolChanged(tool, start) {
|
|
210237
210266
|
this.clearMotionPromises();
|
|
210238
210267
|
this.activeToolChanged.raiseEvent(tool, start);
|
|
@@ -337456,7 +337485,16 @@ class Parser {
|
|
|
337456
337485
|
// Don't add space when the wip token is empty.
|
|
337457
337486
|
continue;
|
|
337458
337487
|
}
|
|
337459
|
-
|
|
337488
|
+
// A slash directly between two label characters (e.g. "km/h") is part of the label, not a division.
|
|
337489
|
+
const nextCharCode = str.charCodeAt(i + 1);
|
|
337490
|
+
const isUnitLabelSlash = charCode === _Constants__WEBPACK_IMPORTED_MODULE_1__.QuantityConstants.CHAR_SLASH &&
|
|
337491
|
+
wipToken.length > 0 &&
|
|
337492
|
+
i + 1 < str.length &&
|
|
337493
|
+
!/\s/.test(str[i - 1]) &&
|
|
337494
|
+
!/\s/.test(str[i + 1]) &&
|
|
337495
|
+
!Parser.isDigitOrDecimalSeparator(nextCharCode, format) &&
|
|
337496
|
+
!isOperator(nextCharCode);
|
|
337497
|
+
if (isCharOperator && !isUnitLabelSlash) {
|
|
337460
337498
|
if (wipToken.length > 0) {
|
|
337461
337499
|
// There is a token is progress, process it now, before adding the new operator token.
|
|
337462
337500
|
tokens.push(new ParseToken(wipToken));
|
|
@@ -344426,7 +344464,7 @@ class TestContext {
|
|
|
344426
344464
|
this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
|
|
344427
344465
|
const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${process.env.IMJS_URL_PREFIX ?? ""}api.bentley.com/imodels` } });
|
|
344428
344466
|
await core_frontend_1.NoRenderApp.startup({
|
|
344429
|
-
applicationVersion: "5.15.0-dev.
|
|
344467
|
+
applicationVersion: "5.15.0-dev.19",
|
|
344430
344468
|
applicationId: this.settings.gprid,
|
|
344431
344469
|
authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.serviceAuthToken),
|
|
344432
344470
|
hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
|
|
@@ -371038,7 +371076,7 @@ class WMS {
|
|
|
371038
371076
|
(module) {
|
|
371039
371077
|
|
|
371040
371078
|
"use strict";
|
|
371041
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.15.0-dev.
|
|
371079
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.15.0-dev.19","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 build: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: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 build:test-worker && vitest --run","cover":"npm run build:test-worker && vitest --run","build:test-worker":"vite build --config ./src/test/worker/vite.config.mts 1>&2","build:workers":"rimraf lib/workers/webpack && vite build --config ./src/workers/ImdlParser/vite.config.mts 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.12","@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/node":"~20.17.0","@types/sinon":"^17.0.2","@vitest/browser-playwright":"^4.1.10","@vitest/coverage-v8":"^4.1.10","cpx2":"^8.0.0","eslint":"^9.31.0","playwright":"~1.56.1","rimraf":"^6.0.1","sinon":"^17.0.2","typescript":"~5.6.2","vite":"^6.4.4","vitest":"^4.1.10"},"//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.4.5","@loaders.gl/draco":"^4.4.5","fuse.js":"^3.3.0","wms-capabilities":"0.6.0"}}');
|
|
371042
371080
|
|
|
371043
371081
|
/***/ },
|
|
371044
371082
|
|