@itwin/ecschema-rpcinterface-tests 5.14.5 → 5.14.6
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 +22 -5
- package/lib/dist/bundled-tests.js.map +1 -1
- package/package.json +16 -16
|
@@ -161331,7 +161331,12 @@ var QuantityType;
|
|
|
161331
161331
|
class AlternateUnitLabelsRegistry {
|
|
161332
161332
|
_alternateLabelRegistry = new Map();
|
|
161333
161333
|
addAlternateLabels(key, ...labels) {
|
|
161334
|
-
|
|
161334
|
+
let entry = this._alternateLabelRegistry.get(key);
|
|
161335
|
+
if (!entry) {
|
|
161336
|
+
entry = new Set();
|
|
161337
|
+
this._alternateLabelRegistry.set(key, entry);
|
|
161338
|
+
}
|
|
161339
|
+
labels.forEach((value) => entry.add(value));
|
|
161335
161340
|
}
|
|
161336
161341
|
constructor(defaultAlternates) {
|
|
161337
161342
|
if (defaultAlternates) {
|
|
@@ -162126,7 +162131,7 @@ class QuantityFormatter {
|
|
|
162126
162131
|
const entry = this.quantityTypesRegistry.get(quantityKey);
|
|
162127
162132
|
if (!entry)
|
|
162128
162133
|
throw new Error(`Unable to find registered quantity type with key ${quantityKey}`);
|
|
162129
|
-
return entry.generateParserSpec(this.getFormatPropsByQuantityTypeEntryAndSystem(entry, requestedSystem), this.unitsProvider);
|
|
162134
|
+
return entry.generateParserSpec(this.getFormatPropsByQuantityTypeEntryAndSystem(entry, requestedSystem), this.unitsProvider, this.alternateUnitLabelsProvider);
|
|
162130
162135
|
}
|
|
162131
162136
|
/** Asynchronous Call to get a ParserSpec for a QuantityType.
|
|
162132
162137
|
* @param type One of the built-in quantity types supported.
|
|
@@ -162274,7 +162279,7 @@ class QuantityFormatter {
|
|
|
162274
162279
|
const { persistenceUnitName, formatProps, formatName } = props;
|
|
162275
162280
|
const persistenceUnitProps = await this._unitsProvider.findUnitByName(persistenceUnitName);
|
|
162276
162281
|
const format = await _itwin_core_quantity__WEBPACK_IMPORTED_MODULE_1__.Format.createFromJSON(formatName ?? "temp", this._unitsProvider, formatProps);
|
|
162277
|
-
return _itwin_core_quantity__WEBPACK_IMPORTED_MODULE_1__.ParserSpec.create(format, this._unitsProvider, persistenceUnitProps);
|
|
162282
|
+
return _itwin_core_quantity__WEBPACK_IMPORTED_MODULE_1__.ParserSpec.create(format, this._unitsProvider, persistenceUnitProps, this.alternateUnitLabelsProvider);
|
|
162278
162283
|
}
|
|
162279
162284
|
/**
|
|
162280
162285
|
* @beta
|
|
@@ -162816,6 +162821,9 @@ const UNIT_EXTRA_DATA = [
|
|
|
162816
162821
|
{ name: "Units.CUB_US_SURVEY_FT", altDisplayLabels: ["cf"] },
|
|
162817
162822
|
{ name: "Units.CUB_YRD", altDisplayLabels: ["cy"] },
|
|
162818
162823
|
{ name: "Units.CUB_M", altDisplayLabels: ["cm"] },
|
|
162824
|
+
// Velocity ( base unit m/s )
|
|
162825
|
+
{ name: "Units.KM_PER_HR", altDisplayLabels: ["kph", "kmh"] },
|
|
162826
|
+
{ name: "Units.MPH", altDisplayLabels: ["mph"] },
|
|
162819
162827
|
];
|
|
162820
162828
|
|
|
162821
162829
|
|
|
@@ -316784,7 +316792,16 @@ class Parser {
|
|
|
316784
316792
|
// Don't add space when the wip token is empty.
|
|
316785
316793
|
continue;
|
|
316786
316794
|
}
|
|
316787
|
-
|
|
316795
|
+
// A slash directly between two label characters (e.g. "km/h") is part of the label, not a division.
|
|
316796
|
+
const nextCharCode = str.charCodeAt(i + 1);
|
|
316797
|
+
const isUnitLabelSlash = charCode === _Constants__WEBPACK_IMPORTED_MODULE_1__.QuantityConstants.CHAR_SLASH &&
|
|
316798
|
+
wipToken.length > 0 &&
|
|
316799
|
+
i + 1 < str.length &&
|
|
316800
|
+
!/\s/.test(str[i - 1]) &&
|
|
316801
|
+
!/\s/.test(str[i + 1]) &&
|
|
316802
|
+
!Parser.isDigitOrDecimalSeparator(nextCharCode, format) &&
|
|
316803
|
+
!isOperator(nextCharCode);
|
|
316804
|
+
if (isCharOperator && !isUnitLabelSlash) {
|
|
316788
316805
|
if (wipToken.length > 0) {
|
|
316789
316806
|
// There is a token is progress, process it now, before adding the new operator token.
|
|
316790
316807
|
tokens.push(new ParseToken(wipToken));
|
|
@@ -337177,7 +337194,7 @@ class WMS {
|
|
|
337177
337194
|
(module) {
|
|
337178
337195
|
|
|
337179
337196
|
"use strict";
|
|
337180
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.14.
|
|
337197
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.14.6","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.11","@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"}}');
|
|
337181
337198
|
|
|
337182
337199
|
/***/ },
|
|
337183
337200
|
|