@itwin/ecschema-rpcinterface-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 +45 -7
- package/lib/dist/bundled-tests.js.map +1 -1
- package/package.json +16 -16
|
@@ -161753,7 +161753,12 @@ var QuantityType;
|
|
|
161753
161753
|
class AlternateUnitLabelsRegistry {
|
|
161754
161754
|
_alternateLabelRegistry = new Map();
|
|
161755
161755
|
addAlternateLabels(key, ...labels) {
|
|
161756
|
-
|
|
161756
|
+
let entry = this._alternateLabelRegistry.get(key);
|
|
161757
|
+
if (!entry) {
|
|
161758
|
+
entry = new Set();
|
|
161759
|
+
this._alternateLabelRegistry.set(key, entry);
|
|
161760
|
+
}
|
|
161761
|
+
labels.forEach((value) => entry.add(value));
|
|
161757
161762
|
}
|
|
161758
161763
|
constructor(defaultAlternates) {
|
|
161759
161764
|
if (defaultAlternates) {
|
|
@@ -162556,7 +162561,7 @@ class QuantityFormatter {
|
|
|
162556
162561
|
const entry = this.quantityTypesRegistry.get(quantityKey);
|
|
162557
162562
|
if (!entry)
|
|
162558
162563
|
throw new Error(`Unable to find registered quantity type with key ${quantityKey}`);
|
|
162559
|
-
return entry.generateParserSpec(this.getFormatPropsByQuantityTypeEntryAndSystem(entry, requestedSystem), this.unitsProvider);
|
|
162564
|
+
return entry.generateParserSpec(this.getFormatPropsByQuantityTypeEntryAndSystem(entry, requestedSystem), this.unitsProvider, this.alternateUnitLabelsProvider);
|
|
162560
162565
|
}
|
|
162561
162566
|
/** Asynchronous Call to get a ParserSpec for a QuantityType.
|
|
162562
162567
|
* @param type One of the built-in quantity types supported.
|
|
@@ -162704,7 +162709,7 @@ class QuantityFormatter {
|
|
|
162704
162709
|
const { persistenceUnitName, formatProps, formatName } = props;
|
|
162705
162710
|
const persistenceUnitProps = await this._unitsProvider.findUnitByName(persistenceUnitName);
|
|
162706
162711
|
const format = await _itwin_core_quantity__WEBPACK_IMPORTED_MODULE_1__.Format.createFromJSON(formatName ?? "temp", this._unitsProvider, formatProps);
|
|
162707
|
-
return _itwin_core_quantity__WEBPACK_IMPORTED_MODULE_1__.ParserSpec.create(format, this._unitsProvider, persistenceUnitProps);
|
|
162712
|
+
return _itwin_core_quantity__WEBPACK_IMPORTED_MODULE_1__.ParserSpec.create(format, this._unitsProvider, persistenceUnitProps, this.alternateUnitLabelsProvider);
|
|
162708
162713
|
}
|
|
162709
162714
|
/**
|
|
162710
162715
|
* @beta
|
|
@@ -163246,6 +163251,9 @@ const UNIT_EXTRA_DATA = [
|
|
|
163246
163251
|
{ name: "Units.CUB_US_SURVEY_FT", altDisplayLabels: ["cf"] },
|
|
163247
163252
|
{ name: "Units.CUB_YRD", altDisplayLabels: ["cy"] },
|
|
163248
163253
|
{ name: "Units.CUB_M", altDisplayLabels: ["cm"] },
|
|
163254
|
+
// Velocity ( base unit m/s )
|
|
163255
|
+
{ name: "Units.KM_PER_HR", altDisplayLabels: ["kph", "kmh"] },
|
|
163256
|
+
{ name: "Units.MPH", altDisplayLabels: ["mph"] },
|
|
163249
163257
|
];
|
|
163250
163258
|
|
|
163251
163259
|
|
|
@@ -190051,7 +190059,14 @@ class ToolAdmin {
|
|
|
190051
190059
|
return false;
|
|
190052
190060
|
if (!await this.finishEditCommandForTxnOperation())
|
|
190053
190061
|
return false;
|
|
190054
|
-
|
|
190062
|
+
try {
|
|
190063
|
+
await imodel.txns.reverseSingleTxnAsync();
|
|
190064
|
+
return true;
|
|
190065
|
+
}
|
|
190066
|
+
catch (error) {
|
|
190067
|
+
await this.onTxnOperationError("undo", error);
|
|
190068
|
+
return false;
|
|
190069
|
+
}
|
|
190055
190070
|
}
|
|
190056
190071
|
/** Called to redo previous data button for primitive tools or undo last write operation. */
|
|
190057
190072
|
async doRedoOperation() {
|
|
@@ -190066,8 +190081,22 @@ class ToolAdmin {
|
|
|
190066
190081
|
return false;
|
|
190067
190082
|
if (!await this.finishEditCommandForTxnOperation())
|
|
190068
190083
|
return false;
|
|
190069
|
-
|
|
190084
|
+
try {
|
|
190085
|
+
await imodel.txns.reinstateTxnAsync();
|
|
190086
|
+
return true;
|
|
190087
|
+
}
|
|
190088
|
+
catch (error) {
|
|
190089
|
+
await this.onTxnOperationError("redo", error);
|
|
190090
|
+
return false;
|
|
190091
|
+
}
|
|
190070
190092
|
}
|
|
190093
|
+
/** Called when [[doUndoOperation]] or [[doRedoOperation]] fails to reverse or reinstate a Txn.
|
|
190094
|
+
* @param _operation The operation that failed.
|
|
190095
|
+
* @param _error The error thrown by [[BriefcaseTxns.reverseSingleTxnAsync]] or [[BriefcaseTxns.reinstateTxnAsync]].
|
|
190096
|
+
* @note Implementations should not throw. Any exception thrown by this method propagates to the caller of [[doUndoOperation]] or [[doRedoOperation]].
|
|
190097
|
+
* @beta
|
|
190098
|
+
*/
|
|
190099
|
+
async onTxnOperationError(_operation, _error) { }
|
|
190071
190100
|
onActiveToolChanged(tool, start) {
|
|
190072
190101
|
this.clearMotionPromises();
|
|
190073
190102
|
this.activeToolChanged.raiseEvent(tool, start);
|
|
@@ -317291,7 +317320,16 @@ class Parser {
|
|
|
317291
317320
|
// Don't add space when the wip token is empty.
|
|
317292
317321
|
continue;
|
|
317293
317322
|
}
|
|
317294
|
-
|
|
317323
|
+
// A slash directly between two label characters (e.g. "km/h") is part of the label, not a division.
|
|
317324
|
+
const nextCharCode = str.charCodeAt(i + 1);
|
|
317325
|
+
const isUnitLabelSlash = charCode === _Constants__WEBPACK_IMPORTED_MODULE_1__.QuantityConstants.CHAR_SLASH &&
|
|
317326
|
+
wipToken.length > 0 &&
|
|
317327
|
+
i + 1 < str.length &&
|
|
317328
|
+
!/\s/.test(str[i - 1]) &&
|
|
317329
|
+
!/\s/.test(str[i + 1]) &&
|
|
317330
|
+
!Parser.isDigitOrDecimalSeparator(nextCharCode, format) &&
|
|
317331
|
+
!isOperator(nextCharCode);
|
|
317332
|
+
if (isCharOperator && !isUnitLabelSlash) {
|
|
317295
317333
|
if (wipToken.length > 0) {
|
|
317296
317334
|
// There is a token is progress, process it now, before adding the new operator token.
|
|
317297
317335
|
tokens.push(new ParseToken(wipToken));
|
|
@@ -337693,7 +337731,7 @@ class WMS {
|
|
|
337693
337731
|
(module) {
|
|
337694
337732
|
|
|
337695
337733
|
"use strict";
|
|
337696
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.15.0-dev.
|
|
337734
|
+
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"}}');
|
|
337697
337735
|
|
|
337698
337736
|
/***/ },
|
|
337699
337737
|
|