@itwin/presentation-hierarchies 0.5.0 → 0.7.0

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 (305) hide show
  1. package/CHANGELOG.md +122 -0
  2. package/README.md +46 -49
  3. package/lib/cjs/hierarchies/HierarchyFiltering.d.ts +64 -0
  4. package/lib/cjs/hierarchies/HierarchyFiltering.d.ts.map +1 -0
  5. package/lib/cjs/hierarchies/HierarchyFiltering.js +80 -0
  6. package/lib/cjs/hierarchies/HierarchyFiltering.js.map +1 -0
  7. package/lib/cjs/hierarchies/HierarchyNode.d.ts +29 -233
  8. package/lib/cjs/hierarchies/HierarchyNode.d.ts.map +1 -1
  9. package/lib/cjs/hierarchies/HierarchyNode.js +25 -8
  10. package/lib/cjs/hierarchies/HierarchyNode.js.map +1 -1
  11. package/lib/cjs/hierarchies/HierarchyNodeIdentifier.d.ts +7 -11
  12. package/lib/cjs/hierarchies/HierarchyNodeIdentifier.d.ts.map +1 -1
  13. package/lib/cjs/hierarchies/HierarchyNodeIdentifier.js +9 -8
  14. package/lib/cjs/hierarchies/HierarchyNodeIdentifier.js.map +1 -1
  15. package/lib/cjs/hierarchies/HierarchyNodeKey.d.ts +31 -6
  16. package/lib/cjs/hierarchies/HierarchyNodeKey.d.ts.map +1 -1
  17. package/lib/cjs/hierarchies/HierarchyNodeKey.js +26 -23
  18. package/lib/cjs/hierarchies/HierarchyNodeKey.js.map +1 -1
  19. package/lib/cjs/hierarchies/HierarchyProvider.d.ts +24 -89
  20. package/lib/cjs/hierarchies/HierarchyProvider.d.ts.map +1 -1
  21. package/lib/cjs/hierarchies/HierarchyProvider.js +24 -382
  22. package/lib/cjs/hierarchies/HierarchyProvider.js.map +1 -1
  23. package/lib/{esm/hierarchies/internal → cjs/hierarchies/imodel}/FilteringHierarchyDefinition.d.ts +9 -9
  24. package/lib/cjs/hierarchies/imodel/FilteringHierarchyDefinition.d.ts.map +1 -0
  25. package/lib/cjs/hierarchies/{internal → imodel}/FilteringHierarchyDefinition.js +35 -73
  26. package/lib/cjs/hierarchies/imodel/FilteringHierarchyDefinition.js.map +1 -0
  27. package/lib/cjs/hierarchies/imodel/HierarchyCache.d.ts +18 -0
  28. package/lib/cjs/hierarchies/imodel/HierarchyCache.d.ts.map +1 -0
  29. package/lib/cjs/hierarchies/{internal/ChildNodeObservablesCache.js → imodel/HierarchyCache.js} +4 -4
  30. package/lib/cjs/hierarchies/imodel/HierarchyCache.js.map +1 -0
  31. package/lib/cjs/hierarchies/imodel/IModelHierarchyDefinition.d.ts +121 -0
  32. package/lib/cjs/hierarchies/imodel/IModelHierarchyDefinition.d.ts.map +1 -0
  33. package/lib/cjs/hierarchies/imodel/IModelHierarchyDefinition.js +21 -0
  34. package/lib/cjs/hierarchies/imodel/IModelHierarchyDefinition.js.map +1 -0
  35. package/lib/cjs/hierarchies/imodel/IModelHierarchyNode.d.ts +234 -0
  36. package/lib/cjs/hierarchies/imodel/IModelHierarchyNode.d.ts.map +1 -0
  37. package/lib/cjs/hierarchies/imodel/IModelHierarchyNode.js +29 -0
  38. package/lib/cjs/hierarchies/imodel/IModelHierarchyNode.js.map +1 -0
  39. package/lib/cjs/hierarchies/imodel/IModelHierarchyProvider.d.ts +77 -0
  40. package/lib/cjs/hierarchies/imodel/IModelHierarchyProvider.d.ts.map +1 -0
  41. package/lib/cjs/hierarchies/imodel/IModelHierarchyProvider.js +428 -0
  42. package/lib/cjs/hierarchies/imodel/IModelHierarchyProvider.js.map +1 -0
  43. package/lib/cjs/hierarchies/imodel/LimitingECSqlQueryExecutor.d.ts.map +1 -0
  44. package/lib/cjs/hierarchies/{LimitingECSqlQueryExecutor.js → imodel/LimitingECSqlQueryExecutor.js} +3 -3
  45. package/lib/cjs/hierarchies/imodel/LimitingECSqlQueryExecutor.js.map +1 -0
  46. package/lib/{esm/hierarchies → cjs/hierarchies/imodel}/NodeSelectQueryFactory.d.ts +4 -3
  47. package/lib/cjs/hierarchies/imodel/NodeSelectQueryFactory.d.ts.map +1 -0
  48. package/lib/cjs/hierarchies/{NodeSelectQueryFactory.js → imodel/NodeSelectQueryFactory.js} +37 -11
  49. package/lib/cjs/hierarchies/imodel/NodeSelectQueryFactory.js.map +1 -0
  50. package/lib/cjs/hierarchies/imodel/PredicateBasedHierarchyDefinition.d.ts +140 -0
  51. package/lib/cjs/hierarchies/imodel/PredicateBasedHierarchyDefinition.d.ts.map +1 -0
  52. package/lib/cjs/hierarchies/{HierarchyDefinition.js → imodel/PredicateBasedHierarchyDefinition.js} +26 -36
  53. package/lib/cjs/hierarchies/imodel/PredicateBasedHierarchyDefinition.js.map +1 -0
  54. package/lib/{esm/hierarchies/internal → cjs/hierarchies/imodel}/TreeNodesReader.d.ts +6 -6
  55. package/lib/cjs/hierarchies/imodel/TreeNodesReader.d.ts.map +1 -0
  56. package/lib/cjs/hierarchies/{internal → imodel}/TreeNodesReader.js +2 -2
  57. package/lib/cjs/hierarchies/imodel/TreeNodesReader.js.map +1 -0
  58. package/lib/cjs/hierarchies/imodel/Utils.d.ts +4 -0
  59. package/lib/cjs/hierarchies/imodel/Utils.d.ts.map +1 -0
  60. package/lib/cjs/hierarchies/imodel/Utils.js +59 -0
  61. package/lib/cjs/hierarchies/imodel/Utils.js.map +1 -0
  62. package/lib/cjs/hierarchies/{internal → imodel}/operators/DetermineChildren.d.ts +1 -1
  63. package/lib/cjs/hierarchies/imodel/operators/DetermineChildren.d.ts.map +1 -0
  64. package/lib/cjs/hierarchies/{internal → imodel}/operators/DetermineChildren.js +3 -3
  65. package/lib/cjs/hierarchies/imodel/operators/DetermineChildren.js.map +1 -0
  66. package/lib/cjs/hierarchies/{internal → imodel}/operators/Grouping.d.ts +2 -1
  67. package/lib/cjs/hierarchies/imodel/operators/Grouping.d.ts.map +1 -0
  68. package/lib/cjs/hierarchies/{internal → imodel}/operators/Grouping.js +5 -5
  69. package/lib/cjs/hierarchies/imodel/operators/Grouping.js.map +1 -0
  70. package/lib/cjs/hierarchies/{internal → imodel}/operators/HideIfNoChildren.d.ts +1 -1
  71. package/lib/cjs/hierarchies/imodel/operators/HideIfNoChildren.d.ts.map +1 -0
  72. package/lib/cjs/hierarchies/{internal → imodel}/operators/HideIfNoChildren.js +5 -5
  73. package/lib/cjs/hierarchies/imodel/operators/HideIfNoChildren.js.map +1 -0
  74. package/lib/{esm/hierarchies/internal → cjs/hierarchies/imodel}/operators/HideNodesInHierarchy.d.ts +1 -1
  75. package/lib/cjs/hierarchies/imodel/operators/HideNodesInHierarchy.d.ts.map +1 -0
  76. package/lib/cjs/hierarchies/{internal → imodel}/operators/HideNodesInHierarchy.js +22 -9
  77. package/lib/cjs/hierarchies/imodel/operators/HideNodesInHierarchy.js.map +1 -0
  78. package/lib/cjs/hierarchies/imodel/operators/grouping/AutoExpand.d.ts.map +1 -0
  79. package/lib/cjs/hierarchies/imodel/operators/grouping/AutoExpand.js.map +1 -0
  80. package/lib/{esm/hierarchies/internal → cjs/hierarchies/imodel}/operators/grouping/BaseClassGrouping.d.ts +2 -1
  81. package/lib/cjs/hierarchies/imodel/operators/grouping/BaseClassGrouping.d.ts.map +1 -0
  82. package/lib/cjs/hierarchies/imodel/operators/grouping/BaseClassGrouping.js.map +1 -0
  83. package/lib/{esm/hierarchies/internal → cjs/hierarchies/imodel}/operators/grouping/ClassGrouping.d.ts +2 -1
  84. package/lib/cjs/hierarchies/imodel/operators/grouping/ClassGrouping.d.ts.map +1 -0
  85. package/lib/cjs/hierarchies/imodel/operators/grouping/ClassGrouping.js.map +1 -0
  86. package/lib/cjs/hierarchies/imodel/operators/grouping/GroupHiding.d.ts.map +1 -0
  87. package/lib/cjs/hierarchies/imodel/operators/grouping/GroupHiding.js.map +1 -0
  88. package/lib/cjs/hierarchies/{internal → imodel}/operators/grouping/LabelGrouping.d.ts +1 -1
  89. package/lib/cjs/hierarchies/imodel/operators/grouping/LabelGrouping.d.ts.map +1 -0
  90. package/lib/cjs/hierarchies/{internal → imodel}/operators/grouping/LabelGrouping.js +2 -2
  91. package/lib/cjs/hierarchies/imodel/operators/grouping/LabelGrouping.js.map +1 -0
  92. package/lib/{esm/hierarchies/internal → cjs/hierarchies/imodel}/operators/grouping/PropertiesGrouping.d.ts +2 -1
  93. package/lib/cjs/hierarchies/imodel/operators/grouping/PropertiesGrouping.d.ts.map +1 -0
  94. package/lib/cjs/hierarchies/{internal → imodel}/operators/grouping/PropertiesGrouping.js +10 -5
  95. package/lib/cjs/hierarchies/imodel/operators/grouping/PropertiesGrouping.js.map +1 -0
  96. package/lib/cjs/hierarchies/{internal → imodel}/operators/grouping/Shared.d.ts +1 -1
  97. package/lib/cjs/hierarchies/imodel/operators/grouping/Shared.d.ts.map +1 -0
  98. package/lib/cjs/hierarchies/imodel/operators/grouping/Shared.js.map +1 -0
  99. package/lib/cjs/hierarchies/internal/Common.d.ts +7 -4
  100. package/lib/cjs/hierarchies/internal/Common.d.ts.map +1 -1
  101. package/lib/cjs/hierarchies/internal/Common.js +0 -66
  102. package/lib/cjs/hierarchies/internal/Common.js.map +1 -1
  103. package/lib/cjs/hierarchies/internal/operators/Sorting.d.ts +3 -2
  104. package/lib/cjs/hierarchies/internal/operators/Sorting.d.ts.map +1 -1
  105. package/lib/cjs/hierarchies/internal/operators/Sorting.js.map +1 -1
  106. package/lib/cjs/presentation-hierarchies.d.ts +10 -6
  107. package/lib/cjs/presentation-hierarchies.d.ts.map +1 -1
  108. package/lib/cjs/presentation-hierarchies.js +18 -10
  109. package/lib/cjs/presentation-hierarchies.js.map +1 -1
  110. package/lib/esm/hierarchies/HierarchyFiltering.d.ts +64 -0
  111. package/lib/esm/hierarchies/HierarchyFiltering.d.ts.map +1 -0
  112. package/lib/esm/hierarchies/HierarchyFiltering.js +76 -0
  113. package/lib/esm/hierarchies/HierarchyFiltering.js.map +1 -0
  114. package/lib/esm/hierarchies/HierarchyNode.d.ts +29 -233
  115. package/lib/esm/hierarchies/HierarchyNode.d.ts.map +1 -1
  116. package/lib/esm/hierarchies/HierarchyNode.js +24 -7
  117. package/lib/esm/hierarchies/HierarchyNode.js.map +1 -1
  118. package/lib/esm/hierarchies/HierarchyNodeIdentifier.d.ts +7 -11
  119. package/lib/esm/hierarchies/HierarchyNodeIdentifier.d.ts.map +1 -1
  120. package/lib/esm/hierarchies/HierarchyNodeIdentifier.js +9 -8
  121. package/lib/esm/hierarchies/HierarchyNodeIdentifier.js.map +1 -1
  122. package/lib/esm/hierarchies/HierarchyNodeKey.d.ts +31 -6
  123. package/lib/esm/hierarchies/HierarchyNodeKey.d.ts.map +1 -1
  124. package/lib/esm/hierarchies/HierarchyNodeKey.js +26 -23
  125. package/lib/esm/hierarchies/HierarchyNodeKey.js.map +1 -1
  126. package/lib/esm/hierarchies/HierarchyProvider.d.ts +24 -89
  127. package/lib/esm/hierarchies/HierarchyProvider.d.ts.map +1 -1
  128. package/lib/esm/hierarchies/HierarchyProvider.js +25 -383
  129. package/lib/esm/hierarchies/HierarchyProvider.js.map +1 -1
  130. package/lib/{cjs/hierarchies/internal → esm/hierarchies/imodel}/FilteringHierarchyDefinition.d.ts +9 -9
  131. package/lib/esm/hierarchies/imodel/FilteringHierarchyDefinition.d.ts.map +1 -0
  132. package/lib/esm/hierarchies/{internal → imodel}/FilteringHierarchyDefinition.js +36 -74
  133. package/lib/esm/hierarchies/imodel/FilteringHierarchyDefinition.js.map +1 -0
  134. package/lib/esm/hierarchies/imodel/HierarchyCache.d.ts +18 -0
  135. package/lib/esm/hierarchies/imodel/HierarchyCache.d.ts.map +1 -0
  136. package/lib/esm/hierarchies/{internal/ChildNodeObservablesCache.js → imodel/HierarchyCache.js} +2 -2
  137. package/lib/esm/hierarchies/imodel/HierarchyCache.js.map +1 -0
  138. package/lib/esm/hierarchies/imodel/IModelHierarchyDefinition.d.ts +121 -0
  139. package/lib/esm/hierarchies/imodel/IModelHierarchyDefinition.d.ts.map +1 -0
  140. package/lib/esm/hierarchies/imodel/IModelHierarchyDefinition.js +18 -0
  141. package/lib/esm/hierarchies/imodel/IModelHierarchyDefinition.js.map +1 -0
  142. package/lib/esm/hierarchies/imodel/IModelHierarchyNode.d.ts +234 -0
  143. package/lib/esm/hierarchies/imodel/IModelHierarchyNode.d.ts.map +1 -0
  144. package/lib/esm/hierarchies/imodel/IModelHierarchyNode.js +26 -0
  145. package/lib/esm/hierarchies/imodel/IModelHierarchyNode.js.map +1 -0
  146. package/lib/esm/hierarchies/imodel/IModelHierarchyProvider.d.ts +77 -0
  147. package/lib/esm/hierarchies/imodel/IModelHierarchyProvider.d.ts.map +1 -0
  148. package/lib/esm/hierarchies/imodel/IModelHierarchyProvider.js +425 -0
  149. package/lib/esm/hierarchies/imodel/IModelHierarchyProvider.js.map +1 -0
  150. package/lib/esm/hierarchies/imodel/LimitingECSqlQueryExecutor.d.ts.map +1 -0
  151. package/lib/esm/hierarchies/{LimitingECSqlQueryExecutor.js → imodel/LimitingECSqlQueryExecutor.js} +3 -3
  152. package/lib/esm/hierarchies/imodel/LimitingECSqlQueryExecutor.js.map +1 -0
  153. package/lib/{cjs/hierarchies → esm/hierarchies/imodel}/NodeSelectQueryFactory.d.ts +4 -3
  154. package/lib/esm/hierarchies/imodel/NodeSelectQueryFactory.d.ts.map +1 -0
  155. package/lib/esm/hierarchies/{NodeSelectQueryFactory.js → imodel/NodeSelectQueryFactory.js} +38 -12
  156. package/lib/esm/hierarchies/imodel/NodeSelectQueryFactory.js.map +1 -0
  157. package/lib/esm/hierarchies/imodel/PredicateBasedHierarchyDefinition.d.ts +140 -0
  158. package/lib/esm/hierarchies/imodel/PredicateBasedHierarchyDefinition.d.ts.map +1 -0
  159. package/lib/esm/hierarchies/{HierarchyDefinition.js → imodel/PredicateBasedHierarchyDefinition.js} +25 -34
  160. package/lib/esm/hierarchies/imodel/PredicateBasedHierarchyDefinition.js.map +1 -0
  161. package/lib/{cjs/hierarchies/internal → esm/hierarchies/imodel}/TreeNodesReader.d.ts +6 -6
  162. package/lib/esm/hierarchies/imodel/TreeNodesReader.d.ts.map +1 -0
  163. package/lib/esm/hierarchies/{internal → imodel}/TreeNodesReader.js +2 -2
  164. package/lib/esm/hierarchies/imodel/TreeNodesReader.js.map +1 -0
  165. package/lib/esm/hierarchies/imodel/Utils.d.ts +4 -0
  166. package/lib/esm/hierarchies/imodel/Utils.d.ts.map +1 -0
  167. package/lib/esm/hierarchies/imodel/Utils.js +56 -0
  168. package/lib/esm/hierarchies/imodel/Utils.js.map +1 -0
  169. package/lib/esm/hierarchies/{internal → imodel}/operators/DetermineChildren.d.ts +1 -1
  170. package/lib/esm/hierarchies/imodel/operators/DetermineChildren.d.ts.map +1 -0
  171. package/lib/esm/hierarchies/{internal → imodel}/operators/DetermineChildren.js +3 -3
  172. package/lib/esm/hierarchies/imodel/operators/DetermineChildren.js.map +1 -0
  173. package/lib/esm/hierarchies/{internal → imodel}/operators/Grouping.d.ts +2 -1
  174. package/lib/esm/hierarchies/imodel/operators/Grouping.d.ts.map +1 -0
  175. package/lib/esm/hierarchies/{internal → imodel}/operators/Grouping.js +6 -6
  176. package/lib/esm/hierarchies/imodel/operators/Grouping.js.map +1 -0
  177. package/lib/esm/hierarchies/{internal → imodel}/operators/HideIfNoChildren.d.ts +1 -1
  178. package/lib/esm/hierarchies/imodel/operators/HideIfNoChildren.d.ts.map +1 -0
  179. package/lib/esm/hierarchies/{internal → imodel}/operators/HideIfNoChildren.js +5 -5
  180. package/lib/esm/hierarchies/imodel/operators/HideIfNoChildren.js.map +1 -0
  181. package/lib/{cjs/hierarchies/internal → esm/hierarchies/imodel}/operators/HideNodesInHierarchy.d.ts +1 -1
  182. package/lib/esm/hierarchies/imodel/operators/HideNodesInHierarchy.d.ts.map +1 -0
  183. package/lib/esm/hierarchies/{internal → imodel}/operators/HideNodesInHierarchy.js +22 -9
  184. package/lib/esm/hierarchies/imodel/operators/HideNodesInHierarchy.js.map +1 -0
  185. package/lib/esm/hierarchies/imodel/operators/grouping/AutoExpand.d.ts.map +1 -0
  186. package/lib/esm/hierarchies/imodel/operators/grouping/AutoExpand.js.map +1 -0
  187. package/lib/{cjs/hierarchies/internal → esm/hierarchies/imodel}/operators/grouping/BaseClassGrouping.d.ts +2 -1
  188. package/lib/esm/hierarchies/imodel/operators/grouping/BaseClassGrouping.d.ts.map +1 -0
  189. package/lib/esm/hierarchies/imodel/operators/grouping/BaseClassGrouping.js.map +1 -0
  190. package/lib/{cjs/hierarchies/internal → esm/hierarchies/imodel}/operators/grouping/ClassGrouping.d.ts +2 -1
  191. package/lib/esm/hierarchies/imodel/operators/grouping/ClassGrouping.d.ts.map +1 -0
  192. package/lib/esm/hierarchies/imodel/operators/grouping/ClassGrouping.js.map +1 -0
  193. package/lib/esm/hierarchies/imodel/operators/grouping/GroupHiding.d.ts.map +1 -0
  194. package/lib/esm/hierarchies/imodel/operators/grouping/GroupHiding.js.map +1 -0
  195. package/lib/esm/hierarchies/{internal → imodel}/operators/grouping/LabelGrouping.d.ts +1 -1
  196. package/lib/esm/hierarchies/imodel/operators/grouping/LabelGrouping.d.ts.map +1 -0
  197. package/lib/esm/hierarchies/{internal → imodel}/operators/grouping/LabelGrouping.js +2 -2
  198. package/lib/esm/hierarchies/imodel/operators/grouping/LabelGrouping.js.map +1 -0
  199. package/lib/{cjs/hierarchies/internal → esm/hierarchies/imodel}/operators/grouping/PropertiesGrouping.d.ts +2 -1
  200. package/lib/esm/hierarchies/imodel/operators/grouping/PropertiesGrouping.d.ts.map +1 -0
  201. package/lib/esm/hierarchies/{internal → imodel}/operators/grouping/PropertiesGrouping.js +12 -7
  202. package/lib/esm/hierarchies/imodel/operators/grouping/PropertiesGrouping.js.map +1 -0
  203. package/lib/esm/hierarchies/{internal → imodel}/operators/grouping/Shared.d.ts +1 -1
  204. package/lib/esm/hierarchies/imodel/operators/grouping/Shared.d.ts.map +1 -0
  205. package/lib/esm/hierarchies/imodel/operators/grouping/Shared.js.map +1 -0
  206. package/lib/esm/hierarchies/internal/Common.d.ts +7 -4
  207. package/lib/esm/hierarchies/internal/Common.d.ts.map +1 -1
  208. package/lib/esm/hierarchies/internal/Common.js +0 -65
  209. package/lib/esm/hierarchies/internal/Common.js.map +1 -1
  210. package/lib/esm/hierarchies/internal/operators/Sorting.d.ts +3 -2
  211. package/lib/esm/hierarchies/internal/operators/Sorting.d.ts.map +1 -1
  212. package/lib/esm/hierarchies/internal/operators/Sorting.js.map +1 -1
  213. package/lib/esm/presentation-hierarchies.d.ts +10 -6
  214. package/lib/esm/presentation-hierarchies.d.ts.map +1 -1
  215. package/lib/esm/presentation-hierarchies.js +8 -4
  216. package/lib/esm/presentation-hierarchies.js.map +1 -1
  217. package/package.json +8 -7
  218. package/lib/cjs/hierarchies/HierarchyDefinition.d.ts +0 -251
  219. package/lib/cjs/hierarchies/HierarchyDefinition.d.ts.map +0 -1
  220. package/lib/cjs/hierarchies/HierarchyDefinition.js.map +0 -1
  221. package/lib/cjs/hierarchies/LimitingECSqlQueryExecutor.d.ts.map +0 -1
  222. package/lib/cjs/hierarchies/LimitingECSqlQueryExecutor.js.map +0 -1
  223. package/lib/cjs/hierarchies/NodeSelectQueryFactory.d.ts.map +0 -1
  224. package/lib/cjs/hierarchies/NodeSelectQueryFactory.js.map +0 -1
  225. package/lib/cjs/hierarchies/internal/ChildNodeObservablesCache.d.ts +0 -40
  226. package/lib/cjs/hierarchies/internal/ChildNodeObservablesCache.d.ts.map +0 -1
  227. package/lib/cjs/hierarchies/internal/ChildNodeObservablesCache.js.map +0 -1
  228. package/lib/cjs/hierarchies/internal/FilteringHierarchyDefinition.d.ts.map +0 -1
  229. package/lib/cjs/hierarchies/internal/FilteringHierarchyDefinition.js.map +0 -1
  230. package/lib/cjs/hierarchies/internal/TreeNodesReader.d.ts.map +0 -1
  231. package/lib/cjs/hierarchies/internal/TreeNodesReader.js.map +0 -1
  232. package/lib/cjs/hierarchies/internal/operators/DetermineChildren.d.ts.map +0 -1
  233. package/lib/cjs/hierarchies/internal/operators/DetermineChildren.js.map +0 -1
  234. package/lib/cjs/hierarchies/internal/operators/Grouping.d.ts.map +0 -1
  235. package/lib/cjs/hierarchies/internal/operators/Grouping.js.map +0 -1
  236. package/lib/cjs/hierarchies/internal/operators/HideIfNoChildren.d.ts.map +0 -1
  237. package/lib/cjs/hierarchies/internal/operators/HideIfNoChildren.js.map +0 -1
  238. package/lib/cjs/hierarchies/internal/operators/HideNodesInHierarchy.d.ts.map +0 -1
  239. package/lib/cjs/hierarchies/internal/operators/HideNodesInHierarchy.js.map +0 -1
  240. package/lib/cjs/hierarchies/internal/operators/grouping/AutoExpand.d.ts.map +0 -1
  241. package/lib/cjs/hierarchies/internal/operators/grouping/AutoExpand.js.map +0 -1
  242. package/lib/cjs/hierarchies/internal/operators/grouping/BaseClassGrouping.d.ts.map +0 -1
  243. package/lib/cjs/hierarchies/internal/operators/grouping/BaseClassGrouping.js.map +0 -1
  244. package/lib/cjs/hierarchies/internal/operators/grouping/ClassGrouping.d.ts.map +0 -1
  245. package/lib/cjs/hierarchies/internal/operators/grouping/ClassGrouping.js.map +0 -1
  246. package/lib/cjs/hierarchies/internal/operators/grouping/GroupHiding.d.ts.map +0 -1
  247. package/lib/cjs/hierarchies/internal/operators/grouping/GroupHiding.js.map +0 -1
  248. package/lib/cjs/hierarchies/internal/operators/grouping/LabelGrouping.d.ts.map +0 -1
  249. package/lib/cjs/hierarchies/internal/operators/grouping/LabelGrouping.js.map +0 -1
  250. package/lib/cjs/hierarchies/internal/operators/grouping/PropertiesGrouping.d.ts.map +0 -1
  251. package/lib/cjs/hierarchies/internal/operators/grouping/PropertiesGrouping.js.map +0 -1
  252. package/lib/cjs/hierarchies/internal/operators/grouping/Shared.d.ts.map +0 -1
  253. package/lib/cjs/hierarchies/internal/operators/grouping/Shared.js.map +0 -1
  254. package/lib/esm/hierarchies/HierarchyDefinition.d.ts +0 -251
  255. package/lib/esm/hierarchies/HierarchyDefinition.d.ts.map +0 -1
  256. package/lib/esm/hierarchies/HierarchyDefinition.js.map +0 -1
  257. package/lib/esm/hierarchies/LimitingECSqlQueryExecutor.d.ts.map +0 -1
  258. package/lib/esm/hierarchies/LimitingECSqlQueryExecutor.js.map +0 -1
  259. package/lib/esm/hierarchies/NodeSelectQueryFactory.d.ts.map +0 -1
  260. package/lib/esm/hierarchies/NodeSelectQueryFactory.js.map +0 -1
  261. package/lib/esm/hierarchies/internal/ChildNodeObservablesCache.d.ts +0 -40
  262. package/lib/esm/hierarchies/internal/ChildNodeObservablesCache.d.ts.map +0 -1
  263. package/lib/esm/hierarchies/internal/ChildNodeObservablesCache.js.map +0 -1
  264. package/lib/esm/hierarchies/internal/FilteringHierarchyDefinition.d.ts.map +0 -1
  265. package/lib/esm/hierarchies/internal/FilteringHierarchyDefinition.js.map +0 -1
  266. package/lib/esm/hierarchies/internal/TreeNodesReader.d.ts.map +0 -1
  267. package/lib/esm/hierarchies/internal/TreeNodesReader.js.map +0 -1
  268. package/lib/esm/hierarchies/internal/operators/DetermineChildren.d.ts.map +0 -1
  269. package/lib/esm/hierarchies/internal/operators/DetermineChildren.js.map +0 -1
  270. package/lib/esm/hierarchies/internal/operators/Grouping.d.ts.map +0 -1
  271. package/lib/esm/hierarchies/internal/operators/Grouping.js.map +0 -1
  272. package/lib/esm/hierarchies/internal/operators/HideIfNoChildren.d.ts.map +0 -1
  273. package/lib/esm/hierarchies/internal/operators/HideIfNoChildren.js.map +0 -1
  274. package/lib/esm/hierarchies/internal/operators/HideNodesInHierarchy.d.ts.map +0 -1
  275. package/lib/esm/hierarchies/internal/operators/HideNodesInHierarchy.js.map +0 -1
  276. package/lib/esm/hierarchies/internal/operators/grouping/AutoExpand.d.ts.map +0 -1
  277. package/lib/esm/hierarchies/internal/operators/grouping/AutoExpand.js.map +0 -1
  278. package/lib/esm/hierarchies/internal/operators/grouping/BaseClassGrouping.d.ts.map +0 -1
  279. package/lib/esm/hierarchies/internal/operators/grouping/BaseClassGrouping.js.map +0 -1
  280. package/lib/esm/hierarchies/internal/operators/grouping/ClassGrouping.d.ts.map +0 -1
  281. package/lib/esm/hierarchies/internal/operators/grouping/ClassGrouping.js.map +0 -1
  282. package/lib/esm/hierarchies/internal/operators/grouping/GroupHiding.d.ts.map +0 -1
  283. package/lib/esm/hierarchies/internal/operators/grouping/GroupHiding.js.map +0 -1
  284. package/lib/esm/hierarchies/internal/operators/grouping/LabelGrouping.d.ts.map +0 -1
  285. package/lib/esm/hierarchies/internal/operators/grouping/LabelGrouping.js.map +0 -1
  286. package/lib/esm/hierarchies/internal/operators/grouping/PropertiesGrouping.d.ts.map +0 -1
  287. package/lib/esm/hierarchies/internal/operators/grouping/PropertiesGrouping.js.map +0 -1
  288. package/lib/esm/hierarchies/internal/operators/grouping/Shared.d.ts.map +0 -1
  289. package/lib/esm/hierarchies/internal/operators/grouping/Shared.js.map +0 -1
  290. /package/lib/cjs/hierarchies/{LimitingECSqlQueryExecutor.d.ts → imodel/LimitingECSqlQueryExecutor.d.ts} +0 -0
  291. /package/lib/cjs/hierarchies/{internal → imodel}/operators/grouping/AutoExpand.d.ts +0 -0
  292. /package/lib/cjs/hierarchies/{internal → imodel}/operators/grouping/AutoExpand.js +0 -0
  293. /package/lib/cjs/hierarchies/{internal → imodel}/operators/grouping/BaseClassGrouping.js +0 -0
  294. /package/lib/cjs/hierarchies/{internal → imodel}/operators/grouping/ClassGrouping.js +0 -0
  295. /package/lib/cjs/hierarchies/{internal → imodel}/operators/grouping/GroupHiding.d.ts +0 -0
  296. /package/lib/cjs/hierarchies/{internal → imodel}/operators/grouping/GroupHiding.js +0 -0
  297. /package/lib/cjs/hierarchies/{internal → imodel}/operators/grouping/Shared.js +0 -0
  298. /package/lib/esm/hierarchies/{LimitingECSqlQueryExecutor.d.ts → imodel/LimitingECSqlQueryExecutor.d.ts} +0 -0
  299. /package/lib/esm/hierarchies/{internal → imodel}/operators/grouping/AutoExpand.d.ts +0 -0
  300. /package/lib/esm/hierarchies/{internal → imodel}/operators/grouping/AutoExpand.js +0 -0
  301. /package/lib/esm/hierarchies/{internal → imodel}/operators/grouping/BaseClassGrouping.js +0 -0
  302. /package/lib/esm/hierarchies/{internal → imodel}/operators/grouping/ClassGrouping.js +0 -0
  303. /package/lib/esm/hierarchies/{internal → imodel}/operators/grouping/GroupHiding.d.ts +0 -0
  304. /package/lib/esm/hierarchies/{internal → imodel}/operators/grouping/GroupHiding.js +0 -0
  305. /package/lib/esm/hierarchies/{internal → imodel}/operators/grouping/Shared.js +0 -0
