Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/afraid-bars-cry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@itwin/changed-elements-react": patch
---

Update itwin/core packages to version 5.0.0-dev.111
4 changes: 2 additions & 2 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
version: 8
run_install: false

- name: Use Node.js 18
- name: Use Node.js 20
uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20
cache: "pnpm"

- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dependabot-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20
cache: 'pnpm'

# Install pnpm
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ jobs:
version: 8
run_install: false

- name: Use Node.js 18
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
registry-url: https://registry.npmjs.org/
cache: "pnpm"

Expand Down
12 changes: 8 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"engines": {
"pnpm": ">=8",
"npm": "<0",
"node": ">=18"
"node": ">=20"
},
"dependencies": {
"@changesets/cli": "^2.27.11",
Expand All @@ -35,10 +35,14 @@
},
"pnpm": {
"overrides": {
"dompurify@<3.2.4": ">=3.2.4",
"esbuild@<=0.24.2": ">=0.25.0",
"@babel/runtime@<7.26.10": ">=7.26.10",
"@itwin/appui-abstract": "^5.0.0-dev.111",
"@itwin/core-bentley": "^5.0.0-dev.111",
"@itwin/core-quantity": "^5.0.0-dev.111",
"@itwin/core-react": "^5.4.0",
"axios@<1.8.2": ">=1.8.2",
"@babel/runtime@<7.26.10": ">=7.26.10"
"dompurify@<3.2.4": ">=3.2.4",
"esbuild@<=0.24.2": ">=0.25.0"
}
}
}
40 changes: 20 additions & 20 deletions packages/changed-elements-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,16 @@
"typecheck": "tsc --noEmit"
},
"devDependencies": {
"@itwin/appui-abstract": "^4.10.6",
"@itwin/components-react": "^5.0.5",
"@itwin/core-bentley": "^4.10.6",
"@itwin/core-common": "^4.10.6",
"@itwin/core-frontend": "^4.10.6",
"@itwin/core-geometry": "^4.10.6",
"@itwin/core-react": "^5.0.5",
"@itwin/presentation-common": "^4.10.6",
"@itwin/presentation-components": "^5.10.0",
"@itwin/presentation-frontend": "^4.10.6",
"@itwin/appui-abstract": "^5.0.0-dev.111",
"@itwin/components-react": "^5.4.0",
"@itwin/core-bentley": "^5.0.0-dev.111",
"@itwin/core-common": "^5.0.0-dev.111",
"@itwin/core-frontend": "^5.0.0-dev.111",
"@itwin/core-geometry": "^5.0.0-dev.111",
"@itwin/core-react": "^5.4.0",
"@itwin/presentation-common": "^5.0.0-dev.111",
"@itwin/presentation-components": "^5.12.1",
"@itwin/presentation-frontend": "^5.0.0-dev.111",
"@testing-library/react": "^16.2.0",
"@types/react": "^18.0.0",
"@types/react-redux": "^7.1.25",
Expand All @@ -72,16 +72,16 @@
"vitest": "^2.1.9"
},
"peerDependencies": {
"@itwin/appui-abstract": "^4.10.6",
"@itwin/components-react": "^5.0.5",
"@itwin/core-bentley": "^4.10.6",
"@itwin/core-common": "^4.10.6",
"@itwin/core-frontend": "^4.10.6",
"@itwin/core-geometry": "^4.10.6",
"@itwin/core-react": "^5.0.5",
"@itwin/presentation-common": "^4.10.6",
"@itwin/presentation-components": "^5.10.0",
"@itwin/presentation-frontend": "^4.10.6",
"@itwin/appui-abstract": "^5.0.0-dev.111",
"@itwin/components-react": "^5.4.0",
"@itwin/core-bentley": "^5.0.0-dev.111",
"@itwin/core-common": "^5.0.0-dev.111",
"@itwin/core-frontend": "^5.0.0-dev.111",
"@itwin/core-geometry": "^5.0.0-dev.111",
"@itwin/core-react": "^5.4.0",
"@itwin/presentation-common": "^5.0.0-dev.111",
"@itwin/presentation-components": "^5.12.1",
"@itwin/presentation-frontend": "^5.0.0-dev.111",
"react": "^18.0.0",
"react-dom": "^18.0.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export class ChangedElementsChildrenCache extends ChangedElementDataCache {
childElemsECSQL = childElemsECSQL + queryString;

let childrenIds: string[] = [];
for await (const result of iModel.query(
for await (const result of iModel.createQueryReader(
childElemsECSQL,
QueryBinder.from(elementIds),
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ export class ChangedElementsManager {
private async _getGeometricElement3dClassId(iModel: IModelConnection): Promise<string | undefined> {
const ecsql =
"SELECT ECClassDef.ECInstanceId as geomId FROM meta.ECClassDef INNER JOIN meta.ECSchemaDef ON ECSchemaDef.ECInstanceId = ECClassDef.Schema.Id WHERE ECClassDef.Name = 'GeometricElement3d' AND ECSchemaDef.Name ='BisCore'";
for await (const row of iModel.query(ecsql, undefined, {
for await (const row of iModel.createQueryReader(ecsql, undefined, {
rowFormat: QueryRowFormat.UseJsPropertyNames,
})) {
return row.geomId;
Expand Down Expand Up @@ -596,7 +596,7 @@ export class ChangedElementsManager {
steps,
);

for await (const row of iModel.query(ecsql, QueryBinder.from(piece), {
for await (const row of iModel.createQueryReader(ecsql, QueryBinder.from(piece), {
rowFormat: QueryRowFormat.UseJsPropertyNames,
})) {
modelIds.add(row.model.id);
Expand Down Expand Up @@ -644,7 +644,7 @@ export class ChangedElementsManager {
const modelIds: string[] = [];
for (const modelClass of modelClasses) {
const ecsql = "SELECT ECInstanceId as modelId FROM " + modelClass;
for await (const row of iModel.query(ecsql, undefined, {
for await (const row of iModel.createQueryReader(ecsql, undefined, {
rowFormat: QueryRowFormat.UseJsPropertyNames,
})) {
modelIds.push(row.modelId);
Expand Down Expand Up @@ -702,7 +702,7 @@ export class ChangedElementsManager {
ecsql = ecsql + "?,";
});
ecsql = ecsql.substr(0, ecsql.length - 1) + ")";
for await (const row of iModel.query(ecsql, QueryBinder.from(elementIds), {
for await (const row of iModel.createQueryReader(ecsql, QueryBinder.from(elementIds), {
rowFormat: QueryRowFormat.UseJsPropertyNames,
})) {
const entry = this._changedElements.get(row.id);
Expand Down Expand Up @@ -865,7 +865,7 @@ export class ChangedElementsManager {
"SELECT SourceECInstanceId FROM meta.ClasshasAllBaseClasses WHERE TargetECInstanceId = " +
geom3dId;
const validClassIds = new Set<string>();
for await (const row of currentIModel.query(ecsql, undefined, {
for await (const row of currentIModel.createQueryReader(ecsql, undefined, {
rowFormat: QueryRowFormat.UseJsPropertyNames,
})) {
validClassIds.add(row.sourceId);
Expand Down Expand Up @@ -926,7 +926,7 @@ export class ChangedElementsManager {

const subjectToModelMap = new Map<string, string>();
const subjectToModelMapToQuery = new Map<string, string>();
for await (const row of iModel.query(ecsql, QueryBinder.from(subjectIds), {
for await (const row of iModel.createQueryReader(ecsql, QueryBinder.from(subjectIds), {
rowFormat: QueryRowFormat.UseJsPropertyNames,
})) {
const relatedModelId = subjectToModel.get(row.childId);
Expand Down Expand Up @@ -986,7 +986,7 @@ export class ChangedElementsManager {

const subjectToModelMap = new Map<string, string>();
const subjectToModelMapToQuery = new Map<string, string>();
for await (const row of iModel.query(ecsql, QueryBinder.from(ipeIds), {
for await (const row of iModel.createQueryReader(ecsql, QueryBinder.from(ipeIds), {
rowFormat: QueryRowFormat.UseJsPropertyNames,
})) {
const relatedModelId = ipeToModel.get(row.ipeId);
Expand Down Expand Up @@ -1063,7 +1063,7 @@ export class ChangedElementsManager {
ecsql = ecsql.substring(0, ecsql.length - 1) + ")";

const ipeToModel = new Map<string, string>();
for await (const row of iModel.query(ecsql, QueryBinder.from(modelIds), {
for await (const row of iModel.createQueryReader(ecsql, QueryBinder.from(modelIds), {
rowFormat: QueryRowFormat.UseJsPropertyNames,
})) {
// If we don't have specific Json Props, we have the proper model Id already
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ export class ChangesTreeDataProvider implements ITreeDataProvider {
models +
")" +
(filterIsPrivate ? " AND IsPrivate = false" : "");
const response = iModel.query(ecsql, undefined, {
const response = iModel.createQueryReader(ecsql, undefined, {
rowFormat: QueryRowFormat.UseJsPropertyNames,
});
const idsOfClass: string[] = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export const queryEntryData = async (
queryString = queryString.substr(0, queryString.length - 1) + ")";
elemECSQL = elemECSQL + queryString;
const result: ChangedElementQueryData[] = [];
for await (const row of iModel.query(
for await (const row of iModel.createQueryReader(
elemECSQL,
QueryBinder.from(elementIds),
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const getModelSources = async (
try {
const query = makeQuery(modelProps);
const map = new Map<string, string>();
for await (const row of iModel.query(query, undefined, {
for await (const row of iModel.createQueryReader(query, undefined, {
rowFormat: QueryRowFormat.UseJsPropertyNames,
})) {
if (row.id !== undefined && row.jsonProps !== undefined) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const getElementModelsByIds = async (
max = elementIds.length;
}
const current = elementIds.slice(i, max);
for await (const row of targetConnection.query(
for await (const row of targetConnection.createQueryReader(
ecsql,
QueryBinder.from(current),
{
Expand All @@ -61,7 +61,7 @@ const getElementCategories = async (targetConnection: IModelConnection): Promise
const categoryIds = new Set<string>();
const ecsql =
"SELECT DISTINCT Category.Id as catId FROM BisCore.GeometricElement3d";
for await (const row of targetConnection.query(ecsql, undefined, {
for await (const row of targetConnection.createQueryReader(ecsql, undefined, {
rowFormat: QueryRowFormat.UseJsPropertyNames,
})) {
categoryIds.add(row.catId);
Expand Down
6 changes: 3 additions & 3 deletions packages/changed-elements-react/src/api/ReportGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import { VersionCompareManager } from "./VersionCompareManager.js";

export const downloadAsFile = (filename: string, data: string) => {
const blob = new Blob(["\uFEFF", data], { type: "text/csv;charset=utf-18" });
// eslint-disable-next-line @typescript-eslint/no-explicit-any
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unnecessary-type-assertion
if (undefined !== (window.navigator as any).msSaveOrOpenBlob) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unnecessary-type-assertion
(window.navigator as any).msSaveBlob(blob, filename);
} else {
const elem = window.document.createElement("a");
Expand Down Expand Up @@ -348,7 +348,7 @@ export class ReportGenerator extends ReportGeneratorBase {
});
ecsql = ecsql.substr(0, ecsql.length - 1) + ")";
const elementIds = entries.map((entry: ChangedElementEntry) => entry.id);
for await (const row of iModel.query(ecsql, QueryBinder.from(elementIds), {
for await (const row of iModel.createQueryReader(ecsql, QueryBinder.from(elementIds), {
rowFormat: QueryRowFormat.UseJsPropertyNames,
})) {
this._nativeIdMap.set(row.id, row.identifier);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export class PropertyLabelCache {
ecsql += "?,";
});
ecsql = ecsql.substr(0, ecsql.length - 1) + ") AND DisplayLabel<>'NULL'";
for await (const row of iModelConnection.query(
for await (const row of iModelConnection.createQueryReader(
ecsql,
QueryBinder.from(properties.map((prop) => prop.propertyName)),
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ describe("Test ChangedElementsChildrenCache", () => {
const module = await vi.importActual<typeof import("@itwin/core-frontend")>("@itwin/core-frontend");
const BlankConnection = {
create: () => ({
createQueryReader: iModelMocks.queryMatcherFuncMockGenerator([queryMocker]),
query: iModelMocks.queryMatcherFuncMockGenerator([queryMocker]),
changeset: { id: "unknown" },
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ describe("Models Category Cache Tests", () => {
create: () => {
const load = vi.fn();
return {
createQueryReader: queryMockGenerator("_mocked"),
query: queryMockGenerator("_mocked"),
models: { load },
changeset: { id: "unknown" },
Expand Down
16 changes: 8 additions & 8 deletions packages/test-app-backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@itwin/core-backend": "^4.10.6",
"@itwin/core-bentley": "^4.10.6",
"@itwin/core-common": "^4.10.6",
"@itwin/express-server": "^4.10.6",
"@itwin/imodels-access-backend": "^5.2.3",
"@itwin/imodels-client-authoring": "^5.9.0",
"@itwin/presentation-backend": "^4.10.6",
"@itwin/presentation-common": "^4.10.6",
"@itwin/core-backend": "^5.0.0-dev.111",
"@itwin/core-bentley": "^5.0.0-dev.111",
"@itwin/core-common": "^5.0.0-dev.111",
"@itwin/express-server": "^5.0.0-dev.111",
"@itwin/imodels-access-backend": "^6.0.0-dev.1",
"@itwin/imodels-client-authoring": "^6.0.0-dev.1",
"@itwin/presentation-backend": "^5.0.0-dev.111",
"@itwin/presentation-common": "^5.0.0-dev.111",
"@types/dotenv-flow": "^3.2.0",
"@types/node": "^18.0.0",
"dotenv-flow": "^3.2.0",
Expand Down
28 changes: 14 additions & 14 deletions packages/test-app-frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,27 @@
},
"dependencies": {
"@bentley/icons-generic-webfont": "^1.0.34",
"@itwin/appui-abstract": "^4.10.6",
"@itwin/appui-abstract": "^5.0.0-dev.111",
"@itwin/appui-layout-react": "^4.8.3",
"@itwin/appui-react": "5.0.5",
"@itwin/appui-react": "^5.4.0",
"@itwin/changed-elements-react": "workspace:*",
"@itwin/components-react": "5.0.5",
"@itwin/core-bentley": "^4.10.6",
"@itwin/core-common": "^4.10.6",
"@itwin/core-frontend": "^4.10.6",
"@itwin/core-i18n": "^4.10.6",
"@itwin/core-react": "^5.0.5",
"@itwin/imodel-components-react": "^5.0.5",
"@itwin/imodels-access-frontend": "^5.2.3",
"@itwin/imodels-client-management": "^5.9.0",
"@itwin/components-react": "^5.4.0",
"@itwin/core-bentley": "^5.0.0-dev.111",
"@itwin/core-common": "^5.0.0-dev.111",
"@itwin/core-frontend": "^5.0.0-dev.111",
"@itwin/core-i18n": "^5.0.0-dev.111",
"@itwin/core-react": "^5.4.0",
"@itwin/imodel-components-react": "^5.4.0",
"@itwin/imodels-access-frontend": "^6.0.0-dev.1",
"@itwin/imodels-client-management": "^6.0.0-dev.1",
"@itwin/itwinui-icons-react": "^2.9.0",
"@itwin/itwinui-illustrations-react": "^2.1.0",
"@itwin/itwinui-layouts-css": "^0.4.0",
"@itwin/itwinui-layouts-react": "^0.4.1",
"@itwin/itwinui-react": "^3.16.0",
"@itwin/presentation-common": "^4.10.6",
"@itwin/presentation-components": "^5.10.0",
"@itwin/presentation-frontend": "^4.10.6",
"@itwin/presentation-common": "^5.0.0-dev.111",
"@itwin/presentation-components": "^5.12.1",
"@itwin/presentation-frontend": "^5.0.0-dev.111",
"@types/dotenv-flow": "^3.2.0",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
import { ConfigurableCreateInfo, ViewportContentControl } from "@itwin/appui-react";
import { IModelConnection, ScreenViewport } from "@itwin/core-frontend";
import { ViewportComponent, ViewStateProp } from "@itwin/imodel-components-react";
Expand All @@ -19,7 +19,10 @@ export interface PropertyComparisonViewportControlOptions {
* the necessary view state on runtime
*/
export class PropertyComparisonViewportControl extends ViewportContentControl {
constructor(info: ConfigurableCreateInfo, options: PropertyComparisonViewportControlOptions) {
constructor(
info: ConfigurableCreateInfo,
options: PropertyComparisonViewportControlOptions,
) {
super(info, options);

if (options.getViewState) {
Expand All @@ -32,7 +35,7 @@ export class PropertyComparisonViewportControl extends ViewportContentControl {

// for convenience, if window defined bind viewport to window
if (undefined !== window) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unnecessary-type-assertion
(window as any).viewport = v;
}
}}
Expand Down
Loading
Loading