Releases: iTwin/presentation
@itwin/[email protected]
Patch Changes
- #828: Polyfill
Symbol.dispose
andSymbol.asyncDispose
to make sure that code using the upcoming JS recource management API works in all environments.
@itwin/[email protected]
Patch Changes
- #810: Fix the package not being usable in
cjs
builds due to usage ofimport.meta
. - Updated dependencies:
- @itwin/[email protected]
@itwin/[email protected]
Patch Changes
- #828: Polyfill
Symbol.dispose
andSymbol.asyncDispose
to make sure that code using the upcoming JS recource management API works in all environments.
@itwin/[email protected]
Minor Changes
- #827: Changed
onHierarchyLoadError
callback inUseTreeProps
, it now accepts error as one of the props arguments.
Patch Changes
- #828: Polyfill
Symbol.dispose
andSymbol.asyncDispose
to make sure that code using the upcoming JS recource management API works in all environments. - Updated dependencies:
- @itwin/[email protected]
- @itwin/[email protected]
@itwin/[email protected]
Minor Changes
-
#814: Add a
createIModelKey
function to safely create an identifier for anIModel
in different situations.Example:
import { IModelConnection } from "@itwin/core-frontend"; import { createIModelKey } from "@itwin/presentation-core-interop"; IModelConnection.onOpen.addListener((imodel: IModelConnection) => { const key = createIModelKey(imodel); console.log(`IModel opened: "${key}"`); });
@itwin/[email protected]
Minor Changes
- #825:
PresentationInstanceFilterDialog
andPresentationInstanceFilterBuilder
: Fix classes selector not being updated with all classes that contain selected property.PresentationInstanceFilterPropertyInfo
now hassourceClassIds
andsourceClassId
is deprecated.
Patch Changes
- #828: Polyfill
Symbol.dispose
andSymbol.asyncDispose
to make sure that code using the upcoming JS recource management API works in all environments.
@itwin/[email protected]
Minor Changes
-
#800: Add support for Models and SubCategories selection that's going to be available in
@itwin/core-frontend
version5
.The changes in
@itwin/core-frontend
allow us to stop manually syncingHiliteSet
withSelectionSet
and rely on automatic syncing instead. -
#800:
computeSelection
: Broadened the type ofelementIds
prop fromId64String[]
toId64Arg
. -
#802: Prefer
Symbol.dispose
overdispose
for disposable objects.The package contained a number of types for disposable objects, that had a requirement of
dispose
method being called on them after they are no longer needed. In conjunction with theusing
utility from@itwin/core-bentley
, usage of such objects looked like this:class MyDisposable() { dispose() { // do some cleanup } } using(new MyDisposable(), (obj) => { // do something with obj, it'll get disposed when the callback returns });
In version
5.2
, TypeScript introducedDisposable
type andusing
declarations (from the upcoming Explicit Resource Management feature in ECMAScript). Now we're making use of those new utilities in this package (while still supporting the olddispose
method), which allows usingMyDisposable
from the above snippet like this:using obj = new MyDisposable(); // do something with obj, it'll get disposed when it goes out of scope
@itwin/[email protected]
Minor Changes
-
#804: Deprecated all tree-related APIs.
As the new generation hierarchy building APIs are now available, the old tree-related APIs are now deprecated. See reasoning and migration guide here.
Patch Changes
- Updated dependencies:
- @itwin/[email protected]
@itwin/[email protected]
Minor Changes
-
#802: Prefer
Symbol.dispose
overdispose
for disposable objects.The package contained a number of types for disposable objects, that had a requirement of
dispose
method being called on them after they are no longer needed. In conjunction with theusing
utility from@itwin/core-bentley
, usage of such objects looked like this:class MyDisposable() { dispose() { // do some cleanup } } using(new MyDisposable(), (obj) => { // do something with obj, it'll get disposed when the callback returns });
In version
5.2
, TypeScript introducedDisposable
type andusing
declarations (from the upcoming Explicit Resource Management feature in ECMAScript). Now we're making use of those new utilities in this package (while still supporting the olddispose
method), which allows usingMyDisposable
from the above snippet like this:using obj = new MyDisposable(); // do something with obj, it'll get disposed when it goes out of scope
@itwin/[email protected]
Minor Changes
-
#807: Added
getNode
function to tree state hooks to allow getting a node by id.Example usage:
function MyTreeComponentInternal({ imodelAccess }: { imodelAccess: IModelAccess }) { const { rootNodes, getNode, expandNode: doExpandNode, ...state } = useTree({ // tree props }); // enhance the default `expandNode` handler to log the action to console const expandNode = React.useCallback( async (nodeId: string, isExpanded: boolean) => { const node = getNode(nodeId); if (node) { console.log(`${isExpanded ? "Expanding" : "Collapsing"} node: ${node.label}`); } doExpandNode(nodeId, isExpanded); }, [getNode, doExpandNode], ); // render the tree if (!rootNodes || !rootNodes.length) { return "No data to display"; } return <TreeRenderer {...state} expandNode={expandNode} rootNodes={rootNodes} />; }
-
#802: Prefer
Symbol.dispose
overdispose
for disposable objects.The package contained a number of types for disposable objects, that had a requirement of
dispose
method being called on them after they are no longer needed. In conjunction with theusing
utility from@itwin/core-bentley
, usage of such objects looked like this:class MyDisposable() { dispose() { // do some cleanup } } using(new MyDisposable(), (obj) => { // do something with obj, it'll get disposed when the callback returns });
In version
5.2
, TypeScript introducedDisposable
type andusing
declarations (from the upcoming Explicit Resource Management feature in ECMAScript). Now we're making use of those new utilities in this package (while still supporting the olddispose
method), which allows usingMyDisposable
from the above snippet like this:using obj = new MyDisposable(); // do something with obj, it'll get disposed when it goes out of scope
Patch Changes
- Updated dependencies:
- @itwin/[email protected]
- @itwin/[email protected]