@@ -1,6 +1,6 @@
1
- import { ConcatenatedValue, InstanceKey, OmitOverUnion, PrimitiveValue } from "@itwin/presentation-shared";
2
- import { ClassGroupingNodeKey, GroupingNodeKey, HierarchyNodeKey, InstancesNodeKey, LabelGroupingNodeKey, PropertyGroupingNodeKey, PropertyOtherValuesGroupingNodeKey, PropertyValueGroupingNodeKey, PropertyValueRangeGroupingNodeKey, StandardHierarchyNodeKey } from "./HierarchyNodeKey";
3
- import { HierarchyFilteringPath, HierarchyFilteringPathOptions } from "./HierarchyProvider";
1
+ import { OmitOverUnion } from "@itwin/presentation-shared";
2
+ import { HierarchyFilteringPath, HierarchyFilteringPathOptions } from "./HierarchyFiltering";
3
+ import { ClassGroupingNodeKey, GenericNodeKey, GroupingNodeKey, HierarchyNodeKey, IModelHierarchyNodeKey, IModelInstanceKey, InstancesNodeKey, LabelGroupingNodeKey, PropertyGroupingNodeKey, PropertyOtherValuesGroupingNodeKey, PropertyValueGroupingNodeKey, PropertyValueRangeGroupingNodeKey } from "./HierarchyNodeKey";
4
4
  /** @beta */
