@itwin/rpcinterface-full-stack-tests 5.15.0-dev.17 → 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.
@@ -96632,8 +96632,8 @@ class SchemaView {
96632
96632
  throw new Error("SchemaView is not mergeable: create it via SchemaView.createMergeable to merge fragments.");
96633
96633
  this._mergeContext.mergeBlob(blob);
96634
96634
  // A new fragment can add subclasses to an already-present base class, so the derived-class map
96635
- // must be rebuilt. transitiveBaseCache stays valid: a class's ancestors are always merged
96636
- // before it (dependency order), so an append never adds an ancestor to an already-cached class.
96635
+ // must be rebuilt. transitiveBaseCache and PropertyRef.overriddenProperty stay valid: a class's ancestors
96636
+ // are always merged before it (dependency order), so an append never adds an ancestor to an already-cached class.
96637
96637
  this[_storage].derivedClassMap = undefined;
96638
96638
  }
96639
96639
  // --- Internal helpers used by view objects ---
@@ -96723,12 +96723,18 @@ class SchemaView {
96723
96723
  // 1. Base class (recursive, depth-first)
96724
96724
  if (cls.baseClassIdx !== -1)
96725
96725
  this._collectProperties(cls.baseClassIdx, merged);
96726
- // 2. Mixins in declaration order
96726
+ // 2. Mixins in declaration order. Each mixin is resolved on its own so its overrides win over its
96727
+ // ancestors, then only adds names not already provided by the base class or an earlier mixin.
96727
96728
  for (let i = 0; i < cls.mixinCount; i++) {
96728
96729
  const mixinIdx = this[_storage].classMixins[cls.mixinStartIdx + i];
96729
96730
  if (mixinIdx === -1 || mixinIdx === undefined)
96730
96731
  continue; // safety: dangling mixin ref
96731
- this._collectMixinProperties(mixinIdx, merged);
96732
+ const mixinProperties = new Map();
96733
+ this._collectProperties(mixinIdx, mixinProperties);
96734
+ for (const [nameKey, resolved] of mixinProperties) {
96735
+ if (!merged.has(nameKey))
96736
+ merged.set(nameKey, resolved);
96737
+ }
96732
96738
  }
96733
96739
  // 3. Own properties - always override
96734
96740
  for (let i = 0; i < cls.ownPropCount; i++) {
@@ -96737,27 +96743,62 @@ class SchemaView {
96737
96743
  merged.set(nameKey, { ref, classIdx });
96738
96744
  }
96739
96745
  }
96740
- _collectMixinProperties(mixinIdx, merged) {
96741
- const mixin = this[_storage].classes[mixinIdx];
96742
- if (mixin === undefined)
96743
- return; // safety: dangling index from excluded schema
96744
- // Walk mixin's own base chain (mixins can extend other mixins)
96745
- if (mixin.baseClassIdx !== -1)
96746
- this._collectMixinProperties(mixin.baseClassIdx, merged);
96747
- // Mixin's own mixins
96748
- for (let i = 0; i < mixin.mixinCount; i++) {
96749
- const subMixinIdx = this[_storage].classMixins[mixin.mixinStartIdx + i];
96750
- if (subMixinIdx === -1 || subMixinIdx === undefined)
96746
+ /** Finds the property declaration that a property of the given class overrides.
96747
+ * Searches the base class and its ancestors first, then each mixin in declaration order.
96748
+ */
96749
+ _findOverriddenProperty(classIdx, nameKey) {
96750
+ const cls = this[_storage].classes[classIdx];
96751
+ if (cls === undefined || cls.type === _SchemaViewInterfaces__WEBPACK_IMPORTED_MODULE_0__.ClassType.View)
96752
+ return undefined;
96753
+ if (cls.baseClassIdx !== -1) {
96754
+ const found = this._findPropertyDeclaration(cls.baseClassIdx, nameKey);
96755
+ if (found !== undefined)
96756
+ return found;
96757
+ }
96758
+ for (let i = 0; i < cls.mixinCount; i++) {
96759
+ const mixinIdx = this[_storage].classMixins[cls.mixinStartIdx + i];
96760
+ if (mixinIdx === -1 || mixinIdx === undefined)
96751
96761
  continue; // safety: dangling mixin ref
96752
- this._collectMixinProperties(subMixinIdx, merged);
96762
+ const found = this._findPropertyDeclaration(mixinIdx, nameKey);
96763
+ if (found !== undefined)
96764
+ return found;
96753
96765
  }
96754
- // Mixin's own properties - only set if not already present (first mixin wins)
96755
- for (let i = 0; i < mixin.ownPropCount; i++) {
96756
- const ref = this[_storage].propertyRefs[mixin.ownPropStart + i];
96766
+ return undefined;
96767
+ }
96768
+ _findPropertyDeclaration(classIdx, nameKey) {
96769
+ const cls = this[_storage].classes[classIdx];
96770
+ if (cls === undefined)
96771
+ return undefined; // safety: dangling index from excluded schema
96772
+ for (let i = 0; i < cls.ownPropCount; i++) {
96773
+ const ref = this[_storage].propertyRefs[cls.ownPropStart + i];
96774
+ if (this[_storage].lowerStrings[this[_storage].propDefs[ref.defIdx].nameStringIdx] === nameKey)
96775
+ return { ref, classIdx };
96776
+ }
96777
+ return this._findOverriddenProperty(classIdx, nameKey);
96778
+ }
96779
+ /** Returns the first declaration matching `predicate`, starting with the given declaration and
96780
+ * continuing with the declarations it overrides.
96781
+ * @internal
96782
+ */
96783
+ findPropertyDefInOverrides(ref, classIdx, predicate) {
96784
+ let current = { ref, classIdx };
96785
+ while (current !== null) {
96786
+ const def = this[_storage].propDefs[current.ref.defIdx];
96787
+ if (predicate(def))
96788
+ return def;
96789
+ current = this._getOverriddenProperty(current.ref, current.classIdx);
96790
+ }
96791
+ return undefined;
96792
+ }
96793
+ /** Returns the declaration the given one overrides, resolving and storing it on the ref on first access.
96794
+ * Caching per ref is sound because a ref belongs to exactly one class; view properties (classIdx -1) never override.
96795
+ */
96796
+ _getOverriddenProperty(ref, classIdx) {
96797
+ if (ref.overriddenProperty === undefined) {
96757
96798
  const nameKey = this[_storage].lowerStrings[this[_storage].propDefs[ref.defIdx].nameStringIdx];
96758
- if (!merged.has(nameKey))
96759
- merged.set(nameKey, { ref, classIdx: mixinIdx });
96799
+ ref.overriddenProperty = classIdx !== -1 ? this._findOverriddenProperty(classIdx, nameKey) ?? null : null;
96760
96800
  }
96801
+ return ref.overriddenProperty;
96761
96802
  }
96762
96803
  /** @internal */
96763
96804
  buildDerivedClassMap() {
@@ -96782,6 +96823,9 @@ class SchemaView {
96782
96823
  // =====================================================================================
96783
96824
  // SchemaView namespace - flyweight view types
96784
96825
  // =====================================================================================
96826
+ function hasCategory(def) { return def.categoryIdx !== -1; }
96827
+ function hasKindOfQuantity(def) { return def.koqIdx !== -1; }
96828
+ function isHiddenDef(def) { return def.isHidden; }
96785
96829
  /** @beta */
96786
96830
  (function (SchemaView) {
96787
96831
  /** Lightweight view over a schema in a `SchemaView`. Holds only a view reference and
@@ -97125,10 +97169,21 @@ class SchemaView {
97125
97169
  }
97126
97170
  get kind() { return this._def.kind; }
97127
97171
  get isReadOnly() { return this._def.isReadOnly; }
97128
- /** Reflects the `HiddenProperty` custom attribute from `CoreCustomAttributes`.
97129
- * Properties marked hidden are typically excluded from UI display but remain accessible programmatically. */
97172
+ /** Reflects the `HiddenProperty` custom attribute from `CoreCustomAttributes` on this declaration only;
97173
+ * see `isEffectivelyHidden`. Properties marked hidden are typically excluded from UI display but remain
97174
+ * accessible programmatically. */
97130
97175
  get isHidden() { return this._def.isHidden; }
97131
- /** Display priority. Higher values should be displayed more prominently. 0 means default. */
97176
+ /** True if this declaration is hidden. If it is not and the property is an override, we take this from the
97177
+ * overridden property. Limitation: `HiddenProperty(Show=true)` reads the same as no `HiddenProperty`, so it does not
97178
+ * unhide a property whose overridden property is hidden. */
97179
+ get isEffectivelyHidden() {
97180
+ if (this._def.isHidden)
97181
+ return true;
97182
+ return this._ctx.findPropertyDefInOverrides(this._ref, this._classIdx, isHiddenDef) !== undefined;
97183
+ }
97184
+ /** Display priority. Higher values should be displayed more prominently. 0 means default.
97185
+ * Not inherited from the overridden property: an omitted priority is stored as 0, which cannot be told
97186
+ * apart from an explicit 0 that overrides a base priority. */
97132
97187
  get priority() { return this._ref.priority; }
97133
97188
  /** The class that declared or contributed this property through inheritance.
97134
97189
  * For own properties, returns the class itself. For inherited properties, returns the
@@ -97139,11 +97194,21 @@ class SchemaView {
97139
97194
  get declaringClass() {
97140
97195
  return this._classIdx !== -1 ? createClass(this._ctx, this._classIdx) : undefined;
97141
97196
  }
97142
- /** Property category, or undefined if none assigned. Available on all property kinds. */
97197
+ /** Property category. If there is no local category and the property is an override, we take this from
97198
+ * the overridden property. Available on all property kinds. */
97143
97199
  get category() {
97144
- const idx = this._def.categoryIdx;
97200
+ let idx = this._def.categoryIdx;
97201
+ if (idx === -1 && this._ctx[_storage].propCategories.length !== 0)
97202
+ idx = this._ctx.findPropertyDefInOverrides(this._ref, this._classIdx, hasCategory)?.categoryIdx ?? -1;
97145
97203
  return idx !== -1 ? new PropertyCategory(this._ctx, idx) : undefined;
97146
97204
  }
97205
+ /** @internal */
97206
+ get _kindOfQuantity() {
97207
+ let idx = this._def.koqIdx;
97208
+ if (idx === -1 && this._ctx[_storage].koqs.length !== 0)
97209
+ idx = this._ctx.findPropertyDefInOverrides(this._ref, this._classIdx, hasKindOfQuantity)?.koqIdx ?? -1;
97210
+ return idx !== -1 ? new KindOfQuantity(this._ctx, idx) : undefined;
97211
+ }
97147
97212
  // Type guards - real type predicates that narrow `this`
97148
97213
  /** True for `SchemaView.PrimitiveProperty` and `SchemaView.PrimitiveArrayProperty`.
97149
97214
  * Matches ecschema-metadata behavior where `isPrimitive()` includes primitive arrays. */
@@ -97205,10 +97270,9 @@ class SchemaView {
97205
97270
  const idx = this._def.enumIdx;
97206
97271
  return idx !== -1 ? new Enumeration(this._ctx, idx) : undefined;
97207
97272
  }
97208
- get kindOfQuantity() {
97209
- const idx = this._def.koqIdx;
97210
- return idx !== -1 ? new KindOfQuantity(this._ctx, idx) : undefined;
97211
- }
97273
+ /** KindOfQuantity. If there is no local KindOfQuantity and the property is an override, we take this
97274
+ * from the overridden property. */
97275
+ get kindOfQuantity() { return this._kindOfQuantity; }
97212
97276
  }
97213
97277
  SchemaView.PrimitiveProperty = PrimitiveProperty;
97214
97278
  /** An array of primitive values. Same primitive/enum fields as `PrimitiveProperty`,
@@ -97225,10 +97289,9 @@ class SchemaView {
97225
97289
  const idx = this._def.enumIdx;
97226
97290
  return idx !== -1 ? new Enumeration(this._ctx, idx) : undefined;
97227
97291
  }
97228
- get kindOfQuantity() {
97229
- const idx = this._def.koqIdx;
97230
- return idx !== -1 ? new KindOfQuantity(this._ctx, idx) : undefined;
97231
- }
97292
+ /** KindOfQuantity. If there is no local KindOfQuantity and the property is an override, we take this
97293
+ * from the overridden property. */
97294
+ get kindOfQuantity() { return this._kindOfQuantity; }
97232
97295
  get arrayMinOccurs() { return this._def.arrayMinOccurs; }
97233
97296
  get arrayMaxOccurs() { return this._def.arrayMaxOccurs; }
97234
97297
  }
@@ -98134,6 +98197,7 @@ function mergeFragmentBlob(ctx, data) {
98134
98197
  defIdx,
98135
98198
  labelStringIdx: pr.labelStringIdx,
98136
98199
  priority: pr.priority,
98200
+ overriddenProperty: undefined,
98137
98201
  });
98138
98202
  }
98139
98203
  let sourceConstraintIdx = -1;
@@ -344362,7 +344426,7 @@ class TestContext {
344362
344426
  this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
344363
344427
  const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${process.env.IMJS_URL_PREFIX ?? ""}api.bentley.com/imodels` } });
344364
344428
  await core_frontend_1.NoRenderApp.startup({
344365
- applicationVersion: "5.15.0-dev.17",
344429
+ applicationVersion: "5.15.0-dev.18",
344366
344430
  applicationId: this.settings.gprid,
344367
344431
  authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.serviceAuthToken),
344368
344432
  hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
@@ -370974,7 +371038,7 @@ class WMS {
370974
371038
  (module) {
370975
371039
 
370976
371040
  "use strict";
370977
- module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.15.0-dev.17","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"}}');
371041
+ 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"}}');
370978
371042
 
370979
371043
  /***/ },
370980
371044