@itwin/presentation-hierarchies-react 2.0.0-alpha.52 → 2.0.0-alpha.54

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/lib/esm/presentation-hierarchies-react/Renderers.d.ts +62 -55
  3. package/lib/esm/presentation-hierarchies-react/Renderers.d.ts.map +1 -1
  4. package/lib/esm/presentation-hierarchies-react/TreeNode.d.ts +33 -29
  5. package/lib/esm/presentation-hierarchies-react/TreeNode.d.ts.map +1 -1
  6. package/lib/esm/presentation-hierarchies-react/UseIModelTree.d.ts +27 -16
  7. package/lib/esm/presentation-hierarchies-react/UseIModelTree.d.ts.map +1 -1
  8. package/lib/esm/presentation-hierarchies-react/UseIModelTree.js +181 -54
  9. package/lib/esm/presentation-hierarchies-react/UseIModelTree.js.map +1 -1
  10. package/lib/esm/presentation-hierarchies-react/UseNodeHighlighting.d.ts +12 -6
  11. package/lib/esm/presentation-hierarchies-react/UseNodeHighlighting.d.ts.map +1 -1
  12. package/lib/esm/presentation-hierarchies-react/UseNodeHighlighting.js +54 -49
  13. package/lib/esm/presentation-hierarchies-react/UseNodeHighlighting.js.map +1 -1
  14. package/lib/esm/presentation-hierarchies-react/UseSelectionHandler.d.ts +7 -30
  15. package/lib/esm/presentation-hierarchies-react/UseSelectionHandler.d.ts.map +1 -1
  16. package/lib/esm/presentation-hierarchies-react/UseSelectionHandler.js +116 -74
  17. package/lib/esm/presentation-hierarchies-react/UseSelectionHandler.js.map +1 -1
  18. package/lib/esm/presentation-hierarchies-react/UseTree.d.ts +67 -54
  19. package/lib/esm/presentation-hierarchies-react/UseTree.d.ts.map +1 -1
  20. package/lib/esm/presentation-hierarchies-react/UseTree.js +283 -226
  21. package/lib/esm/presentation-hierarchies-react/UseTree.js.map +1 -1
  22. package/lib/esm/presentation-hierarchies-react/Utils.js +44 -27
  23. package/lib/esm/presentation-hierarchies-react/Utils.js.map +1 -1
  24. package/lib/esm/presentation-hierarchies-react/internal/DisposePolyfill.js +6 -7
  25. package/lib/esm/presentation-hierarchies-react/internal/DisposePolyfill.js.map +1 -1
  26. package/lib/esm/presentation-hierarchies-react/internal/TreeActions.js +271 -298
  27. package/lib/esm/presentation-hierarchies-react/internal/TreeActions.js.map +1 -1
  28. package/lib/esm/presentation-hierarchies-react/internal/TreeLoader.js +91 -82
  29. package/lib/esm/presentation-hierarchies-react/internal/TreeLoader.js.map +1 -1
  30. package/lib/esm/presentation-hierarchies-react/internal/TreeModel.d.ts +3 -47
  31. package/lib/esm/presentation-hierarchies-react/internal/TreeModel.js +114 -151
  32. package/lib/esm/presentation-hierarchies-react/internal/TreeModel.js.map +1 -1
  33. package/lib/esm/presentation-hierarchies-react/internal/UseUnifiedSelection.d.ts +32 -37
  34. package/lib/esm/presentation-hierarchies-react/internal/UseUnifiedSelection.d.ts.map +1 -1
  35. package/lib/esm/presentation-hierarchies-react/internal/UseUnifiedSelection.js +128 -101
  36. package/lib/esm/presentation-hierarchies-react/internal/UseUnifiedSelection.js.map +1 -1
  37. package/lib/esm/presentation-hierarchies-react/internal/Utils.js +29 -44
  38. package/lib/esm/presentation-hierarchies-react/internal/Utils.js.map +1 -1
  39. package/lib/esm/presentation-hierarchies-react/stratakit/ErrorItemRenderer.d.ts +24 -13
  40. package/lib/esm/presentation-hierarchies-react/stratakit/ErrorItemRenderer.d.ts.map +1 -1
  41. package/lib/esm/presentation-hierarchies-react/stratakit/ErrorItemRenderer.js +344 -67
  42. package/lib/esm/presentation-hierarchies-react/stratakit/ErrorItemRenderer.js.map +1 -1
  43. package/lib/esm/presentation-hierarchies-react/stratakit/FlatTreeNode.d.ts +16 -15
  44. package/lib/esm/presentation-hierarchies-react/stratakit/FlatTreeNode.d.ts.map +1 -1
  45. package/lib/esm/presentation-hierarchies-react/stratakit/FlatTreeNode.js +78 -60
  46. package/lib/esm/presentation-hierarchies-react/stratakit/FlatTreeNode.js.map +1 -1
  47. package/lib/esm/presentation-hierarchies-react/stratakit/LocalizationContext.d.ts +122 -117
  48. package/lib/esm/presentation-hierarchies-react/stratakit/LocalizationContext.d.ts.map +1 -1
  49. package/lib/esm/presentation-hierarchies-react/stratakit/LocalizationContext.js +59 -38
  50. package/lib/esm/presentation-hierarchies-react/stratakit/LocalizationContext.js.map +1 -1
  51. package/lib/esm/presentation-hierarchies-react/stratakit/RootErrorRenderer.d.ts +16 -5
  52. package/lib/esm/presentation-hierarchies-react/stratakit/RootErrorRenderer.d.ts.map +1 -1
  53. package/lib/esm/presentation-hierarchies-react/stratakit/RootErrorRenderer.js +161 -35
  54. package/lib/esm/presentation-hierarchies-react/stratakit/RootErrorRenderer.js.map +1 -1
  55. package/lib/esm/presentation-hierarchies-react/stratakit/TreeAction.d.ts +21 -17
  56. package/lib/esm/presentation-hierarchies-react/stratakit/TreeAction.d.ts.map +1 -1
  57. package/lib/esm/presentation-hierarchies-react/stratakit/TreeAction.js +84 -31
  58. package/lib/esm/presentation-hierarchies-react/stratakit/TreeAction.js.map +1 -1
  59. package/lib/esm/presentation-hierarchies-react/stratakit/TreeErrorRenderer.d.ts +22 -14
  60. package/lib/esm/presentation-hierarchies-react/stratakit/TreeErrorRenderer.d.ts.map +1 -1
  61. package/lib/esm/presentation-hierarchies-react/stratakit/TreeErrorRenderer.js +61 -26
  62. package/lib/esm/presentation-hierarchies-react/stratakit/TreeErrorRenderer.js.map +1 -1
  63. package/lib/esm/presentation-hierarchies-react/stratakit/TreeNodeFilterAction.d.ts +15 -6
  64. package/lib/esm/presentation-hierarchies-react/stratakit/TreeNodeFilterAction.d.ts.map +1 -1
  65. package/lib/esm/presentation-hierarchies-react/stratakit/TreeNodeFilterAction.js +75 -25
  66. package/lib/esm/presentation-hierarchies-react/stratakit/TreeNodeFilterAction.js.map +1 -1
  67. package/lib/esm/presentation-hierarchies-react/stratakit/TreeNodeRenameAction.d.ts +16 -40
  68. package/lib/esm/presentation-hierarchies-react/stratakit/TreeNodeRenameAction.d.ts.map +1 -1
  69. package/lib/esm/presentation-hierarchies-react/stratakit/TreeNodeRenameAction.js +140 -61
  70. package/lib/esm/presentation-hierarchies-react/stratakit/TreeNodeRenameAction.js.map +1 -1
  71. package/lib/esm/presentation-hierarchies-react/stratakit/TreeNodeRenderer.d.ts +14 -42
  72. package/lib/esm/presentation-hierarchies-react/stratakit/TreeNodeRenderer.d.ts.map +1 -1
  73. package/lib/esm/presentation-hierarchies-react/stratakit/TreeNodeRenderer.js +489 -121
  74. package/lib/esm/presentation-hierarchies-react/stratakit/TreeNodeRenderer.js.map +1 -1
  75. package/lib/esm/presentation-hierarchies-react/stratakit/TreeRenderer.d.ts +58 -55
  76. package/lib/esm/presentation-hierarchies-react/stratakit/TreeRenderer.d.ts.map +1 -1
  77. package/lib/esm/presentation-hierarchies-react/stratakit/TreeRenderer.js +412 -181
  78. package/lib/esm/presentation-hierarchies-react/stratakit/TreeRenderer.js.map +1 -1
  79. package/lib/esm/presentation-hierarchies-react.d.ts +17 -17
  80. package/lib/esm/presentation-hierarchies-react.js +15 -18
  81. package/package.json +17 -14
  82. package/lib/esm/presentation-hierarchies-react/Renderers.js +0 -6
  83. package/lib/esm/presentation-hierarchies-react/Renderers.js.map +0 -1
  84. package/lib/esm/presentation-hierarchies-react/TreeNode.js +0 -6
  85. package/lib/esm/presentation-hierarchies-react/TreeNode.js.map +0 -1
  86. package/lib/esm/presentation-hierarchies-react/Utils.d.ts +0 -8
  87. package/lib/esm/presentation-hierarchies-react/Utils.d.ts.map +0 -1
  88. package/lib/esm/presentation-hierarchies-react/internal/DisposePolyfill.d.ts +0 -2
  89. package/lib/esm/presentation-hierarchies-react/internal/DisposePolyfill.d.ts.map +0 -1
  90. package/lib/esm/presentation-hierarchies-react/internal/TreeActions.d.ts +0 -53
  91. package/lib/esm/presentation-hierarchies-react/internal/TreeActions.d.ts.map +0 -1
  92. package/lib/esm/presentation-hierarchies-react/internal/TreeLoader.d.ts +0 -62
  93. package/lib/esm/presentation-hierarchies-react/internal/TreeLoader.d.ts.map +0 -1
  94. package/lib/esm/presentation-hierarchies-react/internal/TreeModel.d.ts.map +0 -1
  95. package/lib/esm/presentation-hierarchies-react/internal/Utils.d.ts +0 -23
  96. package/lib/esm/presentation-hierarchies-react/internal/Utils.d.ts.map +0 -1
  97. package/lib/esm/presentation-hierarchies-react.d.ts.map +0 -1
  98. package/lib/esm/presentation-hierarchies-react.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # @itwin/presentation-hierarchies-react