5
5
  export type HierarchyNodeFilteringProps = {
6
6
  /** If set to true, then one of the ancestor nodes in the hierarchy is the filter target. */
@@ -8,6 +8,7 @@ export type HierarchyNodeFilteringProps = {
8
8
  /** Paths to node's children that are filter targets. */
9
9
  filteredChildrenIdentifierPaths?: HierarchyFilteringPath[];
10
10
  } & ({
11
+ /** Whether or not this node is a filter target. */
11
12
  isFilterTarget?: false;
12
13
  } | {
13
14
  /** Whether or not this node is a filter target. */
@@ -15,6 +16,15 @@ export type HierarchyNodeFilteringProps = {
15
16
  /** Options that were used to filter the node. */
16
17
  filterTargetOptions?: HierarchyFilteringPathOptions;
17
18
  });
19
+ /** @beta */
20
+ export declare namespace HierarchyNodeFilteringProps {
21
+ function create(props: {
22
+ hasFilterTargetAncestor?: boolean;
23
+ filteredChildrenIdentifierPaths?: HierarchyFilteringPath[];
24
+ isFilterTarget?: boolean;
25
+ filterTargetOptions?: HierarchyFilteringPathOptions;
26
+ }): HierarchyNodeFilteringProps | undefined;
27
+ }
18
28
  /**
19
29
  * A data structure that defines attributes that are common to all types of hierarchy nodes.
20
30
  * @beta
@@ -41,7 +51,7 @@ interface BaseHierarchyNode {
41
51
  */
42
52
  export interface NonGroupingHierarchyNode extends BaseHierarchyNode {
43
53
  /** An identifier to identify the node in its hierarchy level. */
44
- key: string | InstancesNodeKey;
54
+ key: GenericNodeKey | InstancesNodeKey;
45
55
  /**
46
56
  * Identifies whether the hierarchy level below this node supports filtering. If not, supplying an instance
47
57
  * filter when requesting child hierarchy level will have no effect.
@@ -59,7 +69,7 @@ export interface GroupingHierarchyNode extends BaseHierarchyNode {
59
69
  * Keys of all instances grouped by this node, including deeply nested under
60
70
  * other grouping nodes.
61
71
  */
62
- groupedInstanceKeys: InstanceKey[];
72
+ groupedInstanceKeys: IModelInstanceKey[];
63
73
  /** The closest ancestor node that is not a grouping node. May be `undefined` if the grouping node grouped root level nodes. */
64
74
  nonGroupingAncestor?: ParentHierarchyNode<NonGroupingHierarchyNode>;
65
75
  }
@@ -70,70 +80,70 @@ export interface GroupingHierarchyNode extends BaseHierarchyNode {
70
80
  export type HierarchyNode = NonGroupingHierarchyNode | GroupingHierarchyNode;
71
81
  /** @beta */
72
82
  export declare namespace HierarchyNode {
73
- /** Checks whether the given node is a custom node */
74
- function isCustom<TNode extends {
83
+ /** Checks whether the given node is a generic node */
84
+ function isGeneric<TNode extends {
75
85
  key: HierarchyNodeKey;
76
- }>(node: TNode): node is TNode & (TNode extends ProcessedHierarchyNode ? ProcessedCustomHierarchyNode : NonGroupingHierarchyNode) & {
77
- key: string;
86
+ }>(node: TNode): node is TNode & NonGroupingHierarchyNode & {
87
+ key: GenericNodeKey;
78
88
  };
79
89
  /** Checks whether the given node is a standard (iModel content based) node */
80
- function isStandard<TNode extends {
90
+ function isIModelNode<TNode extends {
81
91
  key: HierarchyNodeKey;
82
92
  }>(node: TNode): node is TNode & {
83
- key: StandardHierarchyNodeKey;
93
+ key: IModelHierarchyNodeKey;
84
94
  };
85
95
  /** Checks whether the given node is an ECInstances-based node */
86
96
  function isInstancesNode<TNode extends {
87
97
  key: HierarchyNodeKey;
88
- }>(node: TNode): node is TNode & (TNode extends ProcessedHierarchyNode ? ProcessedInstanceHierarchyNode : NonGroupingHierarchyNode) & {
98
+ }>(node: TNode): node is TNode & NonGroupingHierarchyNode & {
89
99
  key: InstancesNodeKey;
90
100
  };
91
101
  /** Checks whether the given node is a grouping node */
92
102
  function isGroupingNode<TNode extends {
93
103
  key: HierarchyNodeKey;
94
- }>(node: TNode): node is TNode & (TNode extends ProcessedHierarchyNode ? ProcessedGroupingHierarchyNode : GroupingHierarchyNode);
104
+ }>(node: TNode): node is TNode & GroupingHierarchyNode;
95
105
  /** Checks whether the given node is a class grouping node */
96
106
  function isClassGroupingNode<TNode extends {
97
107
  key: HierarchyNodeKey;
98
108
  }>(node: TNode): node is TNode & {
99
109
  key: ClassGroupingNodeKey;
100
110
  supportsFiltering?: undefined;
101
- } & (TNode extends ProcessedHierarchyNode ? ProcessedGroupingHierarchyNode : GroupingHierarchyNode);
111
+ } & GroupingHierarchyNode;
102
112
  /** Checks whether the given node is a label grouping node */
103
113
  function isLabelGroupingNode<TNode extends {
104
114
  key: HierarchyNodeKey;
105
115
  }>(node: TNode): node is TNode & {
106
116
  key: LabelGroupingNodeKey;
107
117
  supportsFiltering?: undefined;
108
- } & (TNode extends ProcessedHierarchyNode ? ProcessedGroupingHierarchyNode : GroupingHierarchyNode);
118
+ } & GroupingHierarchyNode;
109
119
  /** Checks whether the given node is property grouping node for other values */
110
120
  function isPropertyOtherValuesGroupingNode<TNode extends {
111
121
  key: HierarchyNodeKey;
112
122
  }>(node: TNode): node is TNode & {
113
123
  key: PropertyOtherValuesGroupingNodeKey;
114
124
  supportsFiltering?: undefined;
115
- } & (TNode extends ProcessedHierarchyNode ? ProcessedGroupingHierarchyNode : GroupingHierarchyNode);
125
+ } & GroupingHierarchyNode;
116
126
  /** Checks whether the given node is a property value grouping node */
117
127
  function isPropertyValueGroupingNode<TNode extends {
118
128
  key: HierarchyNodeKey;
119
129
  }>(node: TNode): node is TNode & {
120
130
  key: PropertyValueGroupingNodeKey;
121
131
  supportsFiltering?: undefined;
122
- } & (TNode extends ProcessedHierarchyNode ? ProcessedGroupingHierarchyNode : GroupingHierarchyNode);
132
+ } & GroupingHierarchyNode;
123
133
  /** Checks whether the given node is a property value range grouping node */
124
134
  function isPropertyValueRangeGroupingNode<TNode extends {
125
135
  key: HierarchyNodeKey;
126
136
  }>(node: TNode): node is TNode & {
127
137
  key: PropertyValueRangeGroupingNodeKey;
128
138
  supportsFiltering?: undefined;
129
- } & (TNode extends ProcessedHierarchyNode ? ProcessedGroupingHierarchyNode : GroupingHierarchyNode);
139
+ } & GroupingHierarchyNode;
130
140
  /** Checks whether the given node is a property grouping node */
