@itwin/ecschema-rpcinterface-tests 5.15.0-dev.16 → 5.15.0-dev.18
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 +99 -35
- 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_loaders_gl_draco_4_5_2__loaders_gl_core_4_5_2_node_modu-bbc95a.bundled-tests.js.map +1 -1
- package/package.json +15 -15
|
@@ -76467,8 +76467,8 @@ class SchemaView {
|
|
|
76467
76467
|
throw new Error("SchemaView is not mergeable: create it via SchemaView.createMergeable to merge fragments.");
|
|
76468
76468
|
this._mergeContext.mergeBlob(blob);
|
|
76469
76469
|
// A new fragment can add subclasses to an already-present base class, so the derived-class map
|
|
76470
|
-
// must be rebuilt. transitiveBaseCache
|
|
76471
|
-
// before it (dependency order), so an append never adds an ancestor to an already-cached class.
|
|
76470
|
+
// must be rebuilt. transitiveBaseCache and PropertyRef.overriddenProperty stay valid: a class's ancestors
|
|
76471
|
+
// are always merged before it (dependency order), so an append never adds an ancestor to an already-cached class.
|
|
76472
76472
|
this[_storage].derivedClassMap = undefined;
|
|
76473
76473
|
}
|
|
76474
76474
|
// --- Internal helpers used by view objects ---
|
|
@@ -76558,12 +76558,18 @@ class SchemaView {
|
|
|
76558
76558
|
// 1. Base class (recursive, depth-first)
|
|
76559
76559
|
if (cls.baseClassIdx !== -1)
|
|
76560
76560
|
this._collectProperties(cls.baseClassIdx, merged);
|
|
76561
|
-
// 2. Mixins in declaration order
|
|
76561
|
+
// 2. Mixins in declaration order. Each mixin is resolved on its own so its overrides win over its
|
|
76562
|
+
// ancestors, then only adds names not already provided by the base class or an earlier mixin.
|
|
76562
76563
|
for (let i = 0; i < cls.mixinCount; i++) {
|
|
76563
76564
|
const mixinIdx = this[_storage].classMixins[cls.mixinStartIdx + i];
|
|
76564
76565
|
if (mixinIdx === -1 || mixinIdx === undefined)
|
|
76565
76566
|
continue; // safety: dangling mixin ref
|
|
76566
|
-
|
|
76567
|
+
const mixinProperties = new Map();
|
|
76568
|
+
this._collectProperties(mixinIdx, mixinProperties);
|
|
76569
|
+
for (const [nameKey, resolved] of mixinProperties) {
|
|
76570
|
+
if (!merged.has(nameKey))
|
|
76571
|
+
merged.set(nameKey, resolved);
|
|
76572
|
+
}
|
|
76567
76573
|
}
|
|
76568
76574
|
// 3. Own properties - always override
|
|
76569
76575
|
for (let i = 0; i < cls.ownPropCount; i++) {
|
|
@@ -76572,27 +76578,62 @@ class SchemaView {
|
|
|
76572
76578
|
merged.set(nameKey, { ref, classIdx });
|
|
76573
76579
|
}
|
|
76574
76580
|
}
|
|
76575
|
-
|
|
76576
|
-
|
|
76577
|
-
|
|
76578
|
-
|
|
76579
|
-
|
|
76580
|
-
if (
|
|
76581
|
-
|
|
76582
|
-
|
|
76583
|
-
|
|
76584
|
-
|
|
76585
|
-
|
|
76581
|
+
/** Finds the property declaration that a property of the given class overrides.
|
|
76582
|
+
* Searches the base class and its ancestors first, then each mixin in declaration order.
|
|
76583
|
+
*/
|
|
76584
|
+
_findOverriddenProperty(classIdx, nameKey) {
|
|
76585
|
+
const cls = this[_storage].classes[classIdx];
|
|
76586
|
+
if (cls === undefined || cls.type === _SchemaViewInterfaces__WEBPACK_IMPORTED_MODULE_0__.ClassType.View)
|
|
76587
|
+
return undefined;
|
|
76588
|
+
if (cls.baseClassIdx !== -1) {
|
|
76589
|
+
const found = this._findPropertyDeclaration(cls.baseClassIdx, nameKey);
|
|
76590
|
+
if (found !== undefined)
|
|
76591
|
+
return found;
|
|
76592
|
+
}
|
|
76593
|
+
for (let i = 0; i < cls.mixinCount; i++) {
|
|
76594
|
+
const mixinIdx = this[_storage].classMixins[cls.mixinStartIdx + i];
|
|
76595
|
+
if (mixinIdx === -1 || mixinIdx === undefined)
|
|
76586
76596
|
continue; // safety: dangling mixin ref
|
|
76587
|
-
this.
|
|
76597
|
+
const found = this._findPropertyDeclaration(mixinIdx, nameKey);
|
|
76598
|
+
if (found !== undefined)
|
|
76599
|
+
return found;
|
|
76588
76600
|
}
|
|
76589
|
-
|
|
76590
|
-
|
|
76591
|
-
|
|
76601
|
+
return undefined;
|
|
76602
|
+
}
|
|
76603
|
+
_findPropertyDeclaration(classIdx, nameKey) {
|
|
76604
|
+
const cls = this[_storage].classes[classIdx];
|
|
76605
|
+
if (cls === undefined)
|
|
76606
|
+
return undefined; // safety: dangling index from excluded schema
|
|
76607
|
+
for (let i = 0; i < cls.ownPropCount; i++) {
|
|
76608
|
+
const ref = this[_storage].propertyRefs[cls.ownPropStart + i];
|
|
76609
|
+
if (this[_storage].lowerStrings[this[_storage].propDefs[ref.defIdx].nameStringIdx] === nameKey)
|
|
76610
|
+
return { ref, classIdx };
|
|
76611
|
+
}
|
|
76612
|
+
return this._findOverriddenProperty(classIdx, nameKey);
|
|
76613
|
+
}
|
|
76614
|
+
/** Returns the first declaration matching `predicate`, starting with the given declaration and
|
|
76615
|
+
* continuing with the declarations it overrides.
|
|
76616
|
+
* @internal
|
|
76617
|
+
*/
|
|
76618
|
+
findPropertyDefInOverrides(ref, classIdx, predicate) {
|
|
76619
|
+
let current = { ref, classIdx };
|
|
76620
|
+
while (current !== null) {
|
|
76621
|
+
const def = this[_storage].propDefs[current.ref.defIdx];
|
|
76622
|
+
if (predicate(def))
|
|
76623
|
+
return def;
|
|
76624
|
+
current = this._getOverriddenProperty(current.ref, current.classIdx);
|
|
76625
|
+
}
|
|
76626
|
+
return undefined;
|
|
76627
|
+
}
|
|
76628
|
+
/** Returns the declaration the given one overrides, resolving and storing it on the ref on first access.
|
|
76629
|
+
* Caching per ref is sound because a ref belongs to exactly one class; view properties (classIdx -1) never override.
|
|
76630
|
+
*/
|
|
76631
|
+
_getOverriddenProperty(ref, classIdx) {
|
|
76632
|
+
if (ref.overriddenProperty === undefined) {
|
|
76592
76633
|
const nameKey = this[_storage].lowerStrings[this[_storage].propDefs[ref.defIdx].nameStringIdx];
|
|
76593
|
-
|
|
76594
|
-
merged.set(nameKey, { ref, classIdx: mixinIdx });
|
|
76634
|
+
ref.overriddenProperty = classIdx !== -1 ? this._findOverriddenProperty(classIdx, nameKey) ?? null : null;
|
|
76595
76635
|
}
|
|
76636
|
+
return ref.overriddenProperty;
|
|
76596
76637
|
}
|
|
76597
76638
|
/** @internal */
|
|
76598
76639
|
buildDerivedClassMap() {
|
|
@@ -76617,6 +76658,9 @@ class SchemaView {
|
|
|
76617
76658
|
// =====================================================================================
|
|
76618
76659
|
// SchemaView namespace - flyweight view types
|
|
76619
76660
|
// =====================================================================================
|
|
76661
|
+
function hasCategory(def) { return def.categoryIdx !== -1; }
|
|
76662
|
+
function hasKindOfQuantity(def) { return def.koqIdx !== -1; }
|
|
76663
|
+
function isHiddenDef(def) { return def.isHidden; }
|
|
76620
76664
|
/** @beta */
|
|
76621
76665
|
(function (SchemaView) {
|
|
76622
76666
|
/** Lightweight view over a schema in a `SchemaView`. Holds only a view reference and
|
|
@@ -76960,10 +77004,21 @@ class SchemaView {
|
|
|
76960
77004
|
}
|
|
76961
77005
|
get kind() { return this._def.kind; }
|
|
76962
77006
|
get isReadOnly() { return this._def.isReadOnly; }
|
|
76963
|
-
/** Reflects the `HiddenProperty` custom attribute from `CoreCustomAttributes
|
|
76964
|
-
* Properties marked hidden are typically excluded from UI display but remain
|
|
77007
|
+
/** Reflects the `HiddenProperty` custom attribute from `CoreCustomAttributes` on this declaration only;
|
|
77008
|
+
* see `isEffectivelyHidden`. Properties marked hidden are typically excluded from UI display but remain
|
|
77009
|
+
* accessible programmatically. */
|
|
76965
77010
|
get isHidden() { return this._def.isHidden; }
|
|
76966
|
-
/**
|
|
77011
|
+
/** True if this declaration is hidden. If it is not and the property is an override, we take this from the
|
|
77012
|
+
* overridden property. Limitation: `HiddenProperty(Show=true)` reads the same as no `HiddenProperty`, so it does not
|
|
77013
|
+
* unhide a property whose overridden property is hidden. */
|
|
77014
|
+
get isEffectivelyHidden() {
|
|
77015
|
+
if (this._def.isHidden)
|
|
77016
|
+
return true;
|
|
77017
|
+
return this._ctx.findPropertyDefInOverrides(this._ref, this._classIdx, isHiddenDef) !== undefined;
|
|
77018
|
+
}
|
|
77019
|
+
/** Display priority. Higher values should be displayed more prominently. 0 means default.
|
|
77020
|
+
* Not inherited from the overridden property: an omitted priority is stored as 0, which cannot be told
|
|
77021
|
+
* apart from an explicit 0 that overrides a base priority. */
|
|
76967
77022
|
get priority() { return this._ref.priority; }
|
|
76968
77023
|
/** The class that declared or contributed this property through inheritance.
|
|
76969
77024
|
* For own properties, returns the class itself. For inherited properties, returns the
|
|
@@ -76974,11 +77029,21 @@ class SchemaView {
|
|
|
76974
77029
|
get declaringClass() {
|
|
76975
77030
|
return this._classIdx !== -1 ? createClass(this._ctx, this._classIdx) : undefined;
|
|
76976
77031
|
}
|
|
76977
|
-
/** Property category
|
|
77032
|
+
/** Property category. If there is no local category and the property is an override, we take this from
|
|
77033
|
+
* the overridden property. Available on all property kinds. */
|
|
76978
77034
|
get category() {
|
|
76979
|
-
|
|
77035
|
+
let idx = this._def.categoryIdx;
|
|
77036
|
+
if (idx === -1 && this._ctx[_storage].propCategories.length !== 0)
|
|
77037
|
+
idx = this._ctx.findPropertyDefInOverrides(this._ref, this._classIdx, hasCategory)?.categoryIdx ?? -1;
|
|
76980
77038
|
return idx !== -1 ? new PropertyCategory(this._ctx, idx) : undefined;
|
|
76981
77039
|
}
|
|
77040
|
+
/** @internal */
|
|
77041
|
+
get _kindOfQuantity() {
|
|
77042
|
+
let idx = this._def.koqIdx;
|
|
77043
|
+
if (idx === -1 && this._ctx[_storage].koqs.length !== 0)
|
|
77044
|
+
idx = this._ctx.findPropertyDefInOverrides(this._ref, this._classIdx, hasKindOfQuantity)?.koqIdx ?? -1;
|
|
77045
|
+
return idx !== -1 ? new KindOfQuantity(this._ctx, idx) : undefined;
|
|
77046
|
+
}
|
|
76982
77047
|
// Type guards - real type predicates that narrow `this`
|
|
76983
77048
|
/** True for `SchemaView.PrimitiveProperty` and `SchemaView.PrimitiveArrayProperty`.
|
|
76984
77049
|
* Matches ecschema-metadata behavior where `isPrimitive()` includes primitive arrays. */
|
|
@@ -77040,10 +77105,9 @@ class SchemaView {
|
|
|
77040
77105
|
const idx = this._def.enumIdx;
|
|
77041
77106
|
return idx !== -1 ? new Enumeration(this._ctx, idx) : undefined;
|
|
77042
77107
|
}
|
|
77043
|
-
|
|
77044
|
-
|
|
77045
|
-
|
|
77046
|
-
}
|
|
77108
|
+
/** KindOfQuantity. If there is no local KindOfQuantity and the property is an override, we take this
|
|
77109
|
+
* from the overridden property. */
|
|
77110
|
+
get kindOfQuantity() { return this._kindOfQuantity; }
|
|
77047
77111
|
}
|
|
77048
77112
|
SchemaView.PrimitiveProperty = PrimitiveProperty;
|
|
77049
77113
|
/** An array of primitive values. Same primitive/enum fields as `PrimitiveProperty`,
|
|
@@ -77060,10 +77124,9 @@ class SchemaView {
|
|
|
77060
77124
|
const idx = this._def.enumIdx;
|
|
77061
77125
|
return idx !== -1 ? new Enumeration(this._ctx, idx) : undefined;
|
|
77062
77126
|
}
|
|
77063
|
-
|
|
77064
|
-
|
|
77065
|
-
|
|
77066
|
-
}
|
|
77127
|
+
/** KindOfQuantity. If there is no local KindOfQuantity and the property is an override, we take this
|
|
77128
|
+
* from the overridden property. */
|
|
77129
|
+
get kindOfQuantity() { return this._kindOfQuantity; }
|
|
77067
77130
|
get arrayMinOccurs() { return this._def.arrayMinOccurs; }
|
|
77068
77131
|
get arrayMaxOccurs() { return this._def.arrayMaxOccurs; }
|
|
77069
77132
|
}
|
|
@@ -77969,6 +78032,7 @@ function mergeFragmentBlob(ctx, data) {
|
|
|
77969
78032
|
defIdx,
|
|
77970
78033
|
labelStringIdx: pr.labelStringIdx,
|
|
77971
78034
|
priority: pr.priority,
|
|
78035
|
+
overriddenProperty: undefined,
|
|
77972
78036
|
});
|
|
77973
78037
|
}
|
|
77974
78038
|
let sourceConstraintIdx = -1;
|
|
@@ -337629,7 +337693,7 @@ class WMS {
|
|
|
337629
337693
|
(module) {
|
|
337630
337694
|
|
|
337631
337695
|
"use strict";
|
|
337632
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.15.0-dev.
|
|
337696
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.15.0-dev.18","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"}}');
|
|
337633
337697
|
|
|
337634
337698
|
/***/ },
|
|
337635
337699
|
|