2
2
 
3
+ ## 2.0.0-alpha.54
4
+
5
+ ### Patch Changes
6
+
7
+ - [#1198](https://github.com/iTwin/presentation/pull/1198): Change `HierarchyProvider.hierarchyChanged` argument to be required.
8
+
9
+ This simplifies the API for users of `HierarchyProvider`, as they no longer need to check for `undefined` when handling hierarchy changes.
10
+
11
+ For implementors of custom `HierarchyProvider`, this change means that they must always provide an even argument when raising the `hierarchyChanged` event. Since all members of the argument type are optional, it's okay to raise the even with an empty object, e.g.: `this.hierarchyChanged.raiseEvent({})`.
12
+
13
+ - [#1200](https://github.com/iTwin/presentation/pull/1200): Removed unnecessary, always-truthy condition checks.
14
+ - [#1193](https://github.com/iTwin/presentation/pull/1193): Process package output with [React Compiler](https://react.dev/reference/react-compiler/compiling-libraries).
15
+ - Updated dependencies:
16
+ - @itwin/presentation-shared@2.0.0-alpha.7
17
+ - @itwin/presentation-hierarchies@2.0.0-alpha.11
18
+
19
+ ## 2.0.0-alpha.53
20
+
21
+ ### Patch Changes
22
+
23
+ - [#1192](https://github.com/iTwin/presentation/pull/1192): Fix situations where expander was rendered for leaf nodes.
24
+ - [#1196](https://github.com/iTwin/presentation/pull/1196): Added accessible name for tree node rename input.
25
+
3
26
  ## 2.0.0-alpha.52
4
27
 
5
28
  ### Patch Changes
@@ -763,6 +786,16 @@
763
786
 
764
787
  - [#847](https://github.com/iTwin/presentation/pull/847): Moving tree rendering components to a new design systems.
765
788
 
789
+ ## 1.9.11
790
+
791
+ ### Patch Changes
792
+
793
+ - [#1208](https://github.com/iTwin/presentation/pull/1208): Bump dependencies.
794
+ - Updated dependencies:
795
+ - @itwin/presentation-hierarchies@1.7.9
796
+ - @itwin/presentation-shared@1.2.8
797
+ - @itwin/unified-selection@1.6.6
798
+
766
799
  ## 1.9.10
767
800
 
768
801
  ### Patch Changes
@@ -1,85 +1,92 @@
1
- import { GenericInstanceFilter, HierarchyNode } from "@itwin/presentation-hierarchies";
2
- import { InstanceKey } from "@itwin/presentation-shared";
3
1
  import { ErrorInfo, TreeNode } from "./TreeNode.js";
4
2
  import { SelectionChangeType } from "./UseSelectionHandler.js";
3
+ import { GenericInstanceFilter, HierarchyNode } from "@itwin/presentation-hierarchies";
4
+ import { InstanceKey } from "@itwin/presentation-shared";
5
+
6
+ //#region src/presentation-hierarchies-react/Renderers.d.ts
5
7
  /**
6
8
  * Type definition used to render tree rendering UI component.
7
9
  * @alpha
8
10
  */
9
- export type TreeRendererProps = {
10
- /**
11
- * Array containing root tree nodes.
12
- */
13
- rootNodes: TreeNode[];
14
- /**
15
- * A function that should be called to either expand or collapse the given node.
16
- */
17
- expandNode: (nodeId: string, isExpanded: boolean) => void;
18
- /**
19
- * A function that should be called to select nodes in the tree.
20
- * @param nodeIds Ids of the nodes that are selected.
21
- * @param changeType Type of change that occurred for the selection.
22
- */
23
- selectNodes: (nodeIds: Array<string>, changeType: SelectionChangeType) => void;
24
- /** Determines whether a given node is selected. */
25
- isNodeSelected: (nodeId: string) => boolean;
11
+ type TreeRendererProps = {
12
+ /**
13
+ * Array containing root tree nodes.
14
+ */
15
+ rootNodes: TreeNode[];
16
+ /**
17
+ * A function that should be called to either expand or collapse the given node.
18
+ */
19
+ expandNode: (nodeId: string, isExpanded: boolean) => void;
20
+ /**
21
+ * A function that should be called to select nodes in the tree.
22
+ * @param nodeIds Ids of the nodes that are selected.
23
+ * @param changeType Type of change that occurred for the selection.
24
+ */
25
+ selectNodes: (nodeIds: Array<string>, changeType: SelectionChangeType) => void;
26
+ /**
27
+ * Determines whether a given node is selected.
28
+ */
29
+ isNodeSelected: (nodeId: string) => boolean;
26
30
  } & CommonRendererProps;
27
31
  /**
28
32
  * Type definition used to render root error handling UI component.
29
33
  * @alpha
30
34
  */
31
- export type RootErrorRendererProps = {
32
- /** Object containing root error information */
33
- error: ErrorInfo;
35
+ type RootErrorRendererProps = {
36
+ /**
37
+ * Object containing root error information
38
+ */
39
+ error: ErrorInfo;
34
40
  } & CommonRendererProps;
35
41
  /**
36
42
  * @alpha
37
43
  */
38
44
  interface CommonRendererProps {
39
- /**
40
- * A function that should be called to reload the tree.
41
- */
42
- reloadTree: (options?: ReloadTreeOptions) => void;
43
- /** Returns hierarchy level details for a given node ID. */
44
- getHierarchyLevelDetails: (nodeId: string | undefined) => HierarchyLevelDetails | undefined;
45
+ /**
46
+ * A function that should be called to reload the tree.
47
+ */
48
+ reloadTree: (options?: ReloadTreeOptions) => void;
49
+ /** Returns hierarchy level details for a given node ID. */
50
+ getHierarchyLevelDetails: (nodeId: string | undefined) => HierarchyLevelDetails | undefined;
45
51
  }
46
52
  /**
47
53
  * Options for doing either full or a sub tree reload.
48
54
  * @public
49
55
  */
50
56
  interface ReloadTreeOptions {
51
- /** Specifies parent node under which sub tree should be reloaded. */
52
- parentNodeId: string | undefined;
53
- /**
54
- * Specifies how current tree state should be handled:
55
- * - `keep` - try to keep current tree state (expanded/collapsed nodes, instance filters, etc.).
56
- * - `discard` - do not try to keep current tree state. Tree model will be update after nodes are reloaded.
57
- * - `reset` - remove subtree from the model before reloading and reload nodes ignoring cache.
58
- *
59
- * Defaults to `"keep"`.
60
- */
61
- state?: "keep" | "discard" | "reset";
57
+ /** Specifies parent node under which sub tree should be reloaded. */
58
+ parentNodeId: string | undefined;
59
+ /**
60
+ * Specifies how current tree state should be handled:
61
+ * - `keep` - try to keep current tree state (expanded/collapsed nodes, instance filters, etc.).
62
+ * - `discard` - do not try to keep current tree state. Tree model will be update after nodes are reloaded.
63
+ * - `reset` - remove subtree from the model before reloading and reload nodes ignoring cache.
64
+ *
65
+ * Defaults to `"keep"`.
66
+ */
67
+ state?: "keep" | "discard" | "reset";
62
68
  }
63
69
  /**
64
70
  * A data structure that contains information about a single hierarchy level.
65
71
  * @public
66
72
  */
67
- export interface HierarchyLevelDetails {
68
- /** The parent node whose hierarchy level's information is contained in this data structure */
69
- hierarchyNode: HierarchyNode | undefined;
70
- /** A function to get instance keys of the hierarchy level. */
71
- getInstanceKeysIterator: (props?: {
72
- instanceFilter?: GenericInstanceFilter;
73
- hierarchyLevelSizeLimit?: number | "unbounded";
74
- }) => AsyncIterableIterator<InstanceKey>;
75
- /** Get the limit of how many nodes can be loaded in this hierarchy level. */
76
- sizeLimit?: number | "unbounded";
77
- /** Set the limit of how many nodes can be loaded in this hierarchy level. */
78
- setSizeLimit: (value: undefined | number | "unbounded") => void;
79
- /** Get the active instance filter applied to this hierarchy level. */
73
+ interface HierarchyLevelDetails {
74
+ /** The parent node whose hierarchy level's information is contained in this data structure */
75
+ hierarchyNode: HierarchyNode | undefined;
76
+ /** A function to get instance keys of the hierarchy level. */
77
+ getInstanceKeysIterator: (props?: {
80
78
  instanceFilter?: GenericInstanceFilter;
81
- /** Set the instance filter to apply to this hierarchy level */
82
- setInstanceFilter: (filter: GenericInstanceFilter | undefined) => void;
79
+ hierarchyLevelSizeLimit?: number | "unbounded";
80
+ }) => AsyncIterableIterator<InstanceKey>;
81
+ /** Get the limit of how many nodes can be loaded in this hierarchy level. */
82
+ sizeLimit?: number | "unbounded";
83
+ /** Set the limit of how many nodes can be loaded in this hierarchy level. */
84
+ setSizeLimit: (value: undefined | number | "unbounded") => void;
85
+ /** Get the active instance filter applied to this hierarchy level. */
86
+ instanceFilter?: GenericInstanceFilter;
87
+ /** Set the instance filter to apply to this hierarchy level */
88
+ setInstanceFilter: (filter: GenericInstanceFilter | undefined) => void;
83
89
  }
84
- export {};
90
+ //#endregion
91
+ export { HierarchyLevelDetails, RootErrorRendererProps, TreeRendererProps };
85
92
  //# sourceMappingURL=Renderers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Renderers.d.ts","sourceRoot":"","sources":["../../../src/presentation-hierarchies-react/Renderers.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AACvF,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE/D;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;OAEG;IACH,SAAS,EAAE,QAAQ,EAAE,CAAC;IACtB;;OAEG;IACH,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,KAAK,IAAI,CAAC;IAC1D;;;;OAIG;IACH,WAAW,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,UAAU,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAC/E,mDAAmD;IACnD,cAAc,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC;CAC7C,GAAG,mBAAmB,CAAC;AAExB;;;GAGG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACnC,+CAA+C;IAC/C,KAAK,EAAE,SAAS,CAAC;CAClB,GAAG,mBAAmB,CAAC;AAExB;;GAEG;AACH,UAAU,mBAAmB;IAC3B;;OAEG;IACH,UAAU,EAAE,CAAC,OAAO,CAAC,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAClD,2DAA2D;IAC3D,wBAAwB,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,KAAK,qBAAqB,GAAG,SAAS,CAAC;CAC7F;AAED;;;GAGG;AACH,UAAU,iBAAiB;IACzB,qEAAqE;IACrE,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;IAEjC;;;;;;;OAOG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC;CACtC;AAED;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC,8FAA8F;IAC9F,aAAa,EAAE,aAAa,GAAG,SAAS,CAAC;IAEzC,8DAA8D;IAC9D,uBAAuB,EAAE,CAAC,KAAK,CAAC,EAAE;QAChC,cAAc,CAAC,EAAE,qBAAqB,CAAC;QACvC,uBAAuB,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC;KAChD,KAAK,qBAAqB,CAAC,WAAW,CAAC,CAAC;IAEzC,6EAA6E;IAC7E,SAAS,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC;IACjC,6EAA6E;IAC7E,YAAY,EAAE,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,GAAG,WAAW,KAAK,IAAI,CAAC;IAEhE,sEAAsE;IACtE,cAAc,CAAC,EAAE,qBAAqB,CAAC;IACvC,+DAA+D;IAC/D,iBAAiB,EAAE,CAAC,MAAM,EAAE,qBAAqB,GAAG,SAAS,KAAK,IAAI,CAAC;CACxE"}
1
+ {"version":3,"file":"Renderers.d.ts","names":[],"sources":["../../../src/presentation-hierarchies-react/Renderers.ts"],"mappings":";;;;;;;;AAcA;;KAAY,iBAAA;EAIC;;;EAAX,SAAA,EAAW,QAAA;EAeU;;;EAXrB,UAAA,GAAa,MAAA,UAAgB,UAAA;EAA7B;;;;;EAMA,WAAA,GAAc,OAAA,EAAS,KAAA,UAAe,UAAA,EAAY,mBAAA;EAAA;;;EAIlD,cAAA,GAAiB,MAAA;AAAA,IACf,mBAAA;;;AAMJ;;KAAY,sBAAA;EAKW;;;EADrB,KAAA,EAAO,SAAA;AAAA,IACL,mBAAA;;AAAoB;;UAKd,mBAAA;EAMuE;;;EAF/E,UAAA,GAAa,OAAA,GAAU,iBAAA;EAEvB;EAAA,wBAAA,GAA2B,MAAA,yBAA+B,qBAAA;AAAA;;;AAAqB;;UAOvE,iBAAA;EAER;EAAA,YAAA;EAiBe;;;;;;;;EAPf,KAAA;AAAA;;;;;UAOe,qBAAA;EAMI;EAJnB,aAAA,EAAe,aAAA;EAGW;EAA1B,uBAAA,GAA0B,KAAA;IACxB,cAAA,GAAiB,qBAAA;IACjB,uBAAA;EAAA,MACI,qBAAA,CAAsB,WAAA;EAKb;EAFf,SAAA;EAKiB;EAHjB,YAAA,GAAe,KAAA;EAKa;EAF5B,cAAA,GAAiB,qBAAA;EAE4C;EAA7D,iBAAA,GAAoB,MAAA,EAAQ,qBAAA;AAAA"}
@@ -1,20 +1,22 @@
1
1
  import { HierarchyNode } from "@itwin/presentation-hierarchies";
2
+
3
+ //#region src/presentation-hierarchies-react/TreeNode.d.ts
2
4
  /**
3
5
  * A type that defines an node in a UI tree component, built with `useTree` hook.
4
6
  * @public
5
7
  */
6
- export interface TreeNode {
7
- id: string;
8
- label: string;
9
- children: true | Array<TreeNode>;
10
- isExpanded: boolean;
11
- isLoading: boolean;
12
- isFilterable: boolean;
13
- isFiltered: boolean;
14
- /** UI-agnostic source of this node object. */
15
- nodeData: HierarchyNode;
16
- /** Contains error encountered from expanding the node */
17
- error?: ErrorInfo;
8
+ interface TreeNode {
9
+ id: string;
10
+ label: string;
11
+ children: true | Array<TreeNode>;
12
+ isExpanded: boolean;
13
+ isLoading: boolean;
14
+ isFilterable: boolean;
15
+ isFiltered: boolean;
16
+ /** UI-agnostic source of this node object. */
17
+ nodeData: HierarchyNode;
18
+ /** Contains error encountered from expanding the node */
19
+ error?: ErrorInfo;
18
20
  }
19
21
  /**
20
22
  * A type of `ErrorInfo` that is returned,
@@ -22,9 +24,9 @@ export interface TreeNode {
22
24
  *
23
25
  * @public
24
26
  */
25
- export interface NoFilterMatchesErrorInfo {
26
- id: string;
27
- type: "NoFilterMatches";
27
+ interface NoFilterMatchesErrorInfo {
28
+ id: string;
29
+ type: "NoFilterMatches";
28
30
  }
29
31
  /**
30
32
  * A type of `ErrorInfo` that is returned, when the
@@ -33,10 +35,10 @@ export interface NoFilterMatchesErrorInfo {
33
35
  *
34
36
  * @public
35
37
  */
36
- export interface ResultSetTooLargeErrorInfo {
37
- id: string;
38
- type: "ResultSetTooLarge";
39
- resultSetSizeLimit: number;
38
+ interface ResultSetTooLargeErrorInfo {
39
+ id: string;
40
+ type: "ResultSetTooLarge";
41
+ resultSetSizeLimit: number;
40
42
  }
41
43
  /**
42
44
  * A type of `ErrorInfo` that contains a user-friendly message to be displayed in the UI.
@@ -45,10 +47,10 @@ export interface ResultSetTooLargeErrorInfo {
45
47
  *
46
48
  * @public
47
49
  */
48
- export interface ChildrenLoadErrorInfo {
49
- id: string;
50
- type: "ChildrenLoad";
51
- message: string;
50
+ interface ChildrenLoadErrorInfo {
51
+ id: string;
52
+ type: "ChildrenLoad";
53
+ message: string;
52
54
  }
53
55
  /**
54
56
  * A type of `ErrorInfo` that can be used to show/handle generic errors,
@@ -58,11 +60,11 @@ export interface ChildrenLoadErrorInfo {
58
60
  *
59
61
  * @public
60
62
  */
61
- export interface GenericErrorInfo {
62
- id: string;
63
- type: "Unknown";
64
- message: string;
65
- additionalData?: unknown;
63
+ interface GenericErrorInfo {
64
+ id: string;
65
+ type: "Unknown";
66
+ message: string;
67
+ additionalData?: unknown;
66
68
  }
67
69
  /**
68
70
  * A collection of types that defines an error state for `TreeNode` node in a UI tree component, built
@@ -70,5 +72,7 @@ export interface GenericErrorInfo {
70
72
  *
71
73
  * @public
72
74
  */
73
- export type ErrorInfo = GenericErrorInfo | ResultSetTooLargeErrorInfo | NoFilterMatchesErrorInfo | ChildrenLoadErrorInfo;
75
+ type ErrorInfo = GenericErrorInfo | ResultSetTooLargeErrorInfo | NoFilterMatchesErrorInfo | ChildrenLoadErrorInfo;
76
+ //#endregion
77
+ export { ErrorInfo, GenericErrorInfo, ResultSetTooLargeErrorInfo, TreeNode };
74
78
  //# sourceMappingURL=TreeNode.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TreeNode.d.ts","sourceRoot":"","sources":["../../../src/presentation-hierarchies-react/TreeNode.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAEhE;;;GAGG;AACH,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,IAAI,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC;IACjC,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,OAAO,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,8CAA8C;IAC9C,QAAQ,EAAE,aAAa,CAAC;IACxB,yDAAyD;IACzD,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAED;;;;;GAKG;AACH,MAAM,WAAW,wBAAwB;IACvC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,iBAAiB,CAAC;CACzB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,0BAA0B;IACzC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,mBAAmB,CAAC;IAC1B,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAED;;;;;;GAMG;AACH,MAAM,WAAW,qBAAqB;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,cAAc,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED;;;;;GAKG;AACH,MAAM,MAAM,SAAS,GAAG,gBAAgB,GAAG,0BAA0B,GAAG,wBAAwB,GAAG,qBAAqB,CAAC"}
1
+ {"version":3,"file":"TreeNode.d.ts","names":[],"sources":["../../../src/presentation-hierarchies-react/TreeNode.ts"],"mappings":";;;;;AAWA;;UAAiB,QAAA;EACf,EAAA;EACA,KAAA;EACA,QAAA,SAAiB,KAAA,CAAM,QAAA;EACvB,UAAA;EACA,SAAA;EACA,YAAA;EACA,UAAA;EALA;EAOA,QAAA,EAAU,aAAA;EANO;EAQjB,KAAA,GAAQ,SAAA;AAAA;;;;;;;UASO,wBAAA;EACf,EAAA;EACA,IAAA;AAAA;;;;;AAUF;;;UAAiB,0BAAA;EACf,EAAA;EACA,IAAA;EACA,kBAAA;AAAA;;AAUF;;;;;;UAAiB,qBAAA;EACf,EAAA;EACA,IAAA;EACA,OAAA;AAAA;;;;;;;;;UAWe,gBAAA;EACf,EAAA;EACA,IAAA;EACA,OAAA;EACA,cAAA;AAAA;;;;;;;KASU,SAAA,GAAY,gBAAA,GAAmB,0BAAA,GAA6B,wBAAA,GAA2B,qBAAA"}
@@ -1,7 +1,9 @@
1
- import { createIModelHierarchyProvider, HierarchyDefinition, HierarchySearchPath } from "@itwin/presentation-hierarchies";
2
- import { Props } from "@itwin/presentation-shared";
3
1
  import { UseUnifiedTreeSelectionProps } from "./internal/UseUnifiedSelection.js";
4
2
  import { UseTreeProps, UseTreeResult } from "./UseTree.js";
3
+ import { HierarchyDefinition, HierarchySearchPath, createIModelHierarchyProvider } from "@itwin/presentation-hierarchies";
4
+ import { Props } from "@itwin/presentation-shared";
5
+
6
+ //#region src/presentation-hierarchies-react/UseIModelTree.d.ts
5
7
  /** @public */
6
8
  type IModelHierarchyProviderProps = Props<typeof createIModelHierarchyProvider>;
7
9
  /** @public */
@@ -11,17 +13,25 @@ type IModelAccess = IModelHierarchyProviderProps["imodelAccess"];
11
13
  * @public
12
14
  */
13
15
  type UseIModelTreeProps = Omit<UseTreeProps, "getHierarchyProvider" | "getSearchPaths"> & Pick<IModelHierarchyProviderProps, "localizedStrings" | "imodelAccess" | "imodelChanged"> & {
14
- /** Provides the hierarchy definition for the tree. */
15
- getHierarchyDefinition: (props: {
16
- imodelAccess: IModelAccess;
17
- }) => HierarchyDefinition;
18
- /** Provides paths to target nodes. */
19
- getSearchPaths?: (props: {
20
- /** Object that provides access to the iModel schema and can run queries against the iModel. */
21
- imodelAccess: IModelAccess;
22
- /** Signal indicating that that the request was canceled */
23
- abortSignal: AbortSignal;
24
- }) => Promise<HierarchySearchPath[] | undefined>;
16
+ /**
17
+ * Provides the hierarchy definition for the tree.
18
+ */
19
+ getHierarchyDefinition: (props: {
20
+ imodelAccess: IModelAccess;
21
+ }) => HierarchyDefinition;
22
+ /**
23
+ * Provides paths to target nodes.
24
+ */
25
+ getSearchPaths?: (props: {
26
+ /**
27
+ * Object that provides access to the iModel schema and can run queries against the iModel.
28
+ */
29
+ imodelAccess: IModelAccess;
30
+ /**
31
+ * Signal indicating that that the request was canceled
32
+ */
33
+ abortSignal: AbortSignal;
34
+ }) => Promise<HierarchySearchPath[] | undefined>;
25
35
  };
26
36
  /**
27
37
  * A React hook that creates state for a tree component whose displayed hierarchy is based on
@@ -36,7 +46,7 @@ type UseIModelTreeProps = Omit<UseTreeProps, "getHierarchyProvider" | "getSearch
36
46
  * @see `useIModelUnifiedSelectionTree`
37
47
  * @public
38
48
  */
39
- export declare function useIModelTree(props: UseIModelTreeProps): UseTreeResult;
49
+ declare function useIModelTree(props: UseIModelTreeProps): UseTreeResult;
40
50
  /**
41
51
  * A React hook that creates state for a tree component whose displayed hierarchy is based on
42
52
  * iModel data and that is integrated with unified selection through the given selection
@@ -52,6 +62,7 @@ export declare function useIModelTree(props: UseIModelTreeProps): UseTreeResult;
52
62
  * @see `UnifiedSelectionProvider`
53
63
  * @public
54
64
  */
55
- export declare function useIModelUnifiedSelectionTree(props: UseIModelTreeProps & UseUnifiedTreeSelectionProps): UseTreeResult;
56
- export {};
65
+ declare function useIModelUnifiedSelectionTree(props: UseIModelTreeProps & UseUnifiedTreeSelectionProps): UseTreeResult;
66
+ //#endregion
67
+ export { useIModelTree, useIModelUnifiedSelectionTree };
57
68
  //# sourceMappingURL=UseIModelTree.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"UseIModelTree.d.ts","sourceRoot":"","sources":["../../../src/presentation-hierarchies-react/UseIModelTree.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,6BAA6B,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAC1H,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACnD,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AACjF,OAAO,EAAW,YAAY,EAAE,aAAa,EAA2B,MAAM,cAAc,CAAC;AAE7F,cAAc;AACd,KAAK,4BAA4B,GAAG,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEhF,cAAc;AACd,KAAK,YAAY,GAAG,4BAA4B,CAAC,cAAc,CAAC,CAAC;AAEjE;;;GAGG;AACH,KAAK,kBAAkB,GAAG,IAAI,CAAC,YAAY,EAAE,sBAAsB,GAAG,gBAAgB,CAAC,GACrF,IAAI,CAAC,4BAA4B,EAAE,kBAAkB,GAAG,cAAc,GAAG,eAAe,CAAC,GAAG;IAC1F,sDAAsD;IACtD,sBAAsB,EAAE,CAAC,KAAK,EAAE;QAAE,YAAY,EAAE,YAAY,CAAA;KAAE,KAAK,mBAAmB,CAAC;IAEvF,sCAAsC;IACtC,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE;QACvB,+FAA+F;QAC/F,YAAY,EAAE,YAAY,CAAC;QAC3B,2DAA2D;QAC3D,WAAW,EAAE,WAAW,CAAC;KAC1B,KAAK,OAAO,CAAC,mBAAmB,EAAE,GAAG,SAAS,CAAC,CAAC;CAClD,CAAC;AAEJ;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,GAAG,aAAa,CAMtE;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,kBAAkB,GAAG,4BAA4B,GAAG,aAAa,CAMrH"}
1
+ {"version":3,"file":"UseIModelTree.d.ts","names":[],"sources":["../../../src/presentation-hierarchies-react/UseIModelTree.ts"],"mappings":";;;;;;;KAeK,4BAAA,GAA+B,KAAA,QAAa,6BAAA;;KAG5C,YAAA,GAAe,4BAAA;;;AAH0D;;KASzE,kBAAA,GAAqB,IAAA,CAAK,YAAA,+CAC7B,IAAA,CAAK,4BAAA;EAPa;;AAA4B;EAW5C,sBAAA,GAAyB,KAAA;IAAS,YAAA,EAAc,YAAA;EAAA,MAAmB,mBAAA;EAL7C;;;EAUtB,cAAA,IAAkB,KAAA;IALiD;;;IASjE,YAAA,EAAc,YAAA;IAKV;;;IADJ,WAAA,EAAa,WAAA;EAAA,MACT,OAAA,CAAQ,mBAAA;AAAA;;;;;;;;;;;;;;iBAgBF,aAAA,CAAc,KAAA,EAAO,kBAAA,GAAqB,aAAA;;;AAA1D;;;;;;;;;AAuBA;;;;iBAAgB,6BAAA,CAA8B,KAAA,EAAO,kBAAA,GAAqB,4BAAA,GAA+B,aAAA"}
@@ -1,62 +1,189 @@
1
- /*---------------------------------------------------------------------------------------------
2
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
- * See LICENSE.md in the project root for license terms and full copyright notice.
4
- *--------------------------------------------------------------------------------------------*/
5
- import { useCallback } from "react";
6
- import { createIModelHierarchyProvider } from "@itwin/presentation-hierarchies";
7
1
  import { useTree, useUnifiedSelectionTree } from "./UseTree.js";
2
+ import { c } from "react-compiler-runtime";
3
+ import { createIModelHierarchyProvider } from "@itwin/presentation-hierarchies";
4
+
5
+ //#region src/presentation-hierarchies-react/UseIModelTree.ts
8
6
  /**
9
- * A React hook that creates state for a tree component whose displayed hierarchy is based on
10
- * iModel data.
11
- *
12
- * The hook uses `@itwin/presentation-hierarchies` package to load the hierarchy data and returns a
13
- * component-agnostic result which may be used to render the hierarchy using any UI framework.
14
- *
15
- * See `README.md` for an example
16
- *
17
- * @see `useTree`
18
- * @see `useIModelUnifiedSelectionTree`
19
- * @public
20
- */
21
- export function useIModelTree(props) {
22
- const { imodelAccess, imodelChanged, getHierarchyDefinition, getSearchPaths, localizedStrings, ...rest } = props;
23
- return useTree({
24
- ...rest,
25
- ...useIModelTreeProps({ imodelAccess, imodelChanged, getHierarchyDefinition, getSearchPaths, localizedStrings }),
26
- });
7
+ * A React hook that creates state for a tree component whose displayed hierarchy is based on
8
+ * iModel data.
9
+ *
10
+ * The hook uses `@itwin/presentation-hierarchies` package to load the hierarchy data and returns a
11
+ * component-agnostic result which may be used to render the hierarchy using any UI framework.
12
+ *
13
+ * See `README.md` for an example
14
+ *
15
+ * @see `useTree`
16
+ * @see `useIModelUnifiedSelectionTree`
17
+ * @public
18
+ */
19
+ function useIModelTree(props) {
20
+ const $ = c(16);
21
+ let getHierarchyDefinition;
22
+ let getSearchPaths;
23
+ let imodelAccess;
24
+ let imodelChanged;
25
+ let localizedStrings;
26
+ let rest;
27
+ if ($[0] !== props) {
28
+ ({imodelAccess, imodelChanged, getHierarchyDefinition, getSearchPaths, localizedStrings, ...rest} = props);
29
+ $[0] = props;
30
+ $[1] = getHierarchyDefinition;
31
+ $[2] = getSearchPaths;
32
+ $[3] = imodelAccess;
33
+ $[4] = imodelChanged;
34
+ $[5] = localizedStrings;
35
+ $[6] = rest;
36
+ } else {
37
+ getHierarchyDefinition = $[1];
38
+ getSearchPaths = $[2];
39
+ imodelAccess = $[3];
40
+ imodelChanged = $[4];
41
+ localizedStrings = $[5];
42
+ rest = $[6];
43
+ }
44
+ let t0;
45
+ if ($[7] !== getHierarchyDefinition || $[8] !== getSearchPaths || $[9] !== imodelAccess || $[10] !== imodelChanged || $[11] !== localizedStrings) {
46
+ t0 = {
47
+ imodelAccess,
48
+ imodelChanged,
49
+ getHierarchyDefinition,
50
+ getSearchPaths,
51
+ localizedStrings
52
+ };
53
+ $[7] = getHierarchyDefinition;
54
+ $[8] = getSearchPaths;
55
+ $[9] = imodelAccess;
56
+ $[10] = imodelChanged;
57
+ $[11] = localizedStrings;
58
+ $[12] = t0;
59
+ } else t0 = $[12];
60
+ const t1 = useIModelTreeProps(t0);
61
+ let t2;
62
+ if ($[13] !== rest || $[14] !== t1) {
63
+ t2 = {
64
+ ...rest,
65
+ ...t1
66
+ };
67
+ $[13] = rest;
68
+ $[14] = t1;
69
+ $[15] = t2;
70
+ } else t2 = $[15];
71
+ return useTree(t2);
27
72
  }
28
73
  /**
29
- * A React hook that creates state for a tree component whose displayed hierarchy is based on
30
- * iModel data and that is integrated with unified selection through the given selection
31
- * storage (previously the storage was provided through the, now deprecated, `UnifiedSelectionProvider`).
32
- *
33
- * The hook uses `@itwin/presentation-hierarchies` package to load the hierarchy data and returns a
34
- * component-agnostic result which may be used to render the hierarchy using any UI framework.
35
- *
36
- * See `README.md` for an example
37
- *
38
- * @see `useIModelTree`
39
- * @see `useUnifiedSelectionTree`
40
- * @see `UnifiedSelectionProvider`
41
- * @public
42
- */
43
- export function useIModelUnifiedSelectionTree(props) {
44
- const { imodelAccess, imodelChanged, getHierarchyDefinition, getSearchPaths, localizedStrings, ...rest } = props;
45
- return useUnifiedSelectionTree({
46
- ...rest,
47
- ...useIModelTreeProps({ imodelAccess, imodelChanged, getHierarchyDefinition, getSearchPaths, localizedStrings }),
48
- });
74
+ * A React hook that creates state for a tree component whose displayed hierarchy is based on
75
+ * iModel data and that is integrated with unified selection through the given selection
76
+ * storage (previously the storage was provided through the, now deprecated, `UnifiedSelectionProvider`).
77
+ *
78
+ * The hook uses `@itwin/presentation-hierarchies` package to load the hierarchy data and returns a
79
+ * component-agnostic result which may be used to render the hierarchy using any UI framework.
80
+ *
81
+ * See `README.md` for an example
82
+ *
83
+ * @see `useIModelTree`
84
+ * @see `useUnifiedSelectionTree`
85
+ * @see `UnifiedSelectionProvider`
86
+ * @public
87
+ */
88
+ function useIModelUnifiedSelectionTree(props) {
89
+ const $ = c(16);
90
+ let getHierarchyDefinition;
91
+ let getSearchPaths;
92
+ let imodelAccess;
93
+ let imodelChanged;
94
+ let localizedStrings;
95
+ let rest;
96
+ if ($[0] !== props) {
97
+ ({imodelAccess, imodelChanged, getHierarchyDefinition, getSearchPaths, localizedStrings, ...rest} = props);
98
+ $[0] = props;
99
+ $[1] = getHierarchyDefinition;
100
+ $[2] = getSearchPaths;
101
+ $[3] = imodelAccess;
102
+ $[4] = imodelChanged;
103
+ $[5] = localizedStrings;
104
+ $[6] = rest;
105
+ } else {
106
+ getHierarchyDefinition = $[1];
107
+ getSearchPaths = $[2];
108
+ imodelAccess = $[3];
109
+ imodelChanged = $[4];
110
+ localizedStrings = $[5];
111
+ rest = $[6];
112
+ }
113
+ let t0;
114
+ if ($[7] !== getHierarchyDefinition || $[8] !== getSearchPaths || $[9] !== imodelAccess || $[10] !== imodelChanged || $[11] !== localizedStrings) {
115
+ t0 = {
116
+ imodelAccess,
117
+ imodelChanged,
118
+ getHierarchyDefinition,
119
+ getSearchPaths,
120
+ localizedStrings
121
+ };
122
+ $[7] = getHierarchyDefinition;
123
+ $[8] = getSearchPaths;
124
+ $[9] = imodelAccess;
125
+ $[10] = imodelChanged;
126
+ $[11] = localizedStrings;
127
+ $[12] = t0;
128
+ } else t0 = $[12];
129
+ const t1 = useIModelTreeProps(t0);
130
+ let t2;
131
+ if ($[13] !== rest || $[14] !== t1) {
132
+ t2 = {
133
+ ...rest,
134
+ ...t1
135
+ };
136
+ $[13] = rest;
137
+ $[14] = t1;
138
+ $[15] = t2;
139
+ } else t2 = $[15];
140
+ return useUnifiedSelectionTree(t2);
49
141
  }
50
142
  function useIModelTreeProps(props) {
51
- const { imodelAccess, imodelChanged, getHierarchyDefinition, getSearchPaths, localizedStrings } = props;
52
- return {
53
- getHierarchyProvider: useCallback(() => createIModelHierarchyProvider({
54
- imodelAccess,
55
- imodelChanged,
56
- hierarchyDefinition: getHierarchyDefinition({ imodelAccess }),
57
- localizedStrings,
58
- }), [imodelAccess, imodelChanged, getHierarchyDefinition, localizedStrings]),
59
- getSearchPaths: useCallback(async ({ abortSignal }) => getSearchPaths?.({ imodelAccess, abortSignal }), [imodelAccess, getSearchPaths]),
60
- };
143
+ const $ = c(11);
144
+ const { imodelAccess, imodelChanged, getHierarchyDefinition, getSearchPaths, localizedStrings } = props;
145
+ let t0;
146
+ if ($[0] !== getHierarchyDefinition || $[1] !== imodelAccess || $[2] !== imodelChanged || $[3] !== localizedStrings) {
147
+ t0 = () => createIModelHierarchyProvider({
148
+ imodelAccess,
149
+ imodelChanged,
150
+ hierarchyDefinition: getHierarchyDefinition({ imodelAccess }),
151
+ localizedStrings
152
+ });
153
+ $[0] = getHierarchyDefinition;
154
+ $[1] = imodelAccess;
155
+ $[2] = imodelChanged;
156
+ $[3] = localizedStrings;
157
+ $[4] = t0;
158
+ } else t0 = $[4];
159
+ const t1 = t0;
160
+ let t2;
161
+ if ($[5] !== getSearchPaths || $[6] !== imodelAccess) {
162
+ t2 = async (t3) => {
163
+ const { abortSignal } = t3;
164
+ return getSearchPaths?.({
165
+ imodelAccess,
166
+ abortSignal
167
+ });
168
+ };
169
+ $[5] = getSearchPaths;
170
+ $[6] = imodelAccess;
171
+ $[7] = t2;
172
+ } else t2 = $[7];
173
+ const t3 = t2;
174
+ let t4;
175
+ if ($[8] !== t1 || $[9] !== t3) {
176
+ t4 = {
177
+ getHierarchyProvider: t1,
178
+ getSearchPaths: t3
179
+ };
180
+ $[8] = t1;
181
+ $[9] = t3;
182
+ $[10] = t4;
183
+ } else t4 = $[10];
184
+ return t4;
61
185
  }
186
+
187
+ //#endregion
188
+ export { useIModelTree, useIModelUnifiedSelectionTree };
62
189
  //# sourceMappingURL=UseIModelTree.js.map