2.0.0 Change Notes
This is release 2.0 of iModel.js.
With this annual major release comes many new features and some breaking API changes. Several breaking changes are the removal of previously deprecated APIs. In other cases, some APIs have changed in ways that may require calling code to be adjusted. This document describes these in detail to help you upgrade.
Table of Contents
- 2.0.0 Change Notes
- What's New?
- Breaking API changes
- Installation and Builds
- Changes in
@bentley/imodeljs-clients - Changes in
@bentley/imodeljs-clients-backend - Changes in
@itwin/core-common - Changes in
@itwin/core-backend - Changes in
@itwin/core-frontend - React dependency changes
- Changes in
@itwin/core-react - Changes in
@itwin/components-react - Changes in
@itwin/appui-react - Changes in
@itwin/presentation-common - Changes in
@itwin/presentation-backend - Changes in
@itwin/presentation-frontend - Changes in
@itwin/presentation-components - Changes in
@itwin/presentation-testing - Changes in
@itwin/core-geometry - Changes in
@itwin/ecschema-metadata
What's New?
3D Globe Background Map Display
The background map can now be displayed as either a plane or a three-dimensional globe. This is controlled by the GlobeMode property of the DisplayStyleSettings.backgroundMap associated with a DisplayStyleState.
- GlobeMode.Plane projects the map onto the XY plane.
- GlobeMode.Ellipsoid - the default mode - projects the map onto the WGS84 ellipsoid when sufficiently zoomed-out.
In Plane mode, or in 3d mode when sufficiently zoomed-in on the iModel, the iModel's geographic coordinate system is used to transform the map into the iModel's coordinate space.

Plane mode

Ellipsoid mode
Globe View Tools
The following are view tools that allow a user to navigate a plane or three-dimensional globe. All of these tools operate on the selected view.
- ViewGlobeSatelliteTool views a location on the background map from a satellite's perspective; the viewed location is derived from the position of the current camera's eye above the map.
- ViewGlobeBirdTool views a location on the background map from a bird's eye perspective; the viewed location is derived from the position of the current camera's eye above the globe.
- ViewGlobeLocationTool views a location on the background map corresponding to a specified string. This will either look down at the location using a bird's eye height, or, if a range is available, the entire range corresponding to the location will be viewed.
- ViewGlobeIModelTool views the current iModel on the background map so that the extent of the project is visible.
ViewGlobeSatelliteTool, ViewGlobeBirdTool, and ViewGlobeIModelTool run in the following manner:
- The tool, once constructed, will execute when its
onDataButtonDownoronPostInstallmethods are called. onDataButtonDownwill execute the tool if itsBeButtonEventargument has a definedviewportproperty. It will use that viewport.onPostInstallwill use the viewport specified in the tool's constructor. If that does not exist, it will useIModelApp.viewManager.selectedView.
ViewGlobeLocationTool runs in the following manner:
- The tool, once constructed, will execute when its
parseAndRunmethod is called. - To navigate to a precise latitude/longitude location on the map, specify exactly two numeric arguments to
parseAndRun. The first will be the latitude and the second will be the longitude. These are specified in degrees. - To search for and possibly navigate to a named location, specify any number of string arguments to
parseAndRun. They will be joined with single spaces between them. If a location corresponding to the joined strings can be found, the tool will navigate there.
Customizable Scene Lighting
Previously, lighting of 3d scenes was entirely hard-coded with the exception of the sun direction, used only when shadows were enabled. Now, nearly all lighting parameters can be customized using the LightSettings associated with a DisplayStyle3dSettings. This includes new support for hemisphere lighting, greatly expanding the variety of display styles that can be achieved.

Clockwise from top-left: Default, Illustration, Sun-dappled, Moonlit, Glossy, Soft
Monochrome Mode
iModel.js now supports two monochrome display modes via DisplayStyleSettings.monochromeMode. The original mode, Scaled, preserves contrast and material textures. The new mode, Flat, applies the monochrome color uniformly to all surfaces.

Scaled (left) vs Flat (right) monochrome modes
Colorizing Clip Regions
Viewport now contains the following properties that control the color of pixels outside or inside a clip region. If either of these are defined, the corresponding pixels will be shown using the specified color; otherwise, no color override occurs and clipping proceeds normally for that area of the clip region. By default, these are both undefined.
outsideClipColor- Either a ColorDef or undefined. This setting controls the color override for pixels outside a clip region.insideClipColor- Either a ColorDef or undefined. This setting controls the color override for pixels inside a clip region.

Clipped geometry drawn in yellow - arrow indicates direction of clip plane
Incremental Precompilation of Shaders
Previously, shader programs used by the RenderSystem were never compiled until the first time they were used. This could produce noticeable delays when the user interacts with a Viewport. The RenderSystem can now precompile shader programs before any Viewport is opened.
- To enable this functionality, set the
doIdleWorkproperty of theRenderSystem.Optionsobject passed toIModelApp.startupto true. - Applications should consider enabling this feature if they do not open a Viewport immediately upon startup - for example, if the user is first expected to select an iModel and a view through the user interface.
- Shader precompilation will cease once all shader programs have been compiled, or when a Viewport is opened (registered with the ViewManager).
Thematic Display
ViewFlags now contains a thematicDisplay property of type boolean; when set to true, this will enable thematic display for surfaces.
Note that the renderer currently does not allow surfaces which are thematically displayed to receive shadows.
- The thematic display will be configured based on the
thematicproperty of type ThematicDisplay on DisplayStyle3dSettings.- This property controls the thematic display settings of the 3d display style when thematic display is enabled.
- ThematicDisplay is immutable and must be constructed and altered using an underlying JSON representation. See the corresponding underlying ThematicDisplayProps on the DisplayStyle3dSettingsProps.
- Within the
gradientSettingsproperty on ThematicDisplay, the display system currently supports amodevalue ofThematicGradientMode.Smoothof type ThematicGradientMode. Using this mode, the color gradient will be smoothly interpolated based on the value specified forcolorSchemeon thegradientSettingsproperty of ThematicDisplay. If thecolorSchemeproperty ofgradientSettingsisThematicGradientColorScheme.Custom, then thecustomKeysproperty must be properly configured with values. - For the
displayModeproperty of ThematicDisplay, the display system currently supports the following values:ThematicDisplayMode.Height. Using this mode, the color gradient will be mapped to surface geometry based on world height in meters.ThematicDisplayMode.InverseDistanceWeightedSensors. Using this mode, the color gradient will be mapped to surface geometry using inverse distance weighting based on world positions and corresponding values from a list of sensors.
See the following snippet for the JSON representation of a ThematicDisplay configuration object:
Consult the following code example demonstrating how to enable thematic display and configure the thematic display:

Thematic height mode with a smooth "sea mountain" color gradient applied to surfaces with lighting enabled

Four thematic sensors applied using inverse distance weighting with a smooth "blue-red" color gradient applied to surfaces with lighting disabled
Persistent Schedule Animation State
DisplayStyleSettings.timePoint now identifies the current point on the timeline of the style's RenderSchedule script. The time point is specified in Unix seconds.
To adjust the schedule script time point in the context of a viewport, use Viewport.timePoint.
Breaking API changes
Installation and Builds
Increase minimum Node version
The minimum version of Node required for iModel.js 2.0 applications is now 10.16.0. However, it is recommended to use the latest LTS version of Node 12 for the most recent security patches.
Update to Electron 8
iModel.js 2.0 has moved to the latest stable version of Electron 8. If you are building desktop applications, upgrade the version of electron in your package.json, e.g.:
Update to iModel.js Build System
The iModel.js 1.0 build system relied on a single package (@bentley/webpack-tools) to build iModel.js frontends and extensions. With the release of 2.0, there are significant improvements to the build system to help with both clarity and usability. As a result, the build system is now split into 2 separate components:
- Webpack/bundling of an iModel.js Extension (formerly known as a Plugin) with
@bentley/extension-webpack-tools - The iModel.js frontend build system is now based on Create-React-App. For more details visit the Build Migration Guide.
Deprecation Errors
If you were using or extending the tslint configuration supplied by iModel.js, please note that the default tslint configuration used to report usage of deprecated APIs as warnings. They now produce errors instead.
Changes in @bentley/imodeljs-clients
There are now separate packages
The former @bentley/imodeljs-clients package contained clients for various Bentley-hosted services. It has now been split into the following packages under the /clients/ directory:
@bentley/itwin-client@bentley/context-registry-client@bentley/forms-data-management@bentley/frontend-authorization@bentley/imodelhub-client@bentley/product-settings-client@bentley/projectshare-client@bentley/rbac-client@bentley/reality-data-client@bentley/usage-logging-client
The @bentley/itwin-client package contains the base functionality that all other clients leverage. Update your imports to use specific packages as necessary.
The logger categories setup in @bentley/imodeljs-clients have now migrated to the individual packages, with names consistent with their new location:
| Old code | New package name | New code |
|---|---|---|
ClientsLoggerCategory.Clients |
@bentley/itwin-client |
ITwinClientLoggerCategory.Clients |
ClientsLoggerCategory.ECJson |
@bentley/itwin-client |
ITwinClientLoggerCategory.ECJson |
ClientsLoggerCategory.Request |
@bentley/itwin-client |
ITwinClientLoggerCategory.Request |
ClientsLoggerCategory.IModelHub |
@bentley/imodelhub-client |
IModelHubClientLoggerCategory.IModelHub |
ClientsLoggerCategory.IModelBank |
@bentley/imodelhub-client |
IModelHubClientLoggerCategory.IModelBank |
ClientsLoggerCategory.ImsClients |
Removed | Removed |
ClientsLoggerCategory.UlasClient |
@bentley/usage-logging-client |
UsageLoggingClientLoggerCategory.Client |
Removed support for SAML-based authorization
- All authentication must now be done using OIDC. The iModel.js API includes wrappers around popular 3rd party utilities for OIDC based authentication/authorization for web, desktop and agent applications.
- The previously deprecated SAML-based authentication utilities, ImsActiveSecureTokenClient and ImsDelegationSecureTokenClient, have now been removed.
- 'AccessToken' cannot hold SAML tokens anymore.
- The deprecated OidcAgentClientV1 for SAML-based authentication of agents has been removed.
Removals and changes
The
IAuthorizationClientinterface has been renamed toAuthorizationClient- The
hasExpiredfield in this interface has been removed. - The
hasSignedInfield in this interface has been moved toFrontendAuthorizationClient
- The
Confighas been relocated to@itwin/core-bentleyfrom@bentley/imodeljs-clients. Update your imports:import { Config } from "@itwin/core-bentley";
Changes in @bentley/imodeljs-clients-backend
Package rename
In addition to the @bentley/imodeljs-clients package changes described before, the @bentley/imodeljs-clients-backend package has been renamed to @bentley/backend-itwin-client.
Authorization for Agent Applications
The OidcAgentClient utility has been renamed to AgentAuthorizationClient and OidcAgentClientConfiguration is now renamed to AgentAuthorizationClientConfiguration for consistency.
The older names continue to exist as aliases, but are now marked as deprecated.
Changes in @itwin/core-common
RPC changes
- The major versions of the RPC interfaces have been updated for iModel.js 2.0, and this makes them incompatible with older versions. As a result, 1.x frontends/backends cannot be paired with 2.0 frontends/backends
- For applications that defined custom RPC interfaces, note that function signatures of RPC operations no longer need to include the IModelRpcProps (formerly IModelToken) argument, if not required.
Solar Calculation APIs
The solar calculation functions calculateSolarAngles, calculateSolarDirection, and calculateSunriseOrSunset have moved from the @itwin/core-frontend package to the @itwin/core-common package.
GeometryStream Iteration
The GeometryStreamIteratorEntry exposed by a GeometryStreamIterator has been simplified down to only four members. Access the geometric primitive associated with the entry by type-switching on its type property. For example, code that previously looked like:
Is now written as:
Immutable Color Types
ColorDef is now an immutable type. Naturally, mutating methods like setTransparency have been removed; they are replaced by methods like withTransparency which return a modified copy of the original ColorDef. The constructor is now private; replace new ColorDef(x) with ColorDef.create(x).
HSVColor and HSLColor are also now immutable.
Gradient API
The following have been removed from the Gradient namespace and renamed:
Gradient.ThematicModehas become ThematicGradientMode.Gradient.ThematicColorSchemehas become ThematicGradientColorScheme.Gradient.ThematicSettingsPropshas become ThematicGradientSettingsProps.Gradient.ThematicSettingshas become ThematicGradientSettings.
Gradient.Symb.createThematic now takes a ThematicGradientSettings argument.
Other changes
- The properties formerly under
IModel.iModelTokenhave been promoted to IModel. These renames affect IModelConnection and IModelDb and are described later.
Changes in @itwin/core-backend
Async startup and shutdown
The following methods are now async and return Promise<void>:
Calling code should be updated to await these Promises.
Specifying cache locations
The existing method to specify the briefcase cache location by passing IModelHostConfiguration.briefcaseCacheDir to IModelHost.startup has been deprecated - i.e., this can still be used to match the existing behavior, even if use of it will cause deprecation warnings during compilation.
Starting with this version, a new IModelHostConfiguration.cacheDir has been introduced to specify a root location for all caches including the briefcase cache. The briefcases are organized under the "bc" sub-folder of this location.
If IModelHostConfiguration.cacheDir and the legacy IModelHostConfiguration.briefcaseCacheDir are both not specified, the existing default behavior was to pick a location underneath the temporary directory. This is no more the case.
Starting with version 2.0, the default behavior is to instead pick a location outside of the temporary directory, but still under the home directory of the logged in user. For more details on the new location, see IModelHostConfiguration.cacheDir.
Use IModelHost.cacheDir to get the resolved cache location after startup.
Briefcase iModels - Managing Briefcases at the Backend
The methods for working with Briefcase iModels (those that are synchronized with iModelHub) have been refactored. At the backend many of the methods have been moved from (the now abstract) IModelDb class to either the BriefcaseDb or BriefcaseManager class. At the frontend, the methods have been moved from (the now abstract) IModelConnection class to the RemoteBriefcaseConnection class. More details below -
Opening an iModel from iModelHub at the backend involves two steps - downloading a briefcase of the iModel, and then opening that briefcase. These two operations have been separated out now, and require two different API calls - await the asynchronous call to
BriefcaseManager.downloadto complete the download, and open the briefcase with a synchronous call to BriefcaseDb.open.Before change:
const iModelDb = await IModelDb.open(requestContext, projectId, iModelId, OpenParams.fixedVersion(), IModelVersion.latest());After change:
const downloadOptions: DownloadOptions = {syncMode: FixedVersion}; const briefcaseProps: BriefcaseProps = await BriefcaseManager.download(requestContext, contextId, iModelId, downloadOptions, version); requestContext.enter(); const briefcaseDb = BriefcaseDb.open(requestContext, briefcaseProps.key);
The parameter OpenParams to the open call has been removed, and instead replaced with OpenBriefcaseOptions. The download call takes
DownloadBriefcaseOptions. See above example. Also, the SyncMode option that is part ofDownloadBriefcaseOptionshas been moved from the@itwin/core-backendpackage to@itwin/core-commonpackage. Update your imports like below:import { SyncMode } from "@itwin/core-common";The API now allows downloading briefcases at the backend with a new SyncMode.PullOnly option. e.g.,
const downloadOptions: DownloadOptions = {syncMode: FixedVersion}; const briefcaseProps: BriefcaseProps = await BriefcaseManager.download(requestContext, projectId, iModelId, downloadOptions); requestContext.enter(); const briefcaseDb = BriefcaseDb.open(requestContext, briefcaseProps.key);Downloading iModels with this new option establishes a local briefcase that allows change sets to be pulled from iModelHub and merged in, but disallows pushes back to the iModelHub. e.g.,
briefcaseDb.pullAndMergeChanges(requestContext, IModelVersion.latest());Upon open, a new briefcase is acquired from iModelHub and is meant for exclusive use by that user.
The briefcase is opened read/write to allow merging of change sets even if no changes can be made to it.
BriefcaseDb.onOpen and BriefcaseDb.onOpened events pass a context that may or may not include an AccessToken. i.e., they take
AuthorizedClientRequestContext|ClientRequestContextas a parameter instead ofAuthorizedClientRequestContextRemoved the option to delete the briefcase on close (i.e., KeepBriefcase). Very similar to the open, it should be done in two separate steps, with the close being a synchronous operation now.
Before change:
await iModelDb.close(requestContext, KeepBriefcase.No);After change:
briefcaseDb.close(); await BriefcaseManager.delete(requestContext, briefcaseDb.key);
The following methods have been moved from (the now abstract) IModelDb class to the BriefcaseDb:
IModelDb.pullAndMergeChanges-->BriefcaseDb.pullAndMergeChangesIModelDb.pushChanges-->BriefcaseDb.pushChangesIModelDb.reverseChanges-->BriefcaseDb.reverseChangesIModelDb.reinstateChanges-->BriefcaseDb.reinstateChangesIModelDb.concurrencyControl-->BriefcaseDb.concurrencyControl
The following methods have been moved from IModelDb to BriefcaseManager
IModelDb.create-->BriefcaseManager.create
Snapshot iModels
The methods for working with snapshot iModels have been moved into a new SnapshotDb class, which is a breaking change. The following renames are required:
IModelDb.createSnapshot(static) --> SnapshotDb.createEmptyIModelDb.createSnapshot--> SnapshotDb.createFromIModelDb.openSnapshot--> SnapshotDb.openFileIModelDb.closeSnapshot--> SnapshotDb.close
Other Changes
- BriefcaseId / ReservedBriefcaseId: The former
BriefcaseIdclass has been replaced by theBriefcaseIdtype (which is justnumber) and theReservedBriefcaseIdenumeration. UlasUtilitieshas been renamed toUsageLoggingUtilitiesto better align with name of the newly createdusage-logging-clientpackageExportGraphicsPropsand associated interfaces have been renamed toExportGraphicsOptionsto convey that they are not wire formats.- Entity.forEachProperty has moved from
beta-->public. Please note that the default value ofincludeCustomhas changed fromfalsetotrueto better match typical use.
Changes in @itwin/core-frontend
Authorization in Browsers
OIDC functionality in the browser has been overhauled to better support iModel.js Extensions that may require the user to authenticate with other services.
- IOidcFrontendClient has been supplanted by FrontendAuthorizationClient
- All existing classes which previously implemented IOidcFrontendClient, now implement FrontendAuthorizationClient
DesktopAuthorizationClient
- All existing classes which previously implemented IOidcFrontendClient, now implement FrontendAuthorizationClient
OidcBrowserClienthas been marked as@deprecatedand split into the following classes:BrowserAuthorizationClient- implements
FrontendAuthorizationClient - used to
signIn()andsignOut()the user, in a similar manner toOidcBrowserClient
- implements
BrowserAuthorizationCallbackHandler- handles (via
handleSigninCallback()) all OIDC callbacks received as a result ofsignIn()/signOut()calls made byBrowserAuthorizationClient
- handles (via
Previously, signing in through OidcBrowserClient involved the following process:
The equivalent process for signing in via BrowserAuthorizationClient:
Notably, unlike OidcBrowserClient, BrowserAuthorizationClient does not require a call to initialize() before calling signIn(). Once the class instance has been constructed, signIn() may be called at any point.
However, because OidcBrowserClient.initialize() was where the OIDC callback was being handled before, BrowserAuthorizationCallbackHandler must be used in conjunction with BrowserAuthorizationClient to now complete an OIDC signin.
Aside from the signIn() function supported by all FrontendAuthorizationClient implementations, there are also three new functions specific to BrowserAuthorizationClient — signInSilent(), signInPopup(), and signInRedirect() (which is an alias of signIn()) — allowing more flexibility in how the signin is performed.
For situations where a signin is delayed until after app startup, signInPopup() is encouraged as a way to direct the user towards a login page without redirecting them away from their current UI state.
Signin callbacks generated by any of the signIn methods can be handled easily using a single call to BrowserAuthorizationCallbackHandler``.handleSigninCallback().
Authorization for Desktop Applications
DesktopAuthorizationClient is available for authorization in Desktop Applications. This is meant for use in the renderer process. A configured instance of this class can be used to setup IModelApp.authorizationClient.
IModel, IModelConnection, IModelDb
The properties formerly under IModel.iModelToken have been promoted to IModel. These renames affect IModelConnection and IModelDb:
IModel.iModelToken.contextId-->IModel.contextIdIModel.iModelToken.iModelId--> IModel.iModelIdIModel.iModelToken.changeSetId-->IModel.changeSetId
And for RPC implementations, the following method has been added to replace other uses of IModel.iModelToken:
- IModel.getRpcProps
- This method returns an object of type IModelRpcProps that replaces
IModelTokenandIModelTokenPropsbut maintains the same property names as before.
- This method returns an object of type IModelRpcProps that replaces
Managing Briefcases at the Frontend
Similar to the backend, at the frontend, the following method has been moved from (the now abstract) IModelConnection class:
IModelConnection.open-->RemoteBriefcaseConnection.open
Snapshot iModels
Changes corresponding to the backend have been made to the frontend. The following methods have been moved from (the now abstract) IModelConnection class:
IModelConnection.openSnapshot--> SnapshotConnection.openFileIModelConnection.closeSnapshot--> IModelConnection.close (abstract) and SnapshotConnection.close (concrete)
BlankConnection
A new BlankConnection subclass of of IModelConnection has been introduced for working with reality data services without requiring an iModel. The following renames are required:
IModelConnection.createBlank--> BlankConnection.create
ViewChangeOptions Interface
The ViewChangeOptions interface now has a new optional member, onExtentsError. It provides a way for applications to be notified when a viewing operation hits the view-specific limits for extents (either minimum or maximum size.) If possible, the viewing api will adjust the extents value to the limit, but if onExtentsError is provided, it is called with the error value so it can show a message to the user. If the error should be ignored (i.e. the adjusted value is acceptable), return ViewStatus.Success from onExtentsError.
The signatures of several ViewState methods have been modified to accept a ViewChangeOptions parameter:
Controlling Schedule Script Playback
The internal Viewport.scheduleScriptFraction property has been replaced by Viewport.timePoint, which specifies the current point in time along the viewport's RenderSchedule script timeline, in Unix seconds.
PropertyRecord classes moved to ui-abstract package
This includes the classes in the following files:
- Description.ts
- EditorParams.ts
- PrimitiveTypes.ts
- Record.ts
- Value.ts
The deprecated ToolSettingsValue.ts has been removed.
React dependency changes
For the iModel.js Ui packages, react, react-dom, redux and react-redux dependencies were moved from dependencies to peerDependencies.
The react-redux package was upgraded to "^7.2.0".
Applications with a dependency on the Ui packages must ensure their minimum versions are setup like below -
Changes in @itwin/core-react
Removal of Deprecated APIs
The following items that were marked as @deprecated in the 1.x time frame have been removed:
- UiError (use UiError in @itwin/appui-abstract instead)
- Position for Popup component (Use RelativePosition in @itwin/appui-abstract instead)
Changes in @itwin/components-react
Hard Deprecations
A couple of already @deprecated APIs are now being hard-deprecated by adding a DEPRECATED_ prefix to increase awareness about future removal of the APIs:
TreetoDEPRECATED_Tree. Recommended replacement -ControlledTree.withTreeDragDroptoDEPRECATED_withTreeDragDrop. We don't have a replacement for that yet.
As a short term solution, you can simply do a rename when importing the package, e.g.:
Removals and Changes
Renamed
ITreeNodeLoaderWithProvider.getDataProvider()toITreeNodeLoaderWithProvider.dataProvider.Renamed
PagedTreeNodeLoader.getPageSize()toPagedTreeNodeLoader.pageSize.Renamed
TreeCheckboxStateChangeEventtoTreeCheckboxStateChangeEventArgs.Renamed
TreeNodeEventtoTreeNodeEventArgs.Renamed
TreeSelectionModificationEventtoTreeSelectionModificationEventArgs.Renamed
TreeSelectionReplacementEventtoTreeSelectionReplacementEventArgs.Renamed
useModelSourcetouseTreeModelSource.Renamed
useNodeLoadertouseTreeNodeLoader.Renamed
usePagedNodeLoadertousePagedTreeNodeLoader.Changed
IPropertyValueRenderer.renderto only be allowed to returnReactNode(do not allowPromise<ReactNode>anymore). This makes the calling code much simpler at the cost of a few more complex renderers. To help handle async rendering, a helperuseAsyncValuehook has been added. Example usage:import { useAsyncValue } from "@itwin/components-react"; const MyComponent = (props: { asyncValue : Promise<string> }) => { const value = useAsyncValue(props.asyncValue); return value ?? "Loading..."; };Changed type of
labelattribute fromstringtoPropertyRecordfor these types:BreadcrumbNodePropsTreeModelNodeMutableTreeModelNodeTreeModelNodeInput
Also removed
labelDefinitionattribute inPropertyDataandTreeNodeItemin favor oflabelwhose type changed fromstringtoPropertyRecord.To render
PropertyRecordswe suggest usingPropertyValueRendererManagerAPI:import { PropertyValueRendererManager } from "@itwin/components-react"; const MyComponent = (props: { label: PropertyRecord }) => { return PropertyValueRendererManager.defaultManager.render(props.label); };Removed
HorizontalAlignment. Use theHorizontalAlignmentin @itwin/core-react instead.
Changes in @itwin/appui-react
Renames
A couple of types were renamed to better match their intention:
VisibilityTreetoModelsTreeIModelConnectedVisibilityTreetoIModelConnectedModelsTree
Removal of Deprecated APIs
The following items that were marked as @deprecated in the 1.x time frame have been removed:
- FrontstageDef.inheritZoneStates (never implemented in iModel.js)
- FrontstageDef.hubEnabled (never implemented in iModel.js)
- FrontstageDef.contextToolbarEnabled (never implemented in iModel.js)
- IconSpec (Use IconSpec in @itwin/core-react instead)
- IconProps (Use IconProps in @itwin/core-react instead)
- Icon (Use the Icon component in @itwin/core-react instead)
- ItemDefBase.betaBadge (use badgeType instead)
- ItemProps.betaBadge (use badgeType instead)
- WidgetDef.betaBadge (use badgeType instead)
- WidgetProps.betaBadge (use badgeType instead)
Other changes
Added support for a
StateManagerclass that can be instantiated by the host application. This manager provides centralized state management using Redux actions, reducers and store. This class monitors theReducerRegistryand will automatically update theReduxstore when a new reducer is registered. This allows the store to be incrementally constructed as modules and extensions are loaded.Removed
useControlledTreeflag from the following Prop types:CategoryTreePropsModelsTreePropsSpatialContainmentTreePropsVisibilityComponentProps
The components now always use controlled tree as the internal tree implementation.
Removed
UiFramework.getDefaultRulesetId()andUiFramework.setDefaultRulesetId(). Each component should decide what ruleset it wants to use.Custom registered ToolUiProviders should now return a 'horizontalToolSettingNodes' property that contain an array of ToolSettingsEntry items. These items define the label and editor to use for each value when the Tool Settings container is in its default Horizontal orientation. The existing 'toolSettingsNode' property is still used to specify the UI if the Tool Settings are shown in a floating/rectangular container.
When using the DefaultToolSettingsProvider as specified in the
ToolSettingsManager, the toolSettingsProperty argument toToolSettingsManager.initializeToolSettingsData()has been changed fromToolSettingsPropertyRecord[]toDialogItem[].DialogItemis an interface that you will find in the ui-abstract package in the file DialogItem.ts. The classes in the file ToolSettingsValue.ts have been deprecated and removed from the source tree.
Changes in @itwin/presentation-common
RPC Changes
The following endpoints have been either changed or removed:
PresentationRpcInterface.getDisplayLabelremoved in favor ofPresentationRpcInterface.getDisplayLabelDefinition.PresentationRpcInterface.getDisplayLabelsremoved in favor ofPresentationRpcInterface.getDisplayLabelDefinitions.PresentationRpcInterface.getDisplayLabelsDefinitionsrenamed toPresentationRpcInterface.getDisplayLabelDefinitions.RequestOptionsWithRulesetrequired eitherrulesetIdorrulesetOrId(both optional). Now it only has a required attributerulesetOrId.
In addition, support for stateful backed was removed.
Because of the above breaking PresentationRpcInterface changes its version was changed to 2.0.
Hard Deprecations
Some of already @deprecated APIs are now being hard-deprecated by adding a DEPRECATED_ prefix to increase awareness about future removal of the APIs:
AllInstanceNodesSpecificationtoDEPRECATED_AllInstanceNodesSpecification. Recommended replacement -InstanceNodesOfSpecificClassesSpecification.AllRelatedInstanceNodesSpecificationtoDEPRECATED_AllRelatedInstanceNodesSpecification. Recommended replacement -RelatedInstanceNodesSpecification.ChildNodeSpecificationTypes.AllInstanceNodestoChildNodeSpecificationTypes.DEPRECATED_AllInstanceNodes. Recommended replacement -ChildNodeSpecificationTypes.InstanceNodesOfSpecificClasses.ChildNodeSpecificationTypes.AllRelatedInstanceNodestoChildNodeSpecificationTypes.DEPRECATED_AllRelatedInstanceNodes. Recommended replacement -ChildNodeSpecificationTypes.RelatedInstanceNodes.PropertiesDisplaySpecificationtoDEPRECATED_PropertiesDisplaySpecification. Recommended replacement - using property overrides ofPropertySpecificationtype withisDisplayedattribute.PropertyEditorsSpecificationtoDEPRECATED_PropertyEditorsSpecification. Recommended replacement - using property overrides ofPropertySpecificationtype witheditorattribute.
As a short term solution, you can simply do a rename when importing the package, e.g.:
Removals and Changes
- Removed
@deprecatedAPIs:ECInstanceNodeKey,ECInstanceNodeKeyJSON,ECInstancesNodeKey.instanceKey,NodeKey.isInstanceNodeKey,StandardNodeTypes.ECInstanceNode. Instead, the multi-ECInstance type of node should be used, since ECInstance nodes may be created off of more than one ECInstance. Matching APIs:ECInstancesNodeKey,ECInstancesNodeKeyJSON,ECInstancesNodeKey.instanceKeys,NodeKey.isInstancesNodeKey,StandardNodeTypes.ECInstancesNode. - Removed
Item.labelDefinitionandNode.labelDefinition. Instead,Item.labelandNode.labelshould be used, whose type has been changed fromstringtoLabelDefinition. TheLabelDefinitiontype has not only display value, but also raw value and type information which allows localizing and formatting raw value. - Removed
PersistentKeysContainer. Instead,KeySetJSONshould be used. - Changed
RulesetsFactory.createSimilarInstancesRulesetto async. RemovedRulesetsFactory.createSimilarInstancesRulesetAsync.
Changes in @itwin/presentation-backend
Removals and Changes
PresentationManager.getDisplayLabelwas removed in favor ofPresentationManager.getDisplayLabelDefinitionPresentationManager.getDisplayLabelswas removed in favor ofPresentationManager.getDisplayLabelDefinitionsPresentationManager.getDisplayLabelsDefinitionswas renamed toPresentationManager.getDisplayLabelDefinitionsRulesetEmbeddernow takes a "props" object instead of arguments' list in its constructor. Example fix:const embedder = new RulesetEmbedder({ imodel });instead of:
const embedder = new RulesetEmbedder(imodel);
Changes in @itwin/presentation-frontend
Removals and Changes
Presentation.initializeis now async.PresentationManager.getDisplayLabelwas removed in favor ofPresentationManager.getDisplayLabelDefinitionPresentationManager.getDisplayLabelswas removed in favor ofPresentationManager.getDisplayLabelDefinitionsPresentationManager.getDisplayLabelsDefinitionswas renamed toPresentationManager.getDisplayLabelDefinitionsPersistenceHelperwas removed in favor ofKeySetand itstoJSONandfromJSONfunctions.HiliteSetProviderandSelectionHandlernow take a "props" object instead of arguments' list in constructor. Example fix:const provider = new HiliteSetProvider({ imodel });instead of:
const provider = new HiliteSetProvider(imodel);
Changes in @itwin/presentation-components
Hard Deprecations
Some of already @deprecated APIs are now being hard-deprecated by adding a DEPRECATED_ prefix to increase awareness about future removal of the APIs:
controlledTreeWithFilteringSupportrenamed toDEPRECATED_controlledTreeWithFilteringSupport. Recommended replacement -useControlledTreeFilteringReact hook.controlledTreeWithVisibleNodesrenamed toDEPRECATED_controlledTreeWithVisibleNodes. This HOC is completely unnecessary when using React hooks which is what we recommend to use with theControlledTreecomponent.treeWithFilteringSupportrenamed toDEPRECATED_treeWithFilteringSupport. Recommended replacement -ControlledTreeanduseControlledTreeFilteringReact hook.treeWithUnifiedSelectionrenamed toDEPRECATED_treeWithUnifiedSelection. Recommended replacement -ControlledTreeanduseUnifiedSelectionTreeEventHandlerReact hook.
As a short term solution, you can simply do a rename when importing the package, e.g.:
Removals and Changes
All presentation data providers that used to memoize all requests now only memoize the last one to preserve consumed memory.
All presentation data providers are now
IDisposable. This means theirdispose()method has to be called whenever they're stopped being used. In the context of a hooks-based React component this can be done like this:import { useDisposable } from "@itwin/core-react"; import { IPresentationDataProvider } from "@itwin/presentation-components"; const MyComponent = () => { const dataProvider = useDisposable(useCallback(() => createSomeDataProvider(), [])); // can use `dataProvider` here - it'll be disposed as needed };In a class based React component the providers have to be disposed in either
componentWillUnmountorcomponentDidUpdatecallbacks, whenever the provider becomes unnecessary.APIs that now take a "props" object instead of arguments' list:
ContentDataProviderPresentationLabelsProviderPresentationPropertyDataProviderPresentationTreeDataProvideruseControlledTreeFilteringuseUnifiedSelectionTreeEventHandlerExample fix:
const provider = new PresentationLabelsProvider({ imodel });instead of:
const provider = new PresentationLabelsProvider(imodel);Removed
FavoritePropertiesDataProvider.customRulesetId. Now it can be supplied when constructing the provider throughFavoritePropertiesDataProviderProps.ruleset.Renamed
LabelsProvidertoPresentationLabelsProvider.Renamed
PresentationNodeLoaderPropstoPresentationTreeNodeLoaderProps.Renamed
PresentationTreeNodeLoaderProps.rulesetIdtoPresentationTreeNodeLoaderProps.ruleset.Renamed
usePresentationNodeLoadertousePresentationTreeNodeLoader.Renamed
useUnifiedSelectionEventHandlertouseUnifiedSelectionTreeEventHandler.Removed attributes from
UnifiedSelectionTreeEventHandlerParams:dataProvider,modelSource. They're now taken fromnodeLoader.
Changes in @itwin/presentation-testing
Removals and Changes
initializehelper function is now async.ContentBuilderandHierarchyBuildernow take a "props" object instead of arguments' list. Example fix:const builder = new ContentBuilder({ imodel, dataProvider });instead of:
const builder = new ContentBuilder(imodel, dataProvider);
Changes in @itwin/core-geometry
Remove deprecated methods
CurveCurveintersection methods that formerly returned a pair of arrays (with matched length and corresponding CurveLocationDetail entries) now return a single array whose entries each have the two corresponding CurveLocationDetails.- The affected methods are
- For computing intersections among of the (simple xy projection of) curves:
- old
CurveCurve.intersectionXY (...) : CurveLocationDetailArrayPair - new
CurveCurve.intersectionXYPairs (...) : CurveLocationDetailPair[]
- old
- For computing intersections among projections of curves with 4d (i.e. perspective) projection:
- old
CurveCurve.intersectionProjectedXY (...) : CurveLocationDetailArrayPair - new
CurveCurve.intersectionProjectedXYPairs (...) : CurveLocationDetailPair[]
- old
- For computing intersections among of the (simple xy projection of) curves:
- If
oldIntersectionsis the old pair of arrays andnewIntersectionsis the new array of pairs,- change
oldIntersections.dataA[i] - to
newIntersections[i].detailA - old
intersections.dataB[i] - to
newIntersections[i].detailB
- change
- The method
CurveCurveIntersectXY.grabResults()is removed --grabPairedResultsis the modernized form.
- The affected methods are
GrowableXYZArraymethodmyArray.distance(i,j)for distance between points identified by indices(i,j)is replaced by- old:
myArray.distance(i,j) - new:
myArray.distanceIndexIndex(i,j) - this clarifies the difference among distance methods:
myArray.distanceIndexToPoint(i: number, point: Point3d)myArray.distanceSquaredIndexIndex(i: number, point: Point3d)
- old:
- In
PointHelpers, the methods to parse variant XYZ data are removed.- In the replacements, the original single callback is replaced by an callback object that can receive start-end callbacks in addition to the primary xyz or xyz pair callback.
- old
Point3dArray.streamXYZ (.. )is removed. - new
VariantPointDataStream.streamXYZ (..) - old
Point3dArray.streamXYZXYZ(..)is removed. - new
VariantPointDataStream.streamXYZXYZ (..)
PolyfaceBuilder- old (improperly cased) method
findOrAddNormalnLineStringis removed. The properly spelled replacement isfindOrAddNormalInLineString(note the added capitalI)
- old (improperly cased) method
ArcSweep- old (improperly cased) method
radiansArraytoPositivePeriodicFractionsis renamedradiansArrayToPositivePeriodicFractions(Note the capital "T")
- old (improperly cased) method
ClipPlaneClipPlanesupports thePlaneAltitudeEvaluatorinterface.- This allows services previously seen as specific to
ClipPlaneto be supported with other plane types (especiallyPlane3dByOriginAndNormal) - old instance method
myClipPlane.evaluatePoint(point)is replaced bymyClipPlane.altitude (point) - old instance method
myClipPlane.dotProductVector(point)is replaced bymyClipPlane.velocity (point) - old instance method
myClipPlane.convexPolygonClipInPlace (. . )is replaced by (static)Point3dArrayPolygonOps.convexPolygonClipInPlace - old instance method
myClipPlane.polygonCrossings(polygonPoints, crossings)is replaced by (static) Point3dArrayPolygonOps.polygonPlaneCrossings (clipPlane, polygonPoints, crossings)` - old static method
myClipPlane.intersectRangeConvexPolygonInPlace (. . )is replaced by (static)IndexedXYZCollectionPolygonOps.intersectRangeConvexPolygonInPlace
- Various methods (usually static createXXXX) that accept
MultiLineStringDataVarianthave previously been marked as deprecated, with replacement methods that include the wordsFromVariantdata. This decision has been reversed, and that short names are again considered ok. This includes:LineString3d.createArrayOfLineString3d (variantLinestringData:MultiLineStringDataVariant): LineString3d[]is un-deprecated, and the mangled namecreateArrayOfLineString3dFromVariantDatais deprecated.
Various method name changes (breaking)
- On Arc3d, there were previously (confusingly) two "get" properties for the internal matrix of the Arc3d.
- arc.matrixRef
- This returns a reference to the matrix.
- This is not changed.
- Direct access to the matrix is dangerous, but the "Ref" qualifier makes that clear.
- arc.matrix
- this formerly returned a clone of the matrix.
- Cloning is expensive.
- this is removed.
- It is replaced by a method (not property)
arc3d.matrixClone () arc3d.matrixClone()clones the matrix.
EllipsoidAPI changed to eliminate use ofPoint2das carrier for a pair of angles.- angle pairs are instead returned in strongly typed
LongitudeLatitudeNumberobjects. - method
ellipsoid.surfaceNormalToRadiansis removed. Useellipsoid.surfaceNormalToAnglesfor the same result in properLongitudeLatitudeNumberform. - method
ellipsoid.intersectRay (ray, rayFractions[], xyz[], thetaPhiRadians[])now returnsthetaPhiRadiansas an array of strongly typedLongitudeLatitudeNumber.- Changes made to callers in core\frontend\BackgroundMapGeometry.ts
SurfaceLocationDetailhas a new (constructor-like) static methodcreateUVNumbersPoint (surface, u, v, point)with the surfaceuandvparameters as separate numeric values (previously packaged asPoint2d)SphereImplicit.intersectSphereRayreturns its surface angle data asLongitudeLatitudePointinstead of asPoint2d.
- angle pairs are instead returned in strongly typed
- arc.matrixRef
Bug fixes
- Apply on-plane tolerances in mesh-plane clip.
ClipUtils.selectIntervals01announces fractional intervals of clipped geometry. The logic previously considered any non-zero interval to be a valid candidate, resulting in extremely small arcs with seep angle less than the smallest non-zero angle. This logic is modified so that any fractional interval shorter thanGeometry.smallFractionalResultis ignored.
Small angle arc issues
- Angle methods for converting an angle to a fraction of an
AngleSweepinterval have added args to specify default return value on near-zero length intervals.- static
AngleSweep.radiansToPositivePeriodicFraction(radians: number, zeroSweepDefault?: number): number; - instance method
angleSweep.radiansToPositivePeriodicFraction(radians: number, zeroSweepDefault?: number): number;
- static
- static const
Geometry.smallFractionis a typical value (1.0e-10) to consider a fraction interval small.
Polyface clipping
- New class
ClippedPolyfaceBuildersis carries output data and options from clip operations - static
ClipUtilities.announceLoopsOfConvexClipPlaneSetIntersectRange(convexSet: ConvexClipPlaneSet | ClipPlane, range: Range3d, loopFunction: (loopPoints: GrowableXYZArray) => void, includeConvexSetFaces?: boolean, includeRangeFaces?: boolean, ignoreInvisiblePlanes?: boolean): void;- Accepts simple
ClipPlanein addition toConvexClipPlaneSet
- Accepts simple
- static
ClipUtilities.loopsOfConvexClipPlaneIntersectionWithRange(allClippers: ConvexClipPlaneSet | UnionOfConvexClipPlaneSets | ClipPlane, range: Range3d, includeConvexSetFaces?: boolean, includeRangeFaces?: boolean, ignoreInvisiblePlanes?: boolean): GeometryQuery[]- accepts
UnionOfConvexClipPlaneSetsandClipPlanein addition toConvexClipPlaneSet
- accepts
- static
ConvexClipPlaneSet.clipInsidePushOutside(xyz: GrowableXYZArray, outsideFragments: GrowableXYZArray[], arrayCache: GrowableXYZArrayCache): GrowableXYZArray | undefined;- clips
xyzpolygon to the clip plane set. Inside result is the return argument; outside fragments (possibly many) are pushed to theoutsideFragmentsarray (which is not cleared first.)
- clips
PolyfaceClipmethods to do both inside and outside clip of polyfaces.- static
PolyfaceClip.clipPolyfaceClipPlane(polyface: Polyface, clipper: ClipPlane, insideClip?: boolean, buildClosureFaces?: boolean): Polyface; - static
PolyfaceClip.clipPolyfaceClipPlaneWithClosureFace(polyface: Polyface, clipper: ClipPlane, insideClip?: boolean, buildClosureFaces?: boolean): Polyface;
- static
Changes in @itwin/ecschema-metadata
Remove deprecated API
- Class
SchemaFileLocaterhas been moved to theecschema-locaterspackage. - Class
SchemaJsonFileLocaterhas been moved to theecschema-locaterspackage. - Class
SchemaFileLocaterhas been moved to theecschema-locaterspackage. - In
Schema, the methods for (de)serializing to/from JSON have been renamed.Schema.toJson()renamed toSchema.toJSON()Schema.deserialize(...)renamed toSchema.fromJSON(...)Schema.deserializeSync(...)renamed toSchema.fromJSONSync(...)
- In
Propertyand all classes deriving fromProperty, the methods for (de)serializing to/from JSON have been renamed.Property.toJson()renamed toProperty.toJSON()Property.deserialize(...)renamed toProperty.fromJSON(s...)Property.deserializeSync(...)renamed toProperty.fromJSONSync(...)
- In
SchemaItemand all classes deriving directly or indirectly fromSchemaItem, the methods for (de)serializing to/from JSON have been renamed.SchemaItem.toJson()renamed toSchemaItem.toJSON()SchemaItem.deserialize(...)renamed toSchemaItem.fromJSON(...)SchemaItem.deserializeSync(...)renamed toSchemaItem.fromJSONSync(...)
Last Updated: 11 June, 2025