@itwin/rpcinterface-full-stack-tests 5.7.0-dev.10 → 5.7.0-dev.12
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 +176 -14
- 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_cross-fetch_4_0_0_node_modules_cross-fetch_dist_browser-24291b.bundled-tests.js.map +1 -1
- package/lib/dist/vendors-common_temp_node_modules_pnpm_loaders_gl_draco_4_3_4__loaders_gl_core_4_3_4_node_modu-4c1fc9.bundled-tests.js.map +1 -1
- package/package.json +15 -15
|
@@ -84014,7 +84014,7 @@ var ElementGeometry;
|
|
|
84014
84014
|
if (entry.text) {
|
|
84015
84015
|
result = this.appendTextString(new _TextString__WEBPACK_IMPORTED_MODULE_5__.TextString(entry.text));
|
|
84016
84016
|
}
|
|
84017
|
-
else if (entry.color) {
|
|
84017
|
+
else if (undefined !== entry.color) {
|
|
84018
84018
|
const params = geomParams?.clone() ?? new _GeometryParams__WEBPACK_IMPORTED_MODULE_7__.GeometryParams(_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_1__.Id64.invalid);
|
|
84019
84019
|
if (entry.color !== "subcategory") {
|
|
84020
84020
|
params.lineColor = _ColorDef__WEBPACK_IMPORTED_MODULE_6__.ColorDef.fromJSON(entry.color);
|
|
@@ -345177,7 +345177,7 @@ class TestContext {
|
|
|
345177
345177
|
this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
|
|
345178
345178
|
const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${process.env.IMJS_URL_PREFIX ?? ""}api.bentley.com/imodels` } });
|
|
345179
345179
|
await core_frontend_1.NoRenderApp.startup({
|
|
345180
|
-
applicationVersion: "5.7.0-dev.
|
|
345180
|
+
applicationVersion: "5.7.0-dev.12",
|
|
345181
345181
|
applicationId: this.settings.gprid,
|
|
345182
345182
|
authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.serviceAuthToken),
|
|
345183
345183
|
hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
|
|
@@ -352371,11 +352371,14 @@ class ElementPropertiesAppender {
|
|
|
352371
352371
|
this._propertyItems[label] = item;
|
|
352372
352372
|
}
|
|
352373
352373
|
finish() {
|
|
352374
|
-
//
|
|
352375
|
-
|
|
352376
|
-
|
|
352377
|
-
|
|
352378
|
-
}
|
|
352374
|
+
// create an ordered list of category depths / appenders starting with categories that have the most ancestors and finishing with categories
|
|
352375
|
+
// that have no ancestors, so that when we call `finish` on appenders, child categories are finished before parent categories, otherwise
|
|
352376
|
+
// we may skip parent categories, thinking they have no items
|
|
352377
|
+
const categoriesNestedToRoot = new core_bentley_1.SortedArray((lhs, rhs) => rhs.categoryDepth - lhs.categoryDepth, core_bentley_1.DuplicatePolicy.Allow);
|
|
352378
|
+
Object.entries(this._categoryItemAppenders).forEach(([_, { category, appender }]) => {
|
|
352379
|
+
categoriesNestedToRoot.insert({ categoryDepth: countAncestors(category), appender });
|
|
352380
|
+
});
|
|
352381
|
+
categoriesNestedToRoot.forEach(({ appender }) => appender.finish());
|
|
352379
352382
|
this._onItemFinished({
|
|
352380
352383
|
class: this._item.classInfo?.label ?? "",
|
|
352381
352384
|
id: this._item.primaryKeys[0]?.id ?? core_bentley_1.Id64.invalid,
|
|
@@ -352384,12 +352387,12 @@ class ElementPropertiesAppender {
|
|
|
352384
352387
|
});
|
|
352385
352388
|
}
|
|
352386
352389
|
getCategoryAppender(parentAppender, category) {
|
|
352387
|
-
let
|
|
352388
|
-
if (!
|
|
352389
|
-
|
|
352390
|
-
this._categoryItemAppenders[category.name] =
|
|
352390
|
+
let entry = this._categoryItemAppenders[category.name];
|
|
352391
|
+
if (!entry) {
|
|
352392
|
+
entry = { category, appender: new CategoryItemAppender(parentAppender, category) };
|
|
352393
|
+
this._categoryItemAppenders[category.name] = entry;
|
|
352391
352394
|
}
|
|
352392
|
-
return appender;
|
|
352395
|
+
return entry.appender;
|
|
352393
352396
|
}
|
|
352394
352397
|
}
|
|
352395
352398
|
class CategoryItemAppender {
|
|
@@ -352546,6 +352549,9 @@ class ElementPropertiesBuilder {
|
|
|
352546
352549
|
});
|
|
352547
352550
|
}
|
|
352548
352551
|
}
|
|
352552
|
+
function countAncestors(child) {
|
|
352553
|
+
return child.parent ? 1 + countAncestors(child.parent) : 0;
|
|
352554
|
+
}
|
|
352549
352555
|
|
|
352550
352556
|
|
|
352551
352557
|
/***/ }),
|
|
@@ -354615,7 +354621,7 @@ function createContentTraverser(visitor, descriptorArg) {
|
|
|
354615
354621
|
}
|
|
354616
354622
|
try {
|
|
354617
354623
|
if (memo?.descriptor !== descriptor) {
|
|
354618
|
-
const fieldHierarchies = createFieldHierarchies(descriptor.
|
|
354624
|
+
const fieldHierarchies = createFieldHierarchies(descriptor.selectedFields);
|
|
354619
354625
|
visitor.processFieldHierarchies({ hierarchies: fieldHierarchies });
|
|
354620
354626
|
memo = { descriptor, fieldHierarchies };
|
|
354621
354627
|
}
|
|
@@ -355241,6 +355247,8 @@ class Descriptor {
|
|
|
355241
355247
|
* This is useful for filtering instances of specific class.
|
|
355242
355248
|
*/
|
|
355243
355249
|
instanceFilter;
|
|
355250
|
+
#fieldsSelector;
|
|
355251
|
+
#selectedFields;
|
|
355244
355252
|
/** Construct a new Descriptor using a [[DescriptorSource]] */
|
|
355245
355253
|
constructor(source) {
|
|
355246
355254
|
this.connectionId = source.connectionId;
|
|
@@ -355256,6 +355264,7 @@ class Descriptor {
|
|
|
355256
355264
|
this.fieldsFilterExpression = source.fieldsFilterExpression;
|
|
355257
355265
|
this.instanceFilter = source.instanceFilter;
|
|
355258
355266
|
this.ruleset = source.ruleset;
|
|
355267
|
+
this.#fieldsSelector = source.fieldsSelector;
|
|
355259
355268
|
}
|
|
355260
355269
|
/** Serialize [[Descriptor]] to JSON */
|
|
355261
355270
|
toJSON() {
|
|
@@ -355323,6 +355332,35 @@ class Descriptor {
|
|
|
355323
355332
|
getFieldByDescriptor(fieldDescriptor, recurse) {
|
|
355324
355333
|
return (0, Fields_js_1.getFieldByDescriptor)(this.fields, fieldDescriptor, recurse);
|
|
355325
355334
|
}
|
|
355335
|
+
/**
|
|
355336
|
+
* Fields selector that allows excluding or including only specified fields. When set, the `selectedFields`
|
|
355337
|
+
* property will return a subset of `fields` based on the selector configuration.
|
|
355338
|
+
*/
|
|
355339
|
+
get fieldsSelector() {
|
|
355340
|
+
return this.#fieldsSelector;
|
|
355341
|
+
}
|
|
355342
|
+
set fieldsSelector(selector) {
|
|
355343
|
+
this.#fieldsSelector = selector;
|
|
355344
|
+
this.#selectedFields = undefined; // reset cached selected fields
|
|
355345
|
+
}
|
|
355346
|
+
/** Get selected fields based on `fields` in this descriptor and `fieldsSelector`. */
|
|
355347
|
+
get selectedFields() {
|
|
355348
|
+
if (!this.#fieldsSelector) {
|
|
355349
|
+
return this.fields;
|
|
355350
|
+
}
|
|
355351
|
+
if (!this.#selectedFields) {
|
|
355352
|
+
const { type, fields: selectedFields } = this.#fieldsSelector;
|
|
355353
|
+
switch (type) {
|
|
355354
|
+
case "include":
|
|
355355
|
+
this.#selectedFields = exclusivelyIncludeFields(this.fields, selectedFields);
|
|
355356
|
+
break;
|
|
355357
|
+
case "exclude":
|
|
355358
|
+
this.#selectedFields = excludeFields(this.fields, selectedFields);
|
|
355359
|
+
break;
|
|
355360
|
+
}
|
|
355361
|
+
}
|
|
355362
|
+
return this.#selectedFields;
|
|
355363
|
+
}
|
|
355326
355364
|
/**
|
|
355327
355365
|
* Create descriptor overrides object from this descriptor.
|
|
355328
355366
|
* @public
|
|
@@ -355344,10 +355382,134 @@ class Descriptor {
|
|
|
355344
355382
|
if (this.sortingField) {
|
|
355345
355383
|
overrides.sorting = { field: this.sortingField.getFieldDescriptor(), direction: this.sortDirection ?? SortDirection.Ascending };
|
|
355346
355384
|
}
|
|
355385
|
+
if (this.fieldsSelector) {
|
|
355386
|
+
overrides.fieldsSelector = this.fieldsSelector;
|
|
355387
|
+
}
|
|
355347
355388
|
return overrides;
|
|
355348
355389
|
}
|
|
355349
355390
|
}
|
|
355350
355391
|
exports.Descriptor = Descriptor;
|
|
355392
|
+
/**
|
|
355393
|
+
* Creates a shallow clone of a `NestedContentField` - copies its own properties but does not
|
|
355394
|
+
* recursively deep-clone `nestedFields`. Instead, the children array is shallow-copied so it
|
|
355395
|
+
* can be independently mutated without affecting the original.
|
|
355396
|
+
*
|
|
355397
|
+
* This avoids the cost of `NestedContentField.clone()` which deep-clones the entire subtree
|
|
355398
|
+
* and calls `rebuildParentship` recursively - work that is wasted when callers immediately
|
|
355399
|
+
* clear or modify the children.
|
|
355400
|
+
*/
|
|
355401
|
+
function shallowCloneNestedContentField(field) {
|
|
355402
|
+
return new Fields_js_1.NestedContentField({
|
|
355403
|
+
...field,
|
|
355404
|
+
nestedFields: [...field.nestedFields],
|
|
355405
|
+
});
|
|
355406
|
+
}
|
|
355407
|
+
function exclusivelyIncludeFields(descriptorFields, targetFieldDescriptors) {
|
|
355408
|
+
const rootFields = [];
|
|
355409
|
+
const clones = new Map();
|
|
355410
|
+
for (const targetFieldDescriptor of targetFieldDescriptors) {
|
|
355411
|
+
const includeField = (0, Fields_js_1.getFieldByDescriptor)(descriptorFields, targetFieldDescriptor, true);
|
|
355412
|
+
if (!includeField) {
|
|
355413
|
+
continue;
|
|
355414
|
+
}
|
|
355415
|
+
let clone;
|
|
355416
|
+
let curr = includeField;
|
|
355417
|
+
while (curr) {
|
|
355418
|
+
const prev = clone;
|
|
355419
|
+
const existingClone = clones.get(curr);
|
|
355420
|
+
if (existingClone) {
|
|
355421
|
+
// `curr` is already cloned, which means the fields hierarchy from root to `curr` is already
|
|
355422
|
+
// built - we only need to add `prev` and that's it
|
|
355423
|
+
if (prev) {
|
|
355424
|
+
prev.rebuildParentship(existingClone);
|
|
355425
|
+
existingClone.nestedFields.push(prev);
|
|
355426
|
+
clone = undefined;
|
|
355427
|
+
}
|
|
355428
|
+
break;
|
|
355429
|
+
}
|
|
355430
|
+
// `curr` is not cloned yet
|
|
355431
|
+
if (curr.isNestedContentField()) {
|
|
355432
|
+
const nestedClone = shallowCloneNestedContentField(curr);
|
|
355433
|
+
clones.set(curr, nestedClone);
|
|
355434
|
+
nestedClone.nestedFields = [];
|
|
355435
|
+
if (prev) {
|
|
355436
|
+
prev.rebuildParentship(nestedClone);
|
|
355437
|
+
nestedClone.nestedFields.push(prev);
|
|
355438
|
+
}
|
|
355439
|
+
clone = nestedClone;
|
|
355440
|
+
}
|
|
355441
|
+
else {
|
|
355442
|
+
clone = curr.clone();
|
|
355443
|
+
}
|
|
355444
|
+
curr = curr.parent;
|
|
355445
|
+
}
|
|
355446
|
+
if (clone) {
|
|
355447
|
+
rootFields.push(clone);
|
|
355448
|
+
}
|
|
355449
|
+
}
|
|
355450
|
+
return rootFields;
|
|
355451
|
+
}
|
|
355452
|
+
function excludeFields(descriptorFields, targetFieldDescriptors) {
|
|
355453
|
+
// Maps an original root field to its replacement (cloned field or `undefined` if root should be removed)
|
|
355454
|
+
const rootReplacements = new Map();
|
|
355455
|
+
// Tracks already-cloned NestedContentFields so we reuse the same clone when multiple excluded fields share a parent
|
|
355456
|
+
const clones = new Map();
|
|
355457
|
+
for (const targetFieldDescriptor of targetFieldDescriptors) {
|
|
355458
|
+
const excludeField = (0, Fields_js_1.getFieldByDescriptor)(descriptorFields, targetFieldDescriptor, true);
|
|
355459
|
+
if (!excludeField) {
|
|
355460
|
+
continue;
|
|
355461
|
+
}
|
|
355462
|
+
// `curr` tracks the pair: (original field, its replacement clone or undefined if removed)
|
|
355463
|
+
let curr = { original: excludeField, replacement: undefined };
|
|
355464
|
+
let parent = excludeField.parent;
|
|
355465
|
+
while (parent) {
|
|
355466
|
+
let parentClone = clones.get(parent);
|
|
355467
|
+
if (!parentClone) {
|
|
355468
|
+
parentClone = shallowCloneNestedContentField(parent);
|
|
355469
|
+
clones.set(parent, parentClone);
|
|
355470
|
+
}
|
|
355471
|
+
// Find the child in the parent clone's nestedFields that corresponds to curr.original
|
|
355472
|
+
const childIndex = parentClone.nestedFields.findIndex((f) => f.name === curr.original.name);
|
|
355473
|
+
if (childIndex !== -1) {
|
|
355474
|
+
if (curr.replacement && curr.replacement.isNestedContentField() && curr.replacement.nestedFields.length > 0) {
|
|
355475
|
+
// Replace the child with the modified clone
|
|
355476
|
+
parentClone.nestedFields[childIndex] = curr.replacement;
|
|
355477
|
+
curr.replacement.rebuildParentship(parentClone);
|
|
355478
|
+
}
|
|
355479
|
+
else {
|
|
355480
|
+
// Remove the child
|
|
355481
|
+
parentClone.nestedFields.splice(childIndex, 1);
|
|
355482
|
+
}
|
|
355483
|
+
}
|
|
355484
|
+
curr = { original: parent, replacement: parentClone };
|
|
355485
|
+
parent = parent.parent;
|
|
355486
|
+
}
|
|
355487
|
+
rootReplacements.set(curr.original, curr.replacement);
|
|
355488
|
+
}
|
|
355489
|
+
if (rootReplacements.size === 0) {
|
|
355490
|
+
return descriptorFields;
|
|
355491
|
+
}
|
|
355492
|
+
const result = [];
|
|
355493
|
+
for (const field of descriptorFields) {
|
|
355494
|
+
if (!rootReplacements.has(field)) {
|
|
355495
|
+
// Field is not affected by exclusions — keep as-is
|
|
355496
|
+
result.push(field);
|
|
355497
|
+
continue;
|
|
355498
|
+
}
|
|
355499
|
+
const replacement = rootReplacements.get(field);
|
|
355500
|
+
if (replacement === undefined) {
|
|
355501
|
+
// No replacement — field is removed entirely
|
|
355502
|
+
continue;
|
|
355503
|
+
}
|
|
355504
|
+
if (replacement.isNestedContentField() && replacement.nestedFields.length === 0) {
|
|
355505
|
+
// Replacement is an empty nested content field — remove it
|
|
355506
|
+
continue;
|
|
355507
|
+
}
|
|
355508
|
+
// Valid replacement — use the clone
|
|
355509
|
+
result.push(replacement);
|
|
355510
|
+
}
|
|
355511
|
+
return result;
|
|
355512
|
+
}
|
|
355351
355513
|
|
|
355352
355514
|
|
|
355353
355515
|
/***/ }),
|
|
@@ -371937,7 +372099,7 @@ var loadLanguages = instance.loadLanguages;
|
|
|
371937
372099
|
/***/ ((module) => {
|
|
371938
372100
|
|
|
371939
372101
|
"use strict";
|
|
371940
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.7.0-dev.
|
|
372102
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.7.0-dev.12","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 webpackWorkers && npm run -s copy: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:workers":"cpx \\"./lib/workers/webpack/parse-imdl-worker.js\\" ./lib/public/scripts","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","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 webpackTestWorker && vitest --run","cover":"npm run webpackTestWorker && vitest --run","webpackTests":"webpack --config ./src/test/utils/webpack.config.js 1>&2 && npm run -s webpackTestWorker","webpackTestWorker":"webpack --config ./src/test/worker/webpack.config.js 1>&2 && cpx \\"./lib/test/test-worker.js\\" ./lib/test","webpackWorkers":"webpack --config ./src/workers/ImdlParser/webpack.config.js 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":{"@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/chai-as-promised":"^7","@types/draco3d":"^1.4.10","@types/sinon":"^17.0.2","@vitest/browser":"^3.0.6","@vitest/coverage-v8":"^3.0.6","cpx2":"^8.0.0","eslint":"^9.31.0","glob":"^10.5.0","playwright":"~1.56.1","rimraf":"^6.0.1","sinon":"^17.0.2","source-map-loader":"^5.0.0","typescript":"~5.6.2","vitest":"^3.0.6","vite-multiple-assets":"^1.3.1","vite-plugin-static-copy":"2.2.0","webpack":"^5.97.1"},"//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.3.4","@loaders.gl/draco":"^4.3.4","fuse.js":"^3.3.0","wms-capabilities":"0.4.0"}}');
|
|
371941
372103
|
|
|
371942
372104
|
/***/ }),
|
|
371943
372105
|
|