131
141
  function isPropertyGroupingNode<TNode extends {
132
142
  key: HierarchyNodeKey;
133
143
  }>(node: TNode): node is TNode & {
134
144
  key: PropertyGroupingNodeKey;
135
145
  supportsFiltering?: undefined;
136
- } & (TNode extends ProcessedHierarchyNode ? ProcessedGroupingHierarchyNode : GroupingHierarchyNode);
146
+ } & GroupingHierarchyNode;
137
147
  }
138
148
  /**
139
149
  * A type of `HierarchyNode` that doesn't know about its children and is an input when requesting
@@ -141,219 +151,5 @@ export declare namespace HierarchyNode {
141
151
  * @beta
142
152
  */
143
153
  export type ParentHierarchyNode<TBase = HierarchyNode> = OmitOverUnion<TBase, "children">;
144
- /**
145
- * Base processing parameters that apply to every node.
146
- * @beta
147
- */
148
- interface HierarchyNodeProcessingParamsBase {
149
- /** Indicates if this node should be hidden if it has no child nodes. */
150
- hideIfNoChildren?: boolean;
151
- /** Indicates that this node should always be hidden and its children should be loaded in its place. */
152
- hideInHierarchy?: boolean;
153
- }
154
- /**
155
- * A data structure for defining nodes' grouping requirements.
156
- * @beta
157
- */
158
- interface HierarchyNodeGroupingParams {
159
- byLabel?: HierarchyNodeLabelGroupingParams;
160
- byClass?: boolean | HierarchyNodeGroupingParamsBase;
161
- byBaseClasses?: HierarchyNodeBaseClassGroupingParams;
162
- byProperties?: HierarchyNodePropertiesGroupingParams;
163
- }
164
- /**
165
- * A data structure for defining params specifically used for label grouping.
166
- * @beta
167
- */
168
- interface HierarchyNodeLabelGroupingBaseParams {
169
- /** Label grouping option that determines whether to group nodes or to merge them. Defaults to "group".*/
170
- action?: "group" | "merge";
171
- /** Value that needs to match in order for nodes to be grouped or merged.*/
172
- groupId?: string;
173
- }
174
- /**
175
- * A data structure for defining label merging.
176
- * @beta
177
- */
178
- interface HierarchyNodeLabelGroupingMergeParams extends HierarchyNodeLabelGroupingBaseParams {
179
- action: "merge";
180
- }
181
- /**
182
- * A data structure for defining label grouping with additional parameters.
183
- * @beta
184
- */
185
- interface HierarchyNodeLabelGroupingGroupParams extends HierarchyNodeLabelGroupingBaseParams, HierarchyNodeGroupingParamsBase {
186
- action?: "group";
187
- }
188
- /**
189
- * A data structure for defining possible label grouping types.
190
- * @beta
191
- */
192
- export type HierarchyNodeLabelGroupingParams = boolean | HierarchyNodeLabelGroupingMergeParams | HierarchyNodeLabelGroupingGroupParams;
193
- /**
194
- * Grouping parameters that are shared across all types of groupings.
195
- * @beta
196
- */
197
- export interface HierarchyNodeGroupingParamsBase {
198
- /** Hiding option that determines whether to hide group nodes which have no siblings at the same hierarchy level. */
199
- hideIfNoSiblings?: boolean;
200
- /** Hiding option that determines whether to hide group nodes which have only one node as its children. */
201
- hideIfOneGroupedNode?: boolean;
202
- /** Option which auto expands grouping nodes' children when it has single child or always. */
203
- autoExpand?: HierarchyNodeAutoExpandProp;
204
- }
205
- /**
206
- * Defines possible values for `BaseGroupingParams.autoExpand` attribute:
207
- * - `single-child` - set the grouping node to auto-expand if it groups a single node.
208
- * - `always` - always set the grouping node to auto-expand.
209
- * @beta
210
- */
211
- export type HierarchyNodeAutoExpandProp = "single-child" | "always";
212
- /**
213
- * A data structure that represents base class grouping.
214
- * @beta
215
- */
216
- interface HierarchyNodeBaseClassGroupingParams extends HierarchyNodeGroupingParamsBase {
217
- /**
218
- * Full names of classes, which should be used to group the node. Only has effect if the node
219
- * represents an instance of that class.
220
- *
221
- * Full class name format: `SchemaName.ClassName`.
222
- */
223
- fullClassNames: string[];
224
- }
225
- /**
226
- * A data structure that represents properties grouping.
227
- * @beta
228
- */
229
- export interface HierarchyNodePropertiesGroupingParams extends HierarchyNodeGroupingParamsBase {
230
- /**
231
- * Full name of a class whose properties are used to group the node. Only has effect if the node
232
- * represents an instance of that class.
233
- *
234
- * Full class name format: `SchemaName.ClassName`.
235
- */
236
- propertiesClassName: string;
237
- /**
238
- * Property grouping option that determines whether to group nodes whose grouping value is not set or is set to an empty string.
239
- *
240
- * Label of the created grouping node will be `Not Specified`.
241
- */
242
- createGroupForUnspecifiedValues?: boolean;
243
- /**
244
- * Property grouping option that determines whether to group nodes whose grouping value doesn't fit within any of the provided
245
- * ranges, or is not a numeric value.
246
- *
247
- * Label of the created grouping node will be `Other`.
248
- */
249
- createGroupForOutOfRangeValues?: boolean;
250
- /**
251
- * Properties of the specified class, by which the nodes should be grouped. Each provided group definition results in a
252
- * grouping hierarchy level.
253
- *
254
- * Example usage:
255
- * ```ts
256
- * propertyGroups: [
257
- * {
258
- * propertyName: "type",
259
- * propertyValue: "Wall"
260
- * },
261
- * {
262
- * propertyName: "length",
263
- * propertyValue: 15,
264
- * ranges: [
265
- * { fromValue: 1, toValue: 10, rangeLabel: "Small" },
266
- * { fromValue: 11, toValue: 20, rangeLabel: "Medium" }
267
- * ]
268
- * },
269
- * ]
270
- * ```
271
- */
272
- propertyGroups: HierarchyNodePropertyGroup[];
273
- }
274
- /**
275
- * A data structure that represents specific properties' grouping params.
276
- * @beta
277
- */
278
- export interface HierarchyNodePropertyGroup {
279
- /** A string indicating the name of the property to group by. */
280
- propertyName: string;
281
- /** Value of the property, which will be used to group the node. */
282
- propertyValue?: PrimitiveValue;
283
- /** Ranges are used to group nodes by numeric properties which are within specified bounds. */
284
- ranges?: HierarchyNodePropertyValueRange[];
285
- }
286
- /**
287
- * A data structure that represents boundaries for a value.
288
- * @beta
289
- */
290
- export interface HierarchyNodePropertyValueRange {
291
- /** Defines the lower bound of the range. */
292
- fromValue: number;
293
- /** Defines the upper bound of the range. */
294
- toValue: number;
295
- /** Defines the range label. Will be used as `PropertyValueRangeGroupingNode` node's display label. */
296
- rangeLabel?: string;
297
- }
298
- /**
299
- * Processing parameters that apply to instance nodes.
300
- * @beta
301
- */
302
- export interface InstanceHierarchyNodeProcessingParams extends HierarchyNodeProcessingParamsBase {
303
- grouping?: HierarchyNodeGroupingParams;
304
- }
305
- /**
306
- * A custom (not based on data in an iModel) node that has processing parameters.
307
- * @beta
308
- */
309
- export type ProcessedCustomHierarchyNode = Omit<NonGroupingHierarchyNode, "key" | "children"> & {
310
- key: string;
311
- children?: boolean;
312
- processingParams?: HierarchyNodeProcessingParamsBase;
313
- };
314
- /**
315
- * An instances' (based on data in an iModel) node that has processing parameters.
316
- * @beta
317
- */
318
- export type ProcessedInstanceHierarchyNode = Omit<NonGroupingHierarchyNode, "key" | "children"> & {
319
- key: InstancesNodeKey;
320
- children?: boolean;
321
- processingParams?: InstanceHierarchyNodeProcessingParams;
322
- };
323
- /**
324
- * A grouping node that groups either instance nodes or other grouping nodes.
325
- * @beta
326
- */
327
- export type ProcessedGroupingHierarchyNode = Omit<GroupingHierarchyNode, "children"> & {
328
- children: Array<ProcessedGroupingHierarchyNode | ProcessedInstanceHierarchyNode>;
329
- };
330
- /**
331
- * A `HierarchyNode` that may have processing parameters defining whether it should be hidden under some conditions,
332
- * how it should be grouped, sorted, etc.
333
- *
334
- * Type guards under `HierarchyNode` namespace can be used to differentiate between different sub-types of
335
- * `ProcessedHierarchyNode`.
336
- *
337
- * @beta
338
- */
339
- export type ProcessedHierarchyNode = ProcessedCustomHierarchyNode | ProcessedInstanceHierarchyNode | ProcessedGroupingHierarchyNode;
340
- /**
341
- * A `ProcessedHierarchyNode` that has an unformatted label in a form of `ConcatenatedValue`. Generally this is
342
- * returned when the node is just parsed from query results.
343
- * @beta
344
- */
345
- export type ParsedHierarchyNode<TBase = ParsedCustomHierarchyNode | ParsedInstanceHierarchyNode> = OmitOverUnion<TBase, "label" | "parentKeys"> & {
346
- label: string | ConcatenatedValue;
347
- };
348
- /**
349
- * A kind of `ProcessedCustomHierarchyNode` that has unformatted label and doesn't know about its ancestors.
350
- * @beta
351
- */
352
- export type ParsedCustomHierarchyNode = ParsedHierarchyNode<ProcessedCustomHierarchyNode>;
353
- /**
354
- * A kind of `ProcessedInstanceHierarchyNode` that has unformatted label and doesn't know about its ancestors.
355
- * @beta
356
- */
357
- export type ParsedInstanceHierarchyNode = ParsedHierarchyNode<ProcessedInstanceHierarchyNode>;
358
154
  export {};
