diff --git a/.changeset/afraid-ducks-listen.md b/.changeset/afraid-ducks-listen.md deleted file mode 100644 index 9d6654a8c..000000000 --- a/.changeset/afraid-ducks-listen.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@itwin/presentation-hierarchies-react": patch ---- - -Fix tree node loading indicator to match other icons size. diff --git a/.changeset/afraid-panthers-melt.md b/.changeset/afraid-panthers-melt.md deleted file mode 100644 index a859cd56e..000000000 --- a/.changeset/afraid-panthers-melt.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -"@itwin/presentation-shared": minor ---- - -Added a number of mapped types: - -- `Props` obtains the type of the first `TFunc` function argument. - - ```ts - function func(props: { x: number, y: string }) { - // ... - } - type FunctionProps = Props; // { x: number, y: string } - ``` - -- `EventListener` obtains the event listener type of given event type. - - ```ts - type MyEvent = Event<(arg: number) => void>; - type MyEventListener = EventListener; // (arg: number) => void - ``` - -- `EventArgs` obtains the type of the first event listener's argument of given event type. - - ```ts - type MyEvent = Event<(arg: { x: number, y: string }) => void>; - type MyEventArgs = EventArgs; // { x: number, y: string } - ``` diff --git a/.changeset/four-games-build.md b/.changeset/four-games-build.md deleted file mode 100644 index b4f0bfaa4..000000000 --- a/.changeset/four-games-build.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@itwin/presentation-hierarchies-react": patch -"@itwin/presentation-components": patch ---- - -Bump package dependencies. diff --git a/.changeset/neat-carpets-melt.md b/.changeset/neat-carpets-melt.md deleted file mode 100644 index 4443dae2e..000000000 --- a/.changeset/neat-carpets-melt.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@itwin/presentation-hierarchies-react": patch ---- - -Add missing `ref` to the placeholder and error nodes to have correct styling in virtualized small tree. diff --git a/.changeset/rude-ligers-vanish.md b/.changeset/rude-ligers-vanish.md deleted file mode 100644 index cfcee8b41..000000000 --- a/.changeset/rude-ligers-vanish.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@itwin/presentation-hierarchies": minor ---- - -Extended `createPredicateBasedHierarchyDefinition` props to accept `HierarchyDefinition` functions: `parseNode`, `preProcessNode` and `postProcessNode`. - -The change allows creating a fully capable `HierarchyDefinition` with all the custom behaviors provided by those functions. diff --git a/.changeset/seven-turtles-train.md b/.changeset/seven-turtles-train.md deleted file mode 100644 index 919723bbe..000000000 --- a/.changeset/seven-turtles-train.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@itwin/presentation-hierarchies-react": minor ---- - -Added `size` property to `TreeNodeRenderer` to improve styling of `small` tree. diff --git a/.changeset/silly-eyes-lie.md b/.changeset/silly-eyes-lie.md deleted file mode 100644 index 7bd26681e..000000000 --- a/.changeset/silly-eyes-lie.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -"@itwin/presentation-hierarchies-react": minor -"@itwin/presentation-hierarchies": minor ---- - -Unify hierarchy updates' handling. - -Previously, we'd only raise the `HierarchyProvider.hierarchyChanged` event on data source changes. The tree state hooks would listen to this event and trigger a hierarchy update. However, there are a few other reasons for the hierarchy to change - changing formatter or active hierarchy filter. In those situations the event was not raised, but tree state hooks still had to trigger hierarchy update. So we ended up with a mix of event-driven and manual hierarchy updates. - -With this change we're clearly stating that a hierarchy provider should trigger its `hierarchyChanged` event whenever something happens that causes the hierarchy to change. That means, the event will be raised when formatter or hierarchy filter is set, and tree state hooks can initiate hierarchy reload from a single place - the `hierarchyChanged` event listener. - -To let event listeners know what caused the hierarchy change, the event now has event arguments, which should be set by the hierarchy provider when raising the event. This allows listeners to customize hierarchy reload logic - for example, our tree state hooks always keep existing tree state except when a new hierarchy filter is set, in which case the existing state is discarded. diff --git a/.changeset/strong-cherries-sort.md b/.changeset/strong-cherries-sort.md deleted file mode 100644 index e70e07903..000000000 --- a/.changeset/strong-cherries-sort.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -"@itwin/presentation-hierarchies": minor ---- - -Added hierarchy filtering helper to make hierarchy filtering easier to implement. - -The helper can be created using the `createHierarchyFilteringHelper` function and supplying it the root level filtering paths and parent node. From there, filtering information for specific hierarchy level is determined and an object with the following attributes is returned: - -- `hasFilter` tells if the hierarchy level has a filter applied. -- `hasFilterTargetAncestor` tells if there's a filter target ancestor node up in the hierarchy. -- `getChildNodeFilteringIdentifiers()` returns an array of hierarchy node identifiers that apply specifically for this hierarchy level. -- `createChildNodeProps()` and `createChildNodePropsAsync()` return attributes that should be applied to nodes in filtered hierarchy levels, after applying the filter. - -See the [Implementing hierarchy filtering support](./learning/CustomHierarchyProviders.md#implementing-hierarchy-filtering-support) learning page for a usage example. - -In addition, deprecated a few APIs that are replaced by filtering helper: - -- `extractFilteringProps` function, -- `HierarchyNodeFilteringProps.create` function. diff --git a/.changeset/thick-books-itch.md b/.changeset/thick-books-itch.md deleted file mode 100644 index 6b25a3a33..000000000 --- a/.changeset/thick-books-itch.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@itwin/presentation-components": patch ---- - -Do not clear filter in `UniqueValuesSelector` when value is selected. diff --git a/packages/components/CHANGELOG.md b/packages/components/CHANGELOG.md index 666c8e8dd..aa1f23112 100644 --- a/packages/components/CHANGELOG.md +++ b/packages/components/CHANGELOG.md @@ -1,5 +1,12 @@ # Change Log - @itwin/presentation-components +## 5.6.1 + +### Patch Changes + +- [#786](https://github.com/iTwin/presentation/pull/786): Bump package dependencies. +- [#794](https://github.com/iTwin/presentation/pull/794): Do not clear filter in `UniqueValuesSelector` when value is selected. + ## 5.6.0 ### Minor Changes @@ -14,7 +21,7 @@ - The number of select options is limited to 100. When more items exist, a non-selectable option is displayed at the bottom of the list, prompting users to provide an items filter. Previously, additional pages of select options was loaded when user scrolled to the bottom of the list. - Deprecated `PortalTargetContext`. It is no longer needed. - + This affects `PresentationInstanceFilterBuilder` and `NavigationPropertyEditor` components. - [#754](https://github.com/iTwin/presentation/pull/754): Define `type` and `exports` attributes in `package.json`. diff --git a/packages/components/package.json b/packages/components/package.json index e9b3440dd..1ebb5c020 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -1,6 +1,6 @@ { "name": "@itwin/presentation-components", - "version": "5.6.0", + "version": "5.6.1", "description": "React components based on iTwin.js Presentation library", "license": "MIT", "repository": { diff --git a/packages/core-interop/CHANGELOG.md b/packages/core-interop/CHANGELOG.md index 6d4b13b63..4a9335fa0 100644 --- a/packages/core-interop/CHANGELOG.md +++ b/packages/core-interop/CHANGELOG.md @@ -1,5 +1,12 @@ # @itwin/presentation-core-interop +## 1.1.2 + +### Patch Changes + +- Updated dependencies: + - @itwin/presentation-shared@1.2.0 + ## 1.1.1 ### Patch Changes diff --git a/packages/core-interop/package.json b/packages/core-interop/package.json index e9fc269bb..966645549 100644 --- a/packages/core-interop/package.json +++ b/packages/core-interop/package.json @@ -1,6 +1,6 @@ { "name": "@itwin/presentation-core-interop", - "version": "1.1.1", + "version": "1.1.2", "description": "The package acts as a layer between iTwin.js Core and Presentation packages.", "license": "MIT", "author": { diff --git a/packages/hierarchies-react/CHANGELOG.md b/packages/hierarchies-react/CHANGELOG.md index af60817cb..7c9aee93c 100644 --- a/packages/hierarchies-react/CHANGELOG.md +++ b/packages/hierarchies-react/CHANGELOG.md @@ -1,5 +1,28 @@ # @itwin/presentation-hierarchies-react +## 1.2.0 + +### Minor Changes + +- [#795](https://github.com/iTwin/presentation/pull/795): Added `size` property to `TreeNodeRenderer` to improve styling of `small` tree. +- [#791](https://github.com/iTwin/presentation/pull/791): Unify hierarchy updates' handling. + + Previously, we'd only raise the `HierarchyProvider.hierarchyChanged` event on data source changes. The tree state hooks would listen to this event and trigger a hierarchy update. However, there are a few other reasons for the hierarchy to change - changing formatter or active hierarchy filter. In those situations the event was not raised, but tree state hooks still had to trigger hierarchy update. So we ended up with a mix of event-driven and manual hierarchy updates. + + With this change we're clearly stating that a hierarchy provider should trigger its `hierarchyChanged` event whenever something happens that causes the hierarchy to change. That means, the event will be raised when formatter or hierarchy filter is set, and tree state hooks can initiate hierarchy reload from a single place - the `hierarchyChanged` event listener. + + To let event listeners know what caused the hierarchy change, the event now has event arguments, which should be set by the hierarchy provider when raising the event. This allows listeners to customize hierarchy reload logic - for example, our tree state hooks always keep existing tree state except when a new hierarchy filter is set, in which case the existing state is discarded. + +### Patch Changes + +- [#795](https://github.com/iTwin/presentation/pull/795): Fix tree node loading indicator to match other icons size. +- [#786](https://github.com/iTwin/presentation/pull/786): Bump package dependencies. +- [#794](https://github.com/iTwin/presentation/pull/794): Add missing `ref` to the placeholder and error nodes to have correct styling in virtualized small tree. +- Updated dependencies: + - @itwin/presentation-shared@1.2.0 + - @itwin/presentation-hierarchies@1.3.0 + - @itwin/unified-selection@1.1.2 + ## 1.1.3 ### Patch Changes diff --git a/packages/hierarchies-react/package.json b/packages/hierarchies-react/package.json index e7c1286b5..dcca87f58 100644 --- a/packages/hierarchies-react/package.json +++ b/packages/hierarchies-react/package.json @@ -1,6 +1,6 @@ { "name": "@itwin/presentation-hierarchies-react", - "version": "1.1.3", + "version": "1.2.0", "description": "React components based on `@itwin/presentation-hierarchies`", "license": "MIT", "author": { diff --git a/packages/hierarchies/CHANGELOG.md b/packages/hierarchies/CHANGELOG.md index 3d9b63270..12394d4a1 100644 --- a/packages/hierarchies/CHANGELOG.md +++ b/packages/hierarchies/CHANGELOG.md @@ -1,5 +1,42 @@ # @itwin/presentation-hierarchies +## 1.3.0 + +### Minor Changes + +- [#783](https://github.com/iTwin/presentation/pull/783): Extended `createPredicateBasedHierarchyDefinition` props to accept `HierarchyDefinition` functions: `parseNode`, `preProcessNode` and `postProcessNode`. + + The change allows creating a fully capable `HierarchyDefinition` with all the custom behaviors provided by those functions. + +- [#791](https://github.com/iTwin/presentation/pull/791): Unify hierarchy updates' handling. + + Previously, we'd only raise the `HierarchyProvider.hierarchyChanged` event on data source changes. The tree state hooks would listen to this event and trigger a hierarchy update. However, there are a few other reasons for the hierarchy to change - changing formatter or active hierarchy filter. In those situations the event was not raised, but tree state hooks still had to trigger hierarchy update. So we ended up with a mix of event-driven and manual hierarchy updates. + + With this change we're clearly stating that a hierarchy provider should trigger its `hierarchyChanged` event whenever something happens that causes the hierarchy to change. That means, the event will be raised when formatter or hierarchy filter is set, and tree state hooks can initiate hierarchy reload from a single place - the `hierarchyChanged` event listener. + + To let event listeners know what caused the hierarchy change, the event now has event arguments, which should be set by the hierarchy provider when raising the event. This allows listeners to customize hierarchy reload logic - for example, our tree state hooks always keep existing tree state except when a new hierarchy filter is set, in which case the existing state is discarded. + +- [#783](https://github.com/iTwin/presentation/pull/783): Added hierarchy filtering helper to make hierarchy filtering easier to implement. + + The helper can be created using the `createHierarchyFilteringHelper` function and supplying it the root level filtering paths and parent node. From there, filtering information for specific hierarchy level is determined and an object with the following attributes is returned: + + - `hasFilter` tells if the hierarchy level has a filter applied. + - `hasFilterTargetAncestor` tells if there's a filter target ancestor node up in the hierarchy. + - `getChildNodeFilteringIdentifiers()` returns an array of hierarchy node identifiers that apply specifically for this hierarchy level. + - `createChildNodeProps()` and `createChildNodePropsAsync()` return attributes that should be applied to nodes in filtered hierarchy levels, after applying the filter. + + See the [Implementing hierarchy filtering support](./learning/CustomHierarchyProviders.md#implementing-hierarchy-filtering-support) learning page for a usage example. + + In addition, deprecated a few APIs that are replaced by filtering helper: + + - `extractFilteringProps` function, + - `HierarchyNodeFilteringProps.create` function. + +### Patch Changes + +- Updated dependencies: + - @itwin/presentation-shared@1.2.0 + ## 1.2.1 ### Patch Changes diff --git a/packages/hierarchies/package.json b/packages/hierarchies/package.json index 7aeca6910..67854b9dd 100644 --- a/packages/hierarchies/package.json +++ b/packages/hierarchies/package.json @@ -1,6 +1,6 @@ { "name": "@itwin/presentation-hierarchies", - "version": "1.2.1", + "version": "1.3.0", "description": "A package for creating hierarchies based on data in iTwin.js iModels.", "license": "MIT", "author": { diff --git a/packages/shared/CHANGELOG.md b/packages/shared/CHANGELOG.md index 1b1a263f2..c995cce32 100644 --- a/packages/shared/CHANGELOG.md +++ b/packages/shared/CHANGELOG.md @@ -1,5 +1,34 @@ # @itwin/presentation-shared +## 1.2.0 + +### Minor Changes + +- [#791](https://github.com/iTwin/presentation/pull/791): Added a number of mapped types: + + - `Props` obtains the type of the first `TFunc` function argument. + + ```ts + function func(props: { x: number; y: string }) { + // ... + } + type FunctionProps = Props; // { x: number, y: string } + ``` + + - `EventListener` obtains the event listener type of given event type. + + ```ts + type MyEvent = Event<(arg: number) => void>; + type MyEventListener = EventListener; // (arg: number) => void + ``` + + - `EventArgs` obtains the type of the first event listener's argument of given event type. + + ```ts + type MyEvent = Event<(arg: { x: number; y: string }) => void>; + type MyEventArgs = EventArgs; // { x: number, y: string } + ``` + ## 1.1.0 ### Minor Changes diff --git a/packages/shared/package.json b/packages/shared/package.json index 8af59dc7e..8ed23f36d 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -1,6 +1,6 @@ { "name": "@itwin/presentation-shared", - "version": "1.1.0", + "version": "1.2.0", "description": "The package contains types and utilities used across different iTwin.js Presentation packages.", "license": "MIT", "author": { diff --git a/packages/testing/CHANGELOG.md b/packages/testing/CHANGELOG.md index 6e4ee18f5..211e89159 100644 --- a/packages/testing/CHANGELOG.md +++ b/packages/testing/CHANGELOG.md @@ -1,5 +1,12 @@ # Change Log - @itwin/presentation-testing +## 5.1.2 + +### Patch Changes + +- Updated dependencies: + - @itwin/presentation-components@5.6.1 + ## 5.1.1 ### Patch Changes diff --git a/packages/testing/package.json b/packages/testing/package.json index 95789a8fd..621cfc406 100644 --- a/packages/testing/package.json +++ b/packages/testing/package.json @@ -1,6 +1,6 @@ { "name": "@itwin/presentation-testing", - "version": "5.1.1", + "version": "5.1.2", "description": "Testing utilities for iTwin.js Presentation library", "license": "MIT", "repository": { diff --git a/packages/unified-selection/CHANGELOG.md b/packages/unified-selection/CHANGELOG.md index e7d7e0770..a113929fc 100644 --- a/packages/unified-selection/CHANGELOG.md +++ b/packages/unified-selection/CHANGELOG.md @@ -1,5 +1,12 @@ # @itwin/unified-selection +## 1.1.2 + +### Patch Changes + +- Updated dependencies: + - @itwin/presentation-shared@1.2.0 + ## 1.1.1 ### Patch Changes diff --git a/packages/unified-selection/package.json b/packages/unified-selection/package.json index 1aefdd450..f38f1531e 100644 --- a/packages/unified-selection/package.json +++ b/packages/unified-selection/package.json @@ -1,6 +1,6 @@ { "name": "@itwin/unified-selection", - "version": "1.1.1", + "version": "1.1.2", "description": "Package for managing unified selection in iTwin.js applications.", "license": "MIT", "repository": {