Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
a27f020
Added new models tree package cleaned up some code, and getting prepp…
CalebGerman May 24, 2024
4aaf2d8
Updated packages init commit
CalebGerman May 29, 2024
dd25b2c
WIP Got Deps to work for change elements react, now working on Fronte…
CalebGerman May 30, 2024
5c2fd7e
Frontend app is now working, but styles for the front end app still s…
CalebGerman May 31, 2024
269a9b7
Updated package .json
CalebGerman May 31, 2024
c4a11be
Fixed styling
CalebGerman May 31, 2024
cd46ee6
WIP test models tree working
CalebGerman Jun 3, 2024
ff8c17e
Merge branch 'Cgerman/models_tree' into cgerman/package_upgrades
CalebGerman Jun 3, 2024
3fd0ea1
Renamed symbols and edited work flow to include change elements entries
CalebGerman Jun 4, 2024
8a1892b
Remove need to find parents when using v2 inspector
CalebGerman Jun 4, 2024
683d037
Applied optimizations
CalebGerman Jun 5, 2024
5b5d296
Fixed up models tress and I am now accessing props in a type safe way
CalebGerman Jun 5, 2024
f16280b
Colors for categories and models
CalebGerman Jun 12, 2024
9b31acb
Cleaned things up and got widget coloring to work
CalebGerman Jun 18, 2024
7c0d7fe
Merge remote-tracking branch 'origin/master' into Cgerman/package_upg…
CalebGerman Jul 25, 2024
f0a1824
Stateless widget example code up and running
CalebGerman Jul 31, 2024
68bf7e7
Added func for node label render
CalebGerman Jul 31, 2024
3d65f00
Extracted out all relevant data for coloring
CalebGerman Aug 2, 2024
038a23b
Got new models tree working. Code needs to be cleaned up
CalebGerman Aug 2, 2024
aee5a1f
Added todo
CalebGerman Aug 2, 2024
9427cac
Added mode switching and updated labels
CalebGerman Aug 14, 2024
c07d76a
Moved Files Around
CalebGerman Aug 15, 2024
a13f847
Created new files and moved out smaller components
CalebGerman Aug 15, 2024
9a4006b
WIP filtering
CalebGerman Aug 15, 2024
e4bfc94
Added back state but need to make state passed in for filter header
CalebGerman Aug 16, 2024
43a5d3f
WIP working on property filtering
CalebGerman Aug 16, 2024
9171a8f
Property filtering completed
CalebGerman Aug 16, 2024
738284b
WIP filtering for models tree
CalebGerman Aug 19, 2024
8439a62
WIP class name query
CalebGerman Aug 23, 2024
d429075
WIP getting class names
CalebGerman Aug 23, 2024
c71934d
Finished Mapping of Class id's to name
CalebGerman Aug 23, 2024
5240d5f
WIP Filtering Working
CalebGerman Aug 26, 2024
25c9baa
WIP Filtering
CalebGerman Aug 26, 2024
6c98a51
Working filtering and models tree
CalebGerman Aug 26, 2024
d48d6ce
Models tree working but need to increase instance key limit
CalebGerman Aug 26, 2024
66d6850
Updated models tree
CalebGerman Sep 9, 2024
213e099
Extracted out node label logic to its own module
CalebGerman Sep 9, 2024
db3a80c
Moved filter logic out
CalebGerman Sep 9, 2024
1efa12c
Added guard for extra querying
CalebGerman Sep 9, 2024
fa6d911
Fixed mode selector
CalebGerman Sep 9, 2024
d7c3e96
Changed number of elements displayed
CalebGerman Sep 9, 2024
1584100
Changed number of elements displayed
CalebGerman Sep 9, 2024
20bb6ba
Changed color coding
CalebGerman Sep 11, 2024
5198267
WIP package updates and filtering on models level
CalebGerman Oct 15, 2024
b004072
Updated tree widget
CalebGerman Nov 12, 2024
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
55 changes: 31 additions & 24 deletions packages/changed-elements-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,16 @@
"typecheck": "tsc --noEmit"
},
"devDependencies": {
"@itwin/appui-abstract": "^4.0.6",
"@itwin/components-react": "^4.3.0",
"@itwin/core-bentley": "^4.0.6",
"@itwin/core-common": "^4.0.6",
"@itwin/core-frontend": "^4.0.6",
"@itwin/core-geometry": "^4.0.6",
"@itwin/core-react": "^4.3.0",
"@itwin/presentation-common": "^4.0.6",
"@itwin/presentation-components": "^4.0.1",
"@itwin/presentation-frontend": "^4.0.6",
"@itwin/appui-abstract": "^4.9.4",
"@itwin/components-react": "^4.16.1",
"@itwin/core-bentley": "^4.9.4",
"@itwin/core-common": "^4.9.4",
"@itwin/core-frontend": "^4.9.4",
"@itwin/core-geometry": "^4.9.4",
"@itwin/core-react": "^4.16.1",
"@itwin/presentation-common": "^4.9.4",
"@itwin/presentation-components": "^5.4.2",
"@itwin/presentation-frontend": "^4.9.4",
"@testing-library/react": "^12.1.5",
"@types/react": "^17.0.0",
"@types/react-redux": "^7.1.25",
Expand All @@ -71,24 +71,31 @@
"vitest": "^0.34.6"
},
"peerDependencies": {
"@itwin/appui-abstract": "^4.0.6",
"@itwin/components-react": "^4.3.0",
"@itwin/core-bentley": "^4.0.6",
"@itwin/core-common": "^4.0.6",
"@itwin/core-frontend": "^4.0.6",
"@itwin/core-geometry": "^4.0.6",
"@itwin/core-react": "^4.3.0",
"@itwin/presentation-common": "^4.0.6",
"@itwin/presentation-components": "^4.0.1",
"@itwin/presentation-frontend": "^4.0.6",
"@itwin/appui-abstract": "^4.9.4",
"@itwin/components-react": "^4.16.1",
"@itwin/core-bentley": "^4.9.4",
"@itwin/core-common": "^4.9.4",
"@itwin/core-frontend": "^4.9.4",
"@itwin/core-geometry": "^4.9.4",
"@itwin/core-react": "^4.16.1",
"@itwin/presentation-common": "^4.9.4",
"@itwin/presentation-components": "^5.4.2",
"@itwin/presentation-frontend": "^4.9.4",
"react": "^17.0.0 || ^18.0.0",
"react-dom": "^17.0.0 || ^18.0.0"
},
"dependencies": {
"@itwin/itwinui-icons-react": "^2.2.0",
"@itwin/itwinui-react": "^2.11.11",
"@itwin/core-orbitgt": "4.9.4",
"@itwin/ecschema-metadata": "^4.9.4",
"@itwin/ecschema-rpcinterface-common": "^4.9.4",
"@itwin/itwinui-icons-react": "^2.9.0",
"@itwin/itwinui-react": "^3.13.4",
"@itwin/tree-widget-react": "3.0.2",
"@itwin/unified-selection": "^0.5.0",
"react-table": "^7.8.0",
"react-window": "^1.8.8",
"react-window-infinite-loader": "^1.0.8"
"react-window": "^1.8.10",
"react-window-infinite-loader": "^1.0.9",
"uuid": "^10.0.0",
"@itwin/presentation-hierarchies": "1.1.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ export class ChangedElementEntryCache {
public get labels(): ChangedElementsLabelsCache | undefined {
return this._labels;
}

private _subjectIds: Set<string> = new Set<string>();
public get subjectIds(): Set<string> {
return this._subjectIds;
}

private _childrenCache: ChangedElementsChildrenCache | undefined;
public get childrenCache(): ChangedElementsChildrenCache | undefined {
return this._childrenCache;
Expand Down Expand Up @@ -128,11 +134,12 @@ export class ChangedElementEntryCache {
* Initialize the changed elmeent entry cache with a bunch of changed elmeents
* @param elements Map of changed elements
*/
public initialize(
public async initialize(
currentIModel: IModelConnection,
targetIModel: IModelConnection,
elements: Map<string, ChangedElement>,
progressLoadingEvent?: BeEvent<(message: string) => void>,
cacheLabelsAndChildrenOfEntries = true,
) {
this._progressLoadingEvent = progressLoadingEvent;
elements.forEach((element: ChangedElement, elementId: string) => {
Expand All @@ -149,15 +156,16 @@ export class ChangedElementEntryCache {
};
this._changedElementEntries.set(elementId, entry);
});

this._currentIModel = currentIModel;
this._targetIModel = targetIModel;
this._labels = new ChangedElementsLabelsCache(currentIModel, targetIModel);
this._childrenCache = new ChangedElementsChildrenCache(
currentIModel,
targetIModel,
elements,
);
if (cacheLabelsAndChildrenOfEntries) {
this._currentIModel = currentIModel;
this._targetIModel = targetIModel;
this._labels = new ChangedElementsLabelsCache(currentIModel, targetIModel);
this._childrenCache = new ChangedElementsChildrenCache(
currentIModel,
targetIModel,
elements,
);
}
}

/**
Expand Down Expand Up @@ -348,6 +356,16 @@ export class ChangedElementEntryCache {
return this._getCachedEntriesByIds(elementIds);
}

/**
* Gets changed element entries for the given element Ids.
* @param elementId Element Id to obtain entry
*/
public getSynchronous(elementId: string): ChangedElementEntry | undefined {
// Return the entries since they should be cached now
return this._changedElementEntries.get(elementId)
}


/**
* Initially loads the given element ids to be visualized and displayed in UI
* @param elementIds
Expand Down
Loading