359
155
  //# sourceMappingURL=HierarchyNode.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"HierarchyNode.d.ts","sourceRoot":"","sources":["../../../src/hierarchies/HierarchyNode.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC3G,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,oBAAoB,EACpB,uBAAuB,EACvB,kCAAkC,EAClC,4BAA4B,EAC5B,iCAAiC,EACjC,wBAAwB,EACzB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,sBAAsB,EAAE,6BAA6B,EAAE,MAAM,qBAAqB,CAAC;AAE5F,YAAY;AACZ,MAAM,MAAM,2BAA2B,GAAG;IACxC,4FAA4F;IAC5F,uBAAuB,CAAC,E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AE,KAAK,GACV,IAAI,IAAI,KAAK,GAAG;QAAE,GAAG,EAAE,uBAAuB,CAAC;QAAC,iBAAiB,CAAC,EAAE,SAAS,CAAA;KAAE,GAAG,qBAAqB,CAEzG;CACF;AAED;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,CAAC,KAAK,GAAG,aAAa,IAAI,aAAa,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC"}
@@ -4,22 +4,39 @@
4
4
  * See LICENSE.md in the project root for license terms and full copyright notice.
5
5
  *--------------------------------------------------------------------------------------------*/
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.HierarchyNode = void 0;
7
+ exports.HierarchyNode = exports.HierarchyNodeFilteringProps = void 0;
8
8
  const HierarchyNodeKey_1 = require("./HierarchyNodeKey");
9
9
  /** @beta */
10
10
  // eslint-disable-next-line @typescript-eslint/no-redeclare
11
+ var HierarchyNodeFilteringProps;
12
+ (function (HierarchyNodeFilteringProps) {
13
+ function create(props) {
14
+ const { hasFilterTargetAncestor, filteredChildrenIdentifierPaths, isFilterTarget, filterTargetOptions } = props;
15
+ if (isFilterTarget || hasFilterTargetAncestor || filteredChildrenIdentifierPaths?.length) {
16
+ return {
17
+ ...(isFilterTarget ? { isFilterTarget, filterTargetOptions } : undefined),
18
+ ...(hasFilterTargetAncestor ? { hasFilterTargetAncestor } : undefined),
19
+ ...(!!filteredChildrenIdentifierPaths?.length ? { filteredChildrenIdentifierPaths } : undefined),
20
+ };
21
+ }
22
+ return undefined;
23
+ }
24
+ HierarchyNodeFilteringProps.create = create;
25
+ })(HierarchyNodeFilteringProps || (exports.HierarchyNodeFilteringProps = HierarchyNodeFilteringProps = {}));
26
+ /** @beta */
27
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
11
28
  var HierarchyNode;
12
29
  (function (HierarchyNode) {
13
- /** Checks whether the given node is a custom node */
14
- function isCustom(node) {
15
- return HierarchyNodeKey_1.HierarchyNodeKey.isCustom(node.key);
30
+ /** Checks whether the given node is a generic node */
31
+ function isGeneric(node) {
32
+ return HierarchyNodeKey_1.HierarchyNodeKey.isGeneric(node.key);
16
33
  }
17
- HierarchyNode.isCustom = isCustom;
34
+ HierarchyNode.isGeneric = isGeneric;
18
35
  /** Checks whether the given node is a standard (iModel content based) node */
19
- function isStandard(node) {
20
- return HierarchyNodeKey_1.HierarchyNodeKey.isStandard(node.key);
36
+ function isIModelNode(node) {
37
+ return HierarchyNodeKey_1.HierarchyNodeKey.isIModelNodeKey(node.key);
21
38
  }
22
- HierarchyNode.isStandard = isStandard;
39
+ HierarchyNode.isIModelNode = isIModelNode;
23
40
  /** Checks whether the given node is an ECInstances-based node */
24
41
  function isInstancesNode(node) {
25
42
  return HierarchyNodeKey_1.HierarchyNodeKey.isInstances(node.key);
@@ -1 +1 @@
1
- {"version":3,"file":"HierarchyNode.js","sourceRoot":"","sources":["../../../src/hierarchies/HierarchyNode.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;AAGhG,yDAW4B;AA4E5B,YAAY;AACZ,2DAA2D;AAC3D,IAAiB,aAAa,CAuE7B;AAvED,WAAiB,aAAa;IAC5B,qDAAqD;IACrD,SAAgB,QAAQ,CACtB,IAAW;QAEX,OAAO,mCAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC7C,CAAC;IAJe,sBAAQ,WAIvB,CAAA;IACD,8EAA8E;IAC9E,SAAgB,UAAU,CAA0C,IAAW;QAC7E,OAAO,mCAAgB,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC/C,CAAC;IAFe,wBAAU,aAEzB,CAAA;IACD,iEAAiE;IACjE,SAAgB,eAAe,CAC7B,IAAW;QAEX,OAAO,mCAAgB,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAChD,CAAC;IAJe,6BAAe,kBAI9B,CAAA;IACD,uDAAuD;IACvD,SAAgB,cAAc,CAC5B,IAAW;QAEX,OAAO,mCAAgB,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC/C,CAAC;IAJe,4BAAc,iBAI7B,CAAA;IACD,6DAA6D;IAC7D,SAAgB,mBAAmB,CACjC,IAAW;QAIX,OAAO,mCAAgB,CAAC,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACpD,CAAC;IANe,iCAAmB,sBAMlC,CAAA;IACD,6DAA6D;IAC7D,SAAgB,mBAAmB,CACjC,IAAW;QAIX,OAAO,mCAAgB,CAAC,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACpD,CAAC;IANe,iCAAmB,sBAMlC,CAAA;IACD,gFAAgF;IAChF,SAAgB,iCAAiC,CAC/C,IAAW;QAIX,OAAO,mCAAgB,CAAC,6BAA6B,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAClE,CAAC;IANe,+CAAiC,oCAMhD,CAAA;IACD,sEAAsE;IACtE,SAAgB,2BAA2B,CACzC,IAAW;QAIX,OAAO,mCAAgB,CAAC,uBAAuB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC5D,CAAC;IANe,yCAA2B,8BAM1C,CAAA;IACD,4EAA4E;IAC5E,SAAgB,gCAAgC,CAC9C,IAAW;QAIX,OAAO,mCAAgB,CAAC,4BAA4B,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACjE,CAAC;IANe,8CAAgC,mCAM/C,CAAA;IACD,gEAAgE;IAChE,SAAgB,sBAAsB,CACpC,IAAW;QAIX,OAAO,mCAAgB,CAAC,kBAAkB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACvD,CAAC;IANe,oCAAsB,yBAMrC,CAAA;AACH,CAAC,EAvEgB,aAAa,6BAAb,aAAa,QAuE7B","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n\nimport { ConcatenatedValue, InstanceKey, OmitOverUnion, PrimitiveValue } from \"@itwin/presentation-shared\";\nimport {\n ClassGroupingNodeKey,\n GroupingNodeKey,\n HierarchyNodeKey,\n InstancesNodeKey,\n LabelGroupingNodeKey,\n PropertyGroupingNodeKey,\n PropertyOtherValuesGroupingNodeKey,\n PropertyValueGroupingNodeKey,\n PropertyValueRangeGroupingNodeKey,\n StandardHierarchyNodeKey,\n} from \"./HierarchyNodeKey\";\nimport { HierarchyFilteringPath, HierarchyFilteringPathOptions } from \"./HierarchyProvider\";\n\n/** @beta */\nexport type HierarchyNodeFilteringProps = {\n /** If set to true, then one of the ancestor nodes in the hierarchy is the filter target. */\n hasFilterTargetAncestor?: boolean;\n /** Paths to node's children that are filter targets. */\n filteredChildrenIdentifierPaths?: HierarchyFilteringPath[];\n} & (\n | { isFilterTarget?: false }\n | {\n /** Whether or not this node is a filter target. */\n isFilterTarget: true;\n /** Options that were used to filter the node. */\n filterTargetOptions?: HierarchyFilteringPathOptions;\n }\n);\n\n/**\n * A data structure that defines attributes that are common to all types of hierarchy nodes.\n * @beta\n */\ninterface BaseHierarchyNode {\n /** Identifiers of all node ancestors. Can be used to identify a node in the hierarchy. */\n parentKeys: HierarchyNodeKey[];\n /** Node's display label. */\n label: string;\n /** A flag indicating whether the node has children or not. */\n children: boolean;\n /** A flag indicating whether this node should be auto-expanded in the UI. */\n autoExpand?: boolean;\n /** Additional data that may be assigned to this node. */\n extendedData?: { [key: string]: any };\n /** Data that may be assigned to the node if filtering is enabled */\n filtering?: HierarchyNodeFilteringProps;\n}\n\n/**\n * A data structure that represents a single non-grouping hierarchy node.\n * @beta\n */\nexport interface NonGroupingHierarchyNode extends BaseHierarchyNode {\n /** An identifier to identify the node in its hierarchy level. */\n key: string | InstancesNodeKey;\n /**\n * Identifies whether the hierarchy level below this node supports filtering. If not, supplying an instance\n * filter when requesting child hierarchy level will have no effect.\n */\n supportsFiltering?: boolean;\n}\n\n/**\n * A data structure that represents a grouping node that groups other nodes.\n * @beta\n */\nexport interface GroupingHierarchyNode extends BaseHierarchyNode {\n /** An identifier to identify this grouping node in its hierarchy level. */\n key: GroupingNodeKey;\n\n /**\n * Keys of all instances grouped by this node, including deeply nested under\n * other grouping nodes.\n */\n groupedInstanceKeys: InstanceKey[];\n\n /** The closest ancestor node that is not a grouping node. May be `undefined` if the grouping node grouped root level nodes. */\n nonGroupingAncestor?: ParentHierarchyNode<NonGroupingHierarchyNode>;\n}\n\n/**\n * A data structure that represents a single hierarchy node.\n * @beta\n */\nexport type HierarchyNode = NonGroupingHierarchyNode | GroupingHierarchyNode;\n\n/** @beta */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport namespace HierarchyNode {\n /** Checks whether the given node is a custom node */\n export function isCustom<TNode extends { key: HierarchyNodeKey }>(\n node: TNode,\n ): node is TNode & (TNode extends ProcessedHierarchyNode ? ProcessedCustomHierarchyNode : NonGroupingHierarchyNode) & { key: string } {\n return HierarchyNodeKey.isCustom(node.key);\n }\n /** Checks whether the given node is a standard (iModel content based) node */\n export function isStandard<TNode extends { key: HierarchyNodeKey }>(node: TNode): node is TNode & { key: StandardHierarchyNodeKey } {\n return HierarchyNodeKey.isStandard(node.key);\n }\n /** Checks whether the given node is an ECInstances-based node */\n export function isInstancesNode<TNode extends { key: HierarchyNodeKey }>(\n node: TNode,\n ): node is TNode & (TNode extends ProcessedHierarchyNode ? ProcessedInstanceHierarchyNode : NonGroupingHierarchyNode) & { key: InstancesNodeKey } {\n return HierarchyNodeKey.isInstances(node.key);\n }\n /** Checks whether the given node is a grouping node */\n export function isGroupingNode<TNode extends { key: HierarchyNodeKey }>(\n node: TNode,\n ): node is TNode & (TNode extends ProcessedHierarchyNode ? ProcessedGroupingHierarchyNode : GroupingHierarchyNode) {\n return HierarchyNodeKey.isGrouping(node.key);\n }\n /** Checks whether the given node is a class grouping node */\n export function isClassGroupingNode<TNode extends { key: HierarchyNodeKey }>(\n node: TNode,\n ): node is TNode & { key: ClassGroupingNodeKey; supportsFiltering?: undefined } & (TNode extends ProcessedHierarchyNode\n ? ProcessedGroupingHierarchyNode\n : GroupingHierarchyNode) {\n return HierarchyNodeKey.isClassGrouping(node.key);\n }\n /** Checks whether the given node is a label grouping node */\n export function isLabelGroupingNode<TNode extends { key: HierarchyNodeKey }>(\n node: TNode,\n ): node is TNode & { key: LabelGroupingNodeKey; supportsFiltering?: undefined } & (TNode extends ProcessedHierarchyNode\n ? ProcessedGroupingHierarchyNode\n : GroupingHierarchyNode) {\n return HierarchyNodeKey.isLabelGrouping(node.key);\n }\n /** Checks whether the given node is property grouping node for other values */\n export function isPropertyOtherValuesGroupingNode<TNode extends { key: HierarchyNodeKey }>(\n node: TNode,\n ): node is TNode & { key: PropertyOtherValuesGroupingNodeKey; supportsFiltering?: undefined } & (TNode extends ProcessedHierarchyNode\n ? ProcessedGroupingHierarchyNode\n : GroupingHierarchyNode) {\n return HierarchyNodeKey.isPropertyOtherValuesGrouping(node.key);\n }\n /** Checks whether the given node is a property value grouping node */\n export function isPropertyValueGroupingNode<TNode extends { key: HierarchyNodeKey }>(\n node: TNode,\n ): node is TNode & { key: PropertyValueGroupingNodeKey; supportsFiltering?: undefined } & (TNode extends ProcessedHierarchyNode\n ? ProcessedGroupingHierarchyNode\n : GroupingHierarchyNode) {\n return HierarchyNodeKey.isPropertyValueGrouping(node.key);\n }\n /** Checks whether the given node is a property value range grouping node */\n export function isPropertyValueRangeGroupingNode<TNode extends { key: HierarchyNodeKey }>(\n node: TNode,\n ): node is TNode & { key: PropertyValueRangeGroupingNodeKey; supportsFiltering?: undefined } & (TNode extends ProcessedHierarchyNode\n ? ProcessedGroupingHierarchyNode\n : GroupingHierarchyNode) {\n return HierarchyNodeKey.isPropertyValueRangeGrouping(node.key);\n }\n /** Checks whether the given node is a property grouping node */\n export function isPropertyGroupingNode<TNode extends { key: HierarchyNodeKey }>(\n node: TNode,\n ): node is TNode & { key: PropertyGroupingNodeKey; supportsFiltering?: undefined } & (TNode extends ProcessedHierarchyNode\n ? ProcessedGroupingHierarchyNode\n : GroupingHierarchyNode) {\n return HierarchyNodeKey.isPropertyGrouping(node.key);\n }\n}\n\n/**\n * A type of `HierarchyNode` that doesn't know about its children and is an input when requesting\n * them using `HierarchyProvider.getNodes`.\n * @beta\n */\nexport type ParentHierarchyNode<TBase = HierarchyNode> = OmitOverUnion<TBase, \"children\">;\n\n/**\n * Base processing parameters that apply to every node.\n * @beta\n */\ninterface HierarchyNodeProcessingParamsBase {\n /** Indicates if this node should be hidden if it has no child nodes. */\n hideIfNoChildren?: boolean;\n /** Indicates that this node should always be hidden and its children should be loaded in its place. */\n hideInHierarchy?: boolean;\n}\n\n/**\n * A data structure for defining nodes' grouping requirements.\n * @beta\n */\ninterface HierarchyNodeGroupingParams {\n byLabel?: HierarchyNodeLabelGroupingParams;\n byClass?: boolean | HierarchyNodeGroupingParamsBase;\n byBaseClasses?: HierarchyNodeBaseClassGroupingParams;\n byProperties?: HierarchyNodePropertiesGroupingParams;\n}\n\n/**\n * A data structure for defining params specifically used for label grouping.\n * @beta\n */\ninterface HierarchyNodeLabelGroupingBaseParams {\n /** Label grouping option that determines whether to group nodes or to merge them. Defaults to \"group\".*/\n action?: \"group\" | \"merge\";\n /** Value that needs to match in order for nodes to be grouped or merged.*/\n groupId?: string;\n}\n\n/**\n * A data structure for defining label merging.\n * @beta\n */\ninterface HierarchyNodeLabelGroupingMergeParams extends HierarchyNodeLabelGroupingBaseParams {\n action: \"merge\";\n}\n\n/**\n * A data structure for defining label grouping with additional parameters.\n * @beta\n */\ninterface HierarchyNodeLabelGroupingGroupParams extends HierarchyNodeLabelGroupingBaseParams, HierarchyNodeGroupingParamsBase {\n action?: \"group\";\n}\n\n/**\n * A data structure for defining possible label grouping types.\n * @beta\n */\nexport type HierarchyNodeLabelGroupingParams = boolean | HierarchyNodeLabelGroupingMergeParams | HierarchyNodeLabelGroupingGroupParams;\n\n/**\n * Grouping parameters that are shared across all types of groupings.\n * @beta\n */\nexport interface HierarchyNodeGroupingParamsBase {\n /** Hiding option that determines whether to hide group nodes which have no siblings at the same hierarchy level. */\n hideIfNoSiblings?: boolean;\n /** Hiding option that determines whether to hide group nodes which have only one node as its children. */\n hideIfOneGroupedNode?: boolean;\n /** Option which auto expands grouping nodes' children when it has single child or always. */\n autoExpand?: HierarchyNodeAutoExpandProp;\n}\n\n/**\n * Defines possible values for `BaseGroupingParams.autoExpand` attribute:\n * - `single-child` - set the grouping node to auto-expand if it groups a single node.\n * - `always` - always set the grouping node to auto-expand.\n * @beta\n */\nexport type HierarchyNodeAutoExpandProp = \"single-child\" | \"always\";\n\n/**\n * A data structure that represents base class grouping.\n * @beta\n */\ninterface HierarchyNodeBaseClassGroupingParams extends HierarchyNodeGroupingParamsBase {\n /**\n * Full names of classes, which should be used to group the node. Only has effect if the node\n * represents an instance of that class.\n *\n * Full class name format: `SchemaName.ClassName`.\n */\n fullClassNames: string[];\n}\n\n/**\n * A data structure that represents properties grouping.\n * @beta\n */\nexport interface HierarchyNodePropertiesGroupingParams extends HierarchyNodeGroupingParamsBase {\n /**\n * Full name of a class whose properties are used to group the node. Only has effect if the node\n * represents an instance of that class.\n *\n * Full class name format: `SchemaName.ClassName`.\n */\n propertiesClassName: string;\n /**\n * Property grouping option that determines whether to group nodes whose grouping value is not set or is set to an empty string.\n *\n * Label of the created grouping node will be `Not Specified`.\n */\n createGroupForUnspecifiedValues?: boolean;\n /**\n * Property grouping option that determines whether to group nodes whose grouping value doesn't fit within any of the provided\n * ranges, or is not a numeric value.\n *\n * Label of the created grouping node will be `Other`.\n */\n createGroupForOutOfRangeValues?: boolean;\n /**\n * Properties of the specified class, by which the nodes should be grouped. Each provided group definition results in a\n * grouping hierarchy level.\n *\n * Example usage:\n * ```ts\n * propertyGroups: [\n * {\n * propertyName: \"type\",\n * propertyValue: \"Wall\"\n * },\n * {\n * propertyName: \"length\",\n * propertyValue: 15,\n * ranges: [\n * { fromValue: 1, toValue: 10, rangeLabel: \"Small\" },\n * { fromValue: 11, toValue: 20, rangeLabel: \"Medium\" }\n * ]\n * },\n * ]\n * ```\n */\n propertyGroups: HierarchyNodePropertyGroup[];\n}\n\n/**\n * A data structure that represents specific properties' grouping params.\n * @beta\n */\nexport interface HierarchyNodePropertyGroup {\n /** A string indicating the name of the property to group by. */\n propertyName: string;\n /** Value of the property, which will be used to group the node. */\n propertyValue?: PrimitiveValue;\n /** Ranges are used to group nodes by numeric properties which are within specified bounds. */\n ranges?: HierarchyNodePropertyValueRange[];\n}\n\n/**\n * A data structure that represents boundaries for a value.\n * @beta\n */\nexport interface HierarchyNodePropertyValueRange {\n /** Defines the lower bound of the range. */\n fromValue: number;\n /** Defines the upper bound of the range. */\n toValue: number;\n /** Defines the range label. Will be used as `PropertyValueRangeGroupingNode` node's display label. */\n rangeLabel?: string;\n}\n\n/**\n * Processing parameters that apply to instance nodes.\n * @beta\n */\nexport interface InstanceHierarchyNodeProcessingParams extends HierarchyNodeProcessingParamsBase {\n grouping?: HierarchyNodeGroupingParams;\n}\n\n/**\n * A custom (not based on data in an iModel) node that has processing parameters.\n * @beta\n */\nexport type ProcessedCustomHierarchyNode = Omit<NonGroupingHierarchyNode, \"key\" | \"children\"> & {\n key: string;\n children?: boolean;\n processingParams?: HierarchyNodeProcessingParamsBase;\n};\n\n/**\n * An instances' (based on data in an iModel) node that has processing parameters.\n * @beta\n */\nexport type ProcessedInstanceHierarchyNode = Omit<NonGroupingHierarchyNode, \"key\" | \"children\"> & {\n key: InstancesNodeKey;\n children?: boolean;\n processingParams?: InstanceHierarchyNodeProcessingParams;\n};\n\n/**\n * A grouping node that groups either instance nodes or other grouping nodes.\n * @beta\n */\nexport type ProcessedGroupingHierarchyNode = Omit<GroupingHierarchyNode, \"children\"> & {\n children: Array<ProcessedGroupingHierarchyNode | ProcessedInstanceHierarchyNode>;\n};\n\n/**\n * A `HierarchyNode` that may have processing parameters defining whether it should be hidden under some conditions,\n * how it should be grouped, sorted, etc.\n *\n * Type guards under `HierarchyNode` namespace can be used to differentiate between different sub-types of\n * `ProcessedHierarchyNode`.\n *\n * @beta\n */\nexport type ProcessedHierarchyNode = ProcessedCustomHierarchyNode | ProcessedInstanceHierarchyNode | ProcessedGroupingHierarchyNode;\n\n/**\n * A `ProcessedHierarchyNode` that has an unformatted label in a form of `ConcatenatedValue`. Generally this is\n * returned when the node is just parsed from query results.\n * @beta\n */\nexport type ParsedHierarchyNode<TBase = ParsedCustomHierarchyNode | ParsedInstanceHierarchyNode> = OmitOverUnion<TBase, \"label\" | \"parentKeys\"> & {\n label: string | ConcatenatedValue;\n};\n\n/**\n * A kind of `ProcessedCustomHierarchyNode` that has unformatted label and doesn't know about its ancestors.\n * @beta\n */\nexport type ParsedCustomHierarchyNode = ParsedHierarchyNode<ProcessedCustomHierarchyNode>;\n\n/**\n * A kind of `ProcessedInstanceHierarchyNode` that has unformatted label and doesn't know about its ancestors.\n * @beta\n */\nexport type ParsedInstanceHierarchyNode = ParsedHierarchyNode<ProcessedInstanceHierarchyNode>;\n"]}
1
+ {"version":3,"file":"HierarchyNode.js","sourceRoot":"","sources":["../../../src/hierarchies/HierarchyNode.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;AAIhG,yDAa4B;AAoB5B,YAAY;AACZ,2DAA2D;AAC3D,IAAiB,2BAA2B,CAiB3C;AAjBD,WAAiB,2BAA2B;IAC1C,SAAgB,MAAM,CAAC,KAKtB;QACC,MAAM,EAAE,uBAAuB,EAAE,+BAA+B,EAAE,cAAc,EAAE,mBAAmB,EAAE,GAAG,KAAK,CAAC;QAChH,IAAI,cAAc,IAAI,uBAAuB,IAAI,+BAA+B,EAAE,MAAM,EAAE,CAAC;YACzF,OAAO;gBACL,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,mBAAmB,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;gBACzE,GAAG,CAAC,uBAAuB,CAAC,CAAC,CAAC,EAAE,uBAAuB,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;gBACtE,GAAG,CAAC,CAAC,CAAC,+BAA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;IACD,gFAAgF;IAChF,SAAgB,iCAAiC,CAC/C,IAAW;QAEX,OAAO,mCAAgB,CAAC,6BAA6B,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAClE,CAAC;IAJe,+CAAiC,oCAIhD,CAAA;IACD,sEAAsE;IACtE,SAAgB,2BAA2B,CACzC,IAAW;QAEX,OAAO,mCAAgB,CAAC,uBAAuB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC5D,CAAC;IAJe,yCAA2B,8BAI1C,CAAA;IACD,4EAA4E;IAC5E,SAAgB,gCAAgC,CAC9C,IAAW;QAEX,OAAO,mCAAgB,CAAC,4BAA4B,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACjE,CAAC;IAJe,8CAAgC,mCAI/C,CAAA;IACD,gEAAgE;IAChE,SAAgB,sBAAsB,CACpC,IAAW;QAEX,OAAO,mCAAgB,CAAC,kBAAkB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACvD,CAAC;IAJe,oCAAsB,yBAIrC,CAAA;AACH,CAAC,EArDgB,aAAa,6BAAb,aAAa,QAqD7B","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n\nimport { OmitOverUnion } from \"@itwin/presentation-shared\";\nimport { HierarchyFilteringPath, HierarchyFilteringPathOptions } from \"./HierarchyFiltering\";\nimport {\n ClassGroupingNodeKey,\n GenericNodeKey,\n GroupingNodeKey,\n HierarchyNodeKey,\n IModelHierarchyNodeKey,\n IModelInstanceKey,\n InstancesNodeKey,\n LabelGroupingNodeKey,\n PropertyGroupingNodeKey,\n PropertyOtherValuesGroupingNodeKey,\n PropertyValueGroupingNodeKey,\n PropertyValueRangeGroupingNodeKey,\n} from \"./HierarchyNodeKey\";\n\n/** @beta */\nexport type HierarchyNodeFilteringProps = {\n /** If set to true, then one of the ancestor nodes in the hierarchy is the filter target. */\n hasFilterTargetAncestor?: boolean;\n /** Paths to node's children that are filter targets. */\n filteredChildrenIdentifierPaths?: HierarchyFilteringPath[];\n} & (\n | {\n /** Whether or not this node is a filter target. */\n isFilterTarget?: false;\n }\n | {\n /** Whether or not this node is a filter target. */\n isFilterTarget: true;\n /** Options that were used to filter the node. */\n filterTargetOptions?: HierarchyFilteringPathOptions;\n }\n);\n/** @beta */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport namespace HierarchyNodeFilteringProps {\n export function create(props: {\n hasFilterTargetAncestor?: boolean;\n filteredChildrenIdentifierPaths?: HierarchyFilteringPath[];\n isFilterTarget?: boolean;\n filterTargetOptions?: HierarchyFilteringPathOptions;\n }): HierarchyNodeFilteringProps | undefined {\n const { hasFilterTargetAncestor, filteredChildrenIdentifierPaths, isFilterTarget, filterTargetOptions } = props;\n if (isFilterTarget || hasFilterTargetAncestor || filteredChildrenIdentifierPaths?.length) {\n return {\n ...(isFilterTarget ? { isFilterTarget, filterTargetOptions } : undefined),\n ...(hasFilterTargetAncestor ? { hasFilterTargetAncestor } : undefined),\n ...(!!filteredChildrenIdentifierPaths?.length ? { filteredChildrenIdentifierPaths } : undefined),\n };\n }\n return undefined;\n }\n}\n\n/**\n * A data structure that defines attributes that are common to all types of hierarchy nodes.\n * @beta\n */\ninterface BaseHierarchyNode {\n /** Identifiers of all node ancestors. Can be used to identify a node in the hierarchy. */\n parentKeys: HierarchyNodeKey[];\n /** Node's display label. */\n label: string;\n /** A flag indicating whether the node has children or not. */\n children: boolean;\n /** A flag indicating whether this node should be auto-expanded in the UI. */\n autoExpand?: boolean;\n /** Additional data that may be assigned to this node. */\n extendedData?: { [key: string]: any };\n /** Data that may be assigned to the node if filtering is enabled */\n filtering?: HierarchyNodeFilteringProps;\n}\n\n/**\n * A data structure that represents a single non-grouping hierarchy node.\n * @beta\n */\nexport interface NonGroupingHierarchyNode extends BaseHierarchyNode {\n /** An identifier to identify the node in its hierarchy level. */\n key: GenericNodeKey | InstancesNodeKey;\n /**\n * Identifies whether the hierarchy level below this node supports filtering. If not, supplying an instance\n * filter when requesting child hierarchy level will have no effect.\n */\n supportsFiltering?: boolean;\n}\n\n/**\n * A data structure that represents a grouping node that groups other nodes.\n * @beta\n */\nexport interface GroupingHierarchyNode extends BaseHierarchyNode {\n /** An identifier to identify this grouping node in its hierarchy level. */\n key: GroupingNodeKey;\n\n /**\n * Keys of all instances grouped by this node, including deeply nested under\n * other grouping nodes.\n */\n groupedInstanceKeys: IModelInstanceKey[];\n\n /** The closest ancestor node that is not a grouping node. May be `undefined` if the grouping node grouped root level nodes. */\n nonGroupingAncestor?: ParentHierarchyNode<NonGroupingHierarchyNode>;\n}\n\n/**\n * A data structure that represents a single hierarchy node.\n * @beta\n */\nexport type HierarchyNode = NonGroupingHierarchyNode | GroupingHierarchyNode;\n\n/** @beta */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport namespace HierarchyNode {\n /** Checks whether the given node is a generic node */\n export function isGeneric<TNode extends { key: HierarchyNodeKey }>(node: TNode): node is TNode & NonGroupingHierarchyNode & { key: GenericNodeKey } {\n return HierarchyNodeKey.isGeneric(node.key);\n }\n /** Checks whether the given node is a standard (iModel content based) node */\n export function isIModelNode<TNode extends { key: HierarchyNodeKey }>(node: TNode): node is TNode & { key: IModelHierarchyNodeKey } {\n return HierarchyNodeKey.isIModelNodeKey(node.key);\n }\n /** Checks whether the given node is an ECInstances-based node */\n export function isInstancesNode<TNode extends { key: HierarchyNodeKey }>(node: TNode): node is TNode & NonGroupingHierarchyNode & { key: InstancesNodeKey } {\n return HierarchyNodeKey.isInstances(node.key);\n }\n /** Checks whether the given node is a grouping node */\n export function isGroupingNode<TNode extends { key: HierarchyNodeKey }>(node: TNode): node is TNode & GroupingHierarchyNode {\n return HierarchyNodeKey.isGrouping(node.key);\n }\n /** Checks whether the given node is a class grouping node */\n export function isClassGroupingNode<TNode extends { key: HierarchyNodeKey }>(\n node: TNode,\n ): node is TNode & { key: ClassGroupingNodeKey; supportsFiltering?: undefined } & GroupingHierarchyNode {\n return HierarchyNodeKey.isClassGrouping(node.key);\n }\n /** Checks whether the given node is a label grouping node */\n export function isLabelGroupingNode<TNode extends { key: HierarchyNodeKey }>(\n node: TNode,\n ): node is TNode & { key: LabelGroupingNodeKey; supportsFiltering?: undefined } & GroupingHierarchyNode {\n return HierarchyNodeKey.isLabelGrouping(node.key);\n }\n /** Checks whether the given node is property grouping node for other values */\n export function isPropertyOtherValuesGroupingNode<TNode extends { key: HierarchyNodeKey }>(\n node: TNode,\n ): node is TNode & { key: PropertyOtherValuesGroupingNodeKey; supportsFiltering?: undefined } & GroupingHierarchyNode {\n return HierarchyNodeKey.isPropertyOtherValuesGrouping(node.key);\n }\n /** Checks whether the given node is a property value grouping node */\n export function isPropertyValueGroupingNode<TNode extends { key: HierarchyNodeKey }>(\n node: TNode,\n ): node is TNode & { key: PropertyValueGroupingNodeKey; supportsFiltering?: undefined } & GroupingHierarchyNode {\n return HierarchyNodeKey.isPropertyValueGrouping(node.key);\n }\n /** Checks whether the given node is a property value range grouping node */\n export function isPropertyValueRangeGroupingNode<TNode extends { key: HierarchyNodeKey }>(\n node: TNode,\n ): node is TNode & { key: PropertyValueRangeGroupingNodeKey; supportsFiltering?: undefined } & GroupingHierarchyNode {\n return HierarchyNodeKey.isPropertyValueRangeGrouping(node.key);\n }\n /** Checks whether the given node is a property grouping node */\n export function isPropertyGroupingNode<TNode extends { key: HierarchyNodeKey }>(\n node: TNode,\n ): node is TNode & { key: PropertyGroupingNodeKey; supportsFiltering?: undefined } & GroupingHierarchyNode {\n return HierarchyNodeKey.isPropertyGrouping(node.key);\n }\n}\n\n/**\n * A type of `HierarchyNode` that doesn't know about its children and is an input when requesting\n * them using `HierarchyProvider.getNodes`.\n * @beta\n */\nexport type ParentHierarchyNode<TBase = HierarchyNode> = OmitOverUnion<TBase, \"children\">;\n"]}
@@ -1,25 +1,21 @@
1
- import { InstanceKey } from "@itwin/presentation-shared";
1
+ import { GenericNodeKey, IModelInstanceKey } from "./HierarchyNodeKey";
2
2
  /**
3
- * An identifier that can be used to identify either an ECInstance or a custom node.
3
+ * An identifier that can be used to identify either an ECInstance or a generic node.
4
4
  *
5
5
  * This is different from `HierarchyNodeKey` - the key can represent more types of nodes and,
6
6
  * in case of `InstancesNodeKey`, contains information about all instances the node represents.
7
7
  * `HierarchyNodeIdentifier`, on the other hand, is used for matching a node, so it only needs
8
- * to contain information about a single instance or custom node key.
8
+ * to contain information about a single instance.
9
9
  *
10
10
  * @beta
11
11
  */
12
- export type HierarchyNodeIdentifier = InstanceKey | {
13
- key: string;
14
- };
12
+ export type HierarchyNodeIdentifier = IModelInstanceKey | GenericNodeKey;
15
13
  /** @beta */
16
14
  export declare namespace HierarchyNodeIdentifier {
17
15
  /** Checks whether the given identifier is an instance node identifier */
18
- function isInstanceNodeIdentifier(id: HierarchyNodeIdentifier): id is InstanceKey;
19
- /** Checks whether the given identifier is a custom node identifier */
20
- function isCustomNodeIdentifier(id: HierarchyNodeIdentifier): id is {
21
- key: string;
22
- };
16
+ function isInstanceNodeIdentifier(id: HierarchyNodeIdentifier): id is IModelInstanceKey;
17
+ /** Checks whether the given identifier is a generic node identifier */
18
+ function isGenericNodeIdentifier(id: HierarchyNodeIdentifier): id is GenericNodeKey;
23
19
  /** Checks two identifiers for equality */
24
20
  function equal(lhs: HierarchyNodeIdentifier, rhs: HierarchyNodeIdentifier): boolean;
25
21
  }
@@ -1 +1 @@
1
- {"version":3,"file":"HierarchyNodeIdentifier.d.ts","sourceRoot":"","sources":["../../../src/hierarchies/HierarchyNodeIdentifier.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAEzD;;;;;;;;;GASG;AACH,MAAM,MAAM,uBAAuB,GAAG,WAAW,GAAG;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC;AAEpE,YAAY;AAEZ,yBAAiB,uBAAuB,CAAC;IACvC,yEAAyE;IACzE,SAAgB,wBAAwB,CAAC,EAAE,EAAE,uBAAuB,GAAG,EAAE,IAAI,WAAW,CAEvF;IAED,sEAAsE;IACtE,SAAgB,sBAAsB,CAAC,EAAE,EAAE,uBAAuB,GAAG,EAAE,IAAI;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,CAEzF;IAED,0CAA0C;IAC1C,SAAgB,KAAK,CAAC,GAAG,EAAE,uBAAuB,EAAE,GAAG,EAAE,uBAAuB,WAQ/E;CACF;AAED;;;;;GAKG;AACH,MAAM,MAAM,4BAA4B,GAAG,uBAAuB,EAAE,CAAC"}
1
+ {"version":3,"file":"HierarchyNodeIdentifier.d.ts","sourceRoot":"","sources":["../../../src/hierarchies/HierarchyNodeIdentifier.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvE;;;;;;;;;GASG;AACH,MAAM,MAAM,uBAAuB,GAAG,iBAAiB,GAAG,cAAc,CAAC;AAEzE,YAAY;AAEZ,yBAAiB,uBAAuB,CAAC;IACvC,yEAAyE;IACzE,SAAgB,wBAAwB,CAAC,EAAE,EAAE,uBAAuB,GAAG,EAAE,IAAI,iBAAiB,CAE7F;IAED,uEAAuE;IACvE,SAAgB,uBAAuB,CAAC,EAAE,EAAE,uBAAuB,GAAG,EAAE,IAAI,cAAc,CAEzF;IAED,0CAA0C;IAC1C,SAAgB,KAAK,CAAC,GAAG,EAAE,uBAAuB,EAAE,GAAG,EAAE,uBAAuB,WAQ/E;CACF;AAED;;;;;GAKG;AACH,MAAM,MAAM,4BAA4B,GAAG,uBAAuB,EAAE,CAAC"}
@@ -5,27 +5,28 @@
5
5
  *--------------------------------------------------------------------------------------------*/
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.HierarchyNodeIdentifier = void 0;
8
+ const presentation_shared_1 = require("@itwin/presentation-shared");
8
9
  /** @beta */
9
10
  // eslint-disable-next-line @typescript-eslint/no-redeclare
10
11
  var HierarchyNodeIdentifier;
11
12
  (function (HierarchyNodeIdentifier) {
12
13
  /** Checks whether the given identifier is an instance node identifier */
13
14
  function isInstanceNodeIdentifier(id) {
14
- return !!id.id;
15
+ return "className" in id;
15
16
  }
16
17
  HierarchyNodeIdentifier.isInstanceNodeIdentifier = isInstanceNodeIdentifier;
17
- /** Checks whether the given identifier is a custom node identifier */
18
- function isCustomNodeIdentifier(id) {
19
- return !!id.key;
18
+ /** Checks whether the given identifier is a generic node identifier */
19
+ function isGenericNodeIdentifier(id) {
20
+ return !isInstanceNodeIdentifier(id);
20
21
  }
21
- HierarchyNodeIdentifier.isCustomNodeIdentifier = isCustomNodeIdentifier;
22
+ HierarchyNodeIdentifier.isGenericNodeIdentifier = isGenericNodeIdentifier;
22
23
  /** Checks two identifiers for equality */
23
24
  function equal(lhs, rhs) {
24
25
  if (isInstanceNodeIdentifier(lhs) && isInstanceNodeIdentifier(rhs)) {
25
- return lhs.className === rhs.className && lhs.id === rhs.id;
26
+ return presentation_shared_1.InstanceKey.equals(lhs, rhs) && lhs.imodelKey === rhs.imodelKey;
26
27
  }
27
- if (isCustomNodeIdentifier(lhs) && isCustomNodeIdentifier(rhs)) {
28
- return lhs.key === rhs.key;
28
+ if (isGenericNodeIdentifier(lhs) && isGenericNodeIdentifier(rhs)) {
29
+ return lhs.source === rhs.source && lhs.id === rhs.id;
29
30
  }
30
31
  return false;
31
32
  }
@@ -1 +1 @@
1
- {"version":3,"file":"HierarchyNodeIdentifier.js","sourceRoot":"","sources":["../../../src/hierarchies/HierarchyNodeIdentifier.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;AAgBhG,YAAY;AACZ,2DAA2D;AAC3D,IAAiB,uBAAuB,CAqBvC;AArBD,WAAiB,uBAAuB;IACtC,yEAAyE;IACzE,SAAgB,wBAAwB,CAAC,EAA2B;QAClE,OAAO,CAAC,CAAE,EAAkB,CAAC,EAAE,CAAC;IAClC,CAAC;IAFe,gDAAwB,2BAEvC,CAAA;IAED,sEAAsE;IACtE,SAAgB,sBAAsB,CAAC,EAA2B;QAChE,OAAO,CAAC,CAAE,EAAsB,CAAC,GAAG,CAAC;IACvC,CAAC;IAFe,8CAAsB,yBAErC,CAAA;IAED,0CAA0C;IAC1C,SAAgB,KAAK,CAAC,GAA4B,EAAE,GAA4B;QAC9E,IAAI,wBAAwB,CAAC,GAAG,CAAC,IAAI,wBAAwB,CAAC,GAAG,CAAC,EAAE,CAAC;YACnE,OAAO,GAAG,CAAC,SAAS,KAAK,GAAG,CAAC,SAAS,IAAI,GAAG,CAAC,EAAE,KAAK,GAAG,CAAC,EAAE,CAAC;QAC9D,CAAC;QACD,IAAI,sBAAsB,CAAC,GAAG,CAAC,IAAI,sBAAsB,CAAC,GAAG,CAAC,EAAE,CAAC;YAC/D,OAAO,GAAG,CAAC,GAAG,KAAK,GAAG,CAAC,GAAG,CAAC;QAC7B,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IARe,6BAAK,QAQpB,CAAA;AACH,CAAC,EArBgB,uBAAuB,uCAAvB,uBAAuB,QAqBvC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n\nimport { InstanceKey } from \"@itwin/presentation-shared\";\n\n/**\n * An identifier that can be used to identify either an ECInstance or a custom node.\n *\n * This is different from `HierarchyNodeKey` - the key can represent more types of nodes and,\n * in case of `InstancesNodeKey`, contains information about all instances the node represents.\n * `HierarchyNodeIdentifier`, on the other hand, is used for matching a node, so it only needs\n * to contain information about a single instance or custom node key.\n *\n * @beta\n */\nexport type HierarchyNodeIdentifier = InstanceKey | { key: string };\n\n/** @beta */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport namespace HierarchyNodeIdentifier {\n /** Checks whether the given identifier is an instance node identifier */\n export function isInstanceNodeIdentifier(id: HierarchyNodeIdentifier): id is InstanceKey {\n return !!(id as InstanceKey).id;\n }\n\n /** Checks whether the given identifier is a custom node identifier */\n export function isCustomNodeIdentifier(id: HierarchyNodeIdentifier): id is { key: string } {\n return !!(id as { key: string }).key;\n }\n\n /** Checks two identifiers for equality */\n export function equal(lhs: HierarchyNodeIdentifier, rhs: HierarchyNodeIdentifier) {\n if (isInstanceNodeIdentifier(lhs) && isInstanceNodeIdentifier(rhs)) {\n return lhs.className === rhs.className && lhs.id === rhs.id;\n }\n if (isCustomNodeIdentifier(lhs) && isCustomNodeIdentifier(rhs)) {\n return lhs.key === rhs.key;\n }\n return false;\n }\n}\n\n/**\n * A path of hierarchy node identifiers, typically used to describe a path from root down\n * to specific node deep in the hierarchy.\n *\n * @beta\n */\nexport type HierarchyNodeIdentifiersPath = HierarchyNodeIdentifier[];\n"]}
1
+ {"version":3,"file":"HierarchyNodeIdentifier.js","sourceRoot":"","sources":["../../../src/hierarchies/HierarchyNodeIdentifier.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;AAEhG,oEAAyD;AAezD,YAAY;AACZ,2DAA2D;AAC3D,IAAiB,uBAAuB,CAqBvC;AArBD,WAAiB,uBAAuB;IACtC,yEAAyE;IACzE,SAAgB,wBAAwB,CAAC,EAA2B;QAClE,OAAO,WAAW,IAAI,EAAE,CAAC;IAC3B,CAAC;IAFe,gDAAwB,2BAEvC,CAAA;IAED,uEAAuE;IACvE,SAAgB,uBAAuB,CAAC,EAA2B;QACjE,OAAO,CAAC,wBAAwB,CAAC,EAAE,CAAC,CAAC;IACvC,CAAC;IAFe,+CAAuB,0BAEtC,CAAA;IAED,0CAA0C;IAC1C,SAAgB,KAAK,CAAC,GAA4B,EAAE,GAA4B;QAC9E,IAAI,wBAAwB,CAAC,GAAG,CAAC,IAAI,wBAAwB,CAAC,GAAG,CAAC,EAAE,CAAC;YACnE,OAAO,iCAAW,CAAC,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,IAAI,GAAG,CAAC,SAAS,KAAK,GAAG,CAAC,SAAS,CAAC;QACzE,CAAC;QACD,IAAI,uBAAuB,CAAC,GAAG,CAAC,IAAI,uBAAuB,CAAC,GAAG,CAAC,EAAE,CAAC;YACjE,OAAO,GAAG,CAAC,MAAM,KAAK,GAAG,CAAC,MAAM,IAAI,GAAG,CAAC,EAAE,KAAK,GAAG,CAAC,EAAE,CAAC;QACxD,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IARe,6BAAK,QAQpB,CAAA;AACH,CAAC,EArBgB,uBAAuB,uCAAvB,uBAAuB,QAqBvC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n\nimport { InstanceKey } from \"@itwin/presentation-shared\";\nimport { GenericNodeKey, IModelInstanceKey } from \"./HierarchyNodeKey\";\n\n/**\n * An identifier that can be used to identify either an ECInstance or a generic node.\n *\n * This is different from `HierarchyNodeKey` - the key can represent more types of nodes and,\n * in case of `InstancesNodeKey`, contains information about all instances the node represents.\n * `HierarchyNodeIdentifier`, on the other hand, is used for matching a node, so it only needs\n * to contain information about a single instance.\n *\n * @beta\n */\nexport type HierarchyNodeIdentifier = IModelInstanceKey | GenericNodeKey;\n\n/** @beta */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport namespace HierarchyNodeIdentifier {\n /** Checks whether the given identifier is an instance node identifier */\n export function isInstanceNodeIdentifier(id: HierarchyNodeIdentifier): id is IModelInstanceKey {\n return \"className\" in id;\n }\n\n /** Checks whether the given identifier is a generic node identifier */\n export function isGenericNodeIdentifier(id: HierarchyNodeIdentifier): id is GenericNodeKey {\n return !isInstanceNodeIdentifier(id);\n }\n\n /** Checks two identifiers for equality */\n export function equal(lhs: HierarchyNodeIdentifier, rhs: HierarchyNodeIdentifier) {\n if (isInstanceNodeIdentifier(lhs) && isInstanceNodeIdentifier(rhs)) {\n return InstanceKey.equals(lhs, rhs) && lhs.imodelKey === rhs.imodelKey;\n }\n if (isGenericNodeIdentifier(lhs) && isGenericNodeIdentifier(rhs)) {\n return lhs.source === rhs.source && lhs.id === rhs.id;\n }\n return false;\n }\n}\n\n/**\n * A path of hierarchy node identifiers, typically used to describe a path from root down\n * to specific node deep in the hierarchy.\n *\n * @beta\n */\nexport type HierarchyNodeIdentifiersPath = HierarchyNodeIdentifier[];\n"]}