@itwin/presentation-hierarchies 2.0.0-alpha.16 → 2.0.0-alpha.17

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 (422) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/lib/hierarchies/HierarchyErrors.d.ts.map +1 -0
  3. package/lib/hierarchies/HierarchyErrors.js.map +1 -0
  4. package/lib/hierarchies/HierarchyMerge.d.ts.map +1 -0
  5. package/lib/hierarchies/HierarchyMerge.js.map +1 -0
  6. package/lib/hierarchies/HierarchyNode.d.ts.map +1 -0
  7. package/lib/hierarchies/HierarchyNode.js.map +1 -0
  8. package/lib/hierarchies/HierarchyNodeIdentifier.d.ts.map +1 -0
  9. package/lib/hierarchies/HierarchyNodeIdentifier.js.map +1 -0
  10. package/lib/{esm/hierarchies → hierarchies}/HierarchyNodeKey.d.ts +4 -4
  11. package/lib/hierarchies/HierarchyNodeKey.d.ts.map +1 -0
  12. package/lib/{esm/hierarchies → hierarchies}/HierarchyNodeKey.js +5 -5
  13. package/lib/hierarchies/HierarchyNodeKey.js.map +1 -0
  14. package/lib/hierarchies/HierarchyProvider.d.ts.map +1 -0
  15. package/lib/hierarchies/HierarchyProvider.js.map +1 -0
  16. package/lib/hierarchies/HierarchySearch.d.ts.map +1 -0
  17. package/lib/hierarchies/HierarchySearch.js.map +1 -0
  18. package/lib/hierarchies/Logging.d.ts.map +1 -0
  19. package/lib/hierarchies/Logging.js.map +1 -0
  20. package/lib/hierarchies/imodel/HierarchyCache.d.ts.map +1 -0
  21. package/lib/hierarchies/imodel/HierarchyCache.js.map +1 -0
  22. package/lib/{esm/hierarchies → hierarchies}/imodel/IModelHierarchyDefinition.d.ts +1 -1
  23. package/lib/hierarchies/imodel/IModelHierarchyDefinition.d.ts.map +1 -0
  24. package/lib/hierarchies/imodel/IModelHierarchyDefinition.js.map +1 -0
  25. package/lib/{esm/hierarchies → hierarchies}/imodel/IModelHierarchyNode.d.ts +2 -2
  26. package/lib/hierarchies/imodel/IModelHierarchyNode.d.ts.map +1 -0
  27. package/lib/hierarchies/imodel/IModelHierarchyNode.js.map +1 -0
  28. package/lib/hierarchies/imodel/IModelHierarchyProvider.d.ts.map +1 -0
  29. package/lib/hierarchies/imodel/IModelHierarchyProvider.js.map +1 -0
  30. package/lib/hierarchies/imodel/LimitingECSqlQueryExecutor.d.ts.map +1 -0
  31. package/lib/hierarchies/imodel/LimitingECSqlQueryExecutor.js.map +1 -0
  32. package/lib/{esm/hierarchies → hierarchies}/imodel/NodeSelectQueryFactory.d.ts +4 -4
  33. package/lib/hierarchies/imodel/NodeSelectQueryFactory.d.ts.map +1 -0
  34. package/lib/{esm/hierarchies → hierarchies}/imodel/NodeSelectQueryFactory.js +5 -5
  35. package/lib/hierarchies/imodel/NodeSelectQueryFactory.js.map +1 -0
  36. package/lib/{esm/hierarchies → hierarchies}/imodel/PredicateBasedHierarchyDefinition.d.ts +2 -2
  37. package/lib/hierarchies/imodel/PredicateBasedHierarchyDefinition.d.ts.map +1 -0
  38. package/lib/hierarchies/imodel/PredicateBasedHierarchyDefinition.js.map +1 -0
  39. package/lib/hierarchies/imodel/SearchHierarchyDefinition.d.ts.map +1 -0
  40. package/lib/{esm/hierarchies → hierarchies}/imodel/SearchHierarchyDefinition.js +3 -4
  41. package/lib/hierarchies/imodel/SearchHierarchyDefinition.js.map +1 -0
  42. package/lib/{esm/hierarchies → hierarchies}/imodel/TreeNodesReader.d.ts +1 -1
  43. package/lib/hierarchies/imodel/TreeNodesReader.d.ts.map +1 -0
  44. package/lib/{esm/hierarchies → hierarchies}/imodel/TreeNodesReader.js +2 -5
  45. package/lib/hierarchies/imodel/TreeNodesReader.js.map +1 -0
  46. package/lib/hierarchies/imodel/Utils.d.ts.map +1 -0
  47. package/lib/hierarchies/imodel/Utils.js.map +1 -0
  48. package/lib/hierarchies/imodel/operators/DetermineChildren.d.ts.map +1 -0
  49. package/lib/hierarchies/imodel/operators/DetermineChildren.js.map +1 -0
  50. package/lib/hierarchies/imodel/operators/Grouping.d.ts.map +1 -0
  51. package/lib/hierarchies/imodel/operators/Grouping.js.map +1 -0
  52. package/lib/hierarchies/imodel/operators/HideIfNoChildren.d.ts.map +1 -0
  53. package/lib/hierarchies/imodel/operators/HideIfNoChildren.js.map +1 -0
  54. package/lib/hierarchies/imodel/operators/HideNodesInHierarchy.d.ts.map +1 -0
  55. package/lib/hierarchies/imodel/operators/HideNodesInHierarchy.js.map +1 -0
  56. package/lib/hierarchies/imodel/operators/grouping/AutoExpand.d.ts.map +1 -0
  57. package/lib/hierarchies/imodel/operators/grouping/AutoExpand.js.map +1 -0
  58. package/lib/hierarchies/imodel/operators/grouping/BaseClassGrouping.d.ts.map +1 -0
  59. package/lib/{esm/hierarchies → hierarchies}/imodel/operators/grouping/BaseClassGrouping.js +4 -4
  60. package/lib/hierarchies/imodel/operators/grouping/BaseClassGrouping.js.map +1 -0
  61. package/lib/hierarchies/imodel/operators/grouping/ClassGrouping.d.ts.map +1 -0
  62. package/lib/{esm/hierarchies → hierarchies}/imodel/operators/grouping/ClassGrouping.js +3 -3
  63. package/lib/hierarchies/imodel/operators/grouping/ClassGrouping.js.map +1 -0
  64. package/lib/hierarchies/imodel/operators/grouping/GroupHiding.d.ts.map +1 -0
  65. package/lib/hierarchies/imodel/operators/grouping/GroupHiding.js.map +1 -0
  66. package/lib/hierarchies/imodel/operators/grouping/LabelGrouping.d.ts.map +1 -0
  67. package/lib/hierarchies/imodel/operators/grouping/LabelGrouping.js.map +1 -0
  68. package/lib/{cjs/hierarchies → hierarchies}/imodel/operators/grouping/PropertiesGrouping.d.ts +1 -1
  69. package/lib/hierarchies/imodel/operators/grouping/PropertiesGrouping.d.ts.map +1 -0
  70. package/lib/{esm/hierarchies → hierarchies}/imodel/operators/grouping/PropertiesGrouping.js +10 -9
  71. package/lib/hierarchies/imodel/operators/grouping/PropertiesGrouping.js.map +1 -0
  72. package/lib/hierarchies/imodel/operators/grouping/Shared.d.ts.map +1 -0
  73. package/lib/hierarchies/imodel/operators/grouping/Shared.js.map +1 -0
  74. package/lib/hierarchies/internal/Common.d.ts.map +1 -0
  75. package/lib/hierarchies/internal/Common.js.map +1 -0
  76. package/lib/hierarchies/internal/DisposePolyfill.d.ts.map +1 -0
  77. package/lib/hierarchies/internal/DisposePolyfill.js.map +1 -0
  78. package/lib/hierarchies/internal/EachValueFrom.d.ts.map +1 -0
  79. package/lib/hierarchies/internal/EachValueFrom.js.map +1 -0
  80. package/lib/hierarchies/internal/LoggingUtils.d.ts.map +1 -0
  81. package/lib/hierarchies/internal/LoggingUtils.js.map +1 -0
  82. package/lib/hierarchies/internal/RxjsHierarchyDefinition.d.ts.map +1 -0
  83. package/lib/hierarchies/internal/RxjsHierarchyDefinition.js.map +1 -0
  84. package/lib/hierarchies/internal/SubscriptionScheduler.d.ts.map +1 -0
  85. package/lib/hierarchies/internal/SubscriptionScheduler.js.map +1 -0
  86. package/lib/hierarchies/internal/operators/Partition.d.ts.map +1 -0
  87. package/lib/hierarchies/internal/operators/Partition.js.map +1 -0
  88. package/lib/hierarchies/internal/operators/ReduceToMergeMap.d.ts.map +1 -0
  89. package/lib/hierarchies/internal/operators/ReduceToMergeMap.js.map +1 -0
  90. package/lib/hierarchies/internal/operators/ReleaseMainThread.d.ts.map +1 -0
  91. package/lib/hierarchies/internal/operators/ReleaseMainThread.js.map +1 -0
  92. package/lib/hierarchies/internal/operators/ShareReplayWithErrors.d.ts.map +1 -0
  93. package/lib/hierarchies/internal/operators/ShareReplayWithErrors.js.map +1 -0
  94. package/lib/hierarchies/internal/operators/Sorting.d.ts.map +1 -0
  95. package/lib/hierarchies/internal/operators/Sorting.js.map +1 -0
  96. package/lib/hierarchies/internal/operators/TapOnce.d.ts.map +1 -0
  97. package/lib/hierarchies/internal/operators/TapOnce.js.map +1 -0
  98. package/lib/presentation-hierarchies.d.ts.map +1 -0
  99. package/lib/{cjs/presentation-hierarchies.js.map → presentation-hierarchies.js.map} +1 -1
  100. package/package.json +18 -20
  101. package/lib/cjs/hierarchies/HierarchyErrors.d.ts.map +0 -1
  102. package/lib/cjs/hierarchies/HierarchyErrors.js +0 -20
  103. package/lib/cjs/hierarchies/HierarchyErrors.js.map +0 -1
  104. package/lib/cjs/hierarchies/HierarchyMerge.d.ts.map +0 -1
  105. package/lib/cjs/hierarchies/HierarchyMerge.js +0 -43
  106. package/lib/cjs/hierarchies/HierarchyMerge.js.map +0 -1
  107. package/lib/cjs/hierarchies/HierarchyNode.d.ts.map +0 -1
  108. package/lib/cjs/hierarchies/HierarchyNode.js +0 -82
  109. package/lib/cjs/hierarchies/HierarchyNode.js.map +0 -1
  110. package/lib/cjs/hierarchies/HierarchyNodeIdentifier.d.ts.map +0 -1
  111. package/lib/cjs/hierarchies/HierarchyNodeIdentifier.js +0 -52
  112. package/lib/cjs/hierarchies/HierarchyNodeIdentifier.js.map +0 -1
  113. package/lib/cjs/hierarchies/HierarchyNodeKey.d.ts +0 -162
  114. package/lib/cjs/hierarchies/HierarchyNodeKey.d.ts.map +0 -1
  115. package/lib/cjs/hierarchies/HierarchyNodeKey.js +0 -166
  116. package/lib/cjs/hierarchies/HierarchyNodeKey.js.map +0 -1
  117. package/lib/cjs/hierarchies/HierarchyProvider.d.ts.map +0 -1
  118. package/lib/cjs/hierarchies/HierarchyProvider.js +0 -64
  119. package/lib/cjs/hierarchies/HierarchyProvider.js.map +0 -1
  120. package/lib/cjs/hierarchies/HierarchySearch.d.ts.map +0 -1
  121. package/lib/cjs/hierarchies/HierarchySearch.js +0 -468
  122. package/lib/cjs/hierarchies/HierarchySearch.js.map +0 -1
  123. package/lib/cjs/hierarchies/Logging.d.ts.map +0 -1
  124. package/lib/cjs/hierarchies/Logging.js +0 -27
  125. package/lib/cjs/hierarchies/Logging.js.map +0 -1
  126. package/lib/cjs/hierarchies/imodel/HierarchyCache.d.ts.map +0 -1
  127. package/lib/cjs/hierarchies/imodel/HierarchyCache.js +0 -81
  128. package/lib/cjs/hierarchies/imodel/HierarchyCache.js.map +0 -1
  129. package/lib/cjs/hierarchies/imodel/IModelHierarchyDefinition.d.ts +0 -144
  130. package/lib/cjs/hierarchies/imodel/IModelHierarchyDefinition.d.ts.map +0 -1
  131. package/lib/cjs/hierarchies/imodel/IModelHierarchyDefinition.js +0 -21
  132. package/lib/cjs/hierarchies/imodel/IModelHierarchyDefinition.js.map +0 -1
  133. package/lib/cjs/hierarchies/imodel/IModelHierarchyNode.d.ts +0 -234
  134. package/lib/cjs/hierarchies/imodel/IModelHierarchyNode.d.ts.map +0 -1
  135. package/lib/cjs/hierarchies/imodel/IModelHierarchyNode.js +0 -29
  136. package/lib/cjs/hierarchies/imodel/IModelHierarchyNode.js.map +0 -1
  137. package/lib/cjs/hierarchies/imodel/IModelHierarchyProvider.d.ts.map +0 -1
  138. package/lib/cjs/hierarchies/imodel/IModelHierarchyProvider.js +0 -657
  139. package/lib/cjs/hierarchies/imodel/IModelHierarchyProvider.js.map +0 -1
  140. package/lib/cjs/hierarchies/imodel/LimitingECSqlQueryExecutor.d.ts.map +0 -1
  141. package/lib/cjs/hierarchies/imodel/LimitingECSqlQueryExecutor.js +0 -126
  142. package/lib/cjs/hierarchies/imodel/LimitingECSqlQueryExecutor.js.map +0 -1
  143. package/lib/cjs/hierarchies/imodel/NodeSelectQueryFactory.d.ts +0 -231
  144. package/lib/cjs/hierarchies/imodel/NodeSelectQueryFactory.d.ts.map +0 -1
  145. package/lib/cjs/hierarchies/imodel/NodeSelectQueryFactory.js +0 -629
  146. package/lib/cjs/hierarchies/imodel/NodeSelectQueryFactory.js.map +0 -1
  147. package/lib/cjs/hierarchies/imodel/PredicateBasedHierarchyDefinition.d.ts +0 -140
  148. package/lib/cjs/hierarchies/imodel/PredicateBasedHierarchyDefinition.d.ts.map +0 -1
  149. package/lib/cjs/hierarchies/imodel/PredicateBasedHierarchyDefinition.js +0 -94
  150. package/lib/cjs/hierarchies/imodel/PredicateBasedHierarchyDefinition.js.map +0 -1
  151. package/lib/cjs/hierarchies/imodel/SearchHierarchyDefinition.d.ts.map +0 -1
  152. package/lib/cjs/hierarchies/imodel/SearchHierarchyDefinition.js +0 -268
  153. package/lib/cjs/hierarchies/imodel/SearchHierarchyDefinition.js.map +0 -1
  154. package/lib/cjs/hierarchies/imodel/TreeNodesReader.d.ts +0 -35
  155. package/lib/cjs/hierarchies/imodel/TreeNodesReader.d.ts.map +0 -1
  156. package/lib/cjs/hierarchies/imodel/TreeNodesReader.js +0 -51
  157. package/lib/cjs/hierarchies/imodel/TreeNodesReader.js.map +0 -1
  158. package/lib/cjs/hierarchies/imodel/Utils.d.ts.map +0 -1
  159. package/lib/cjs/hierarchies/imodel/Utils.js +0 -73
  160. package/lib/cjs/hierarchies/imodel/Utils.js.map +0 -1
  161. package/lib/cjs/hierarchies/imodel/operators/DetermineChildren.d.ts.map +0 -1
  162. package/lib/cjs/hierarchies/imodel/operators/DetermineChildren.js +0 -40
  163. package/lib/cjs/hierarchies/imodel/operators/DetermineChildren.js.map +0 -1
  164. package/lib/cjs/hierarchies/imodel/operators/Grouping.d.ts.map +0 -1
  165. package/lib/cjs/hierarchies/imodel/operators/Grouping.js +0 -176
  166. package/lib/cjs/hierarchies/imodel/operators/Grouping.js.map +0 -1
  167. package/lib/cjs/hierarchies/imodel/operators/HideIfNoChildren.d.ts.map +0 -1
  168. package/lib/cjs/hierarchies/imodel/operators/HideIfNoChildren.js +0 -75
  169. package/lib/cjs/hierarchies/imodel/operators/HideIfNoChildren.js.map +0 -1
  170. package/lib/cjs/hierarchies/imodel/operators/HideNodesInHierarchy.d.ts.map +0 -1
  171. package/lib/cjs/hierarchies/imodel/operators/HideNodesInHierarchy.js +0 -84
  172. package/lib/cjs/hierarchies/imodel/operators/HideNodesInHierarchy.js.map +0 -1
  173. package/lib/cjs/hierarchies/imodel/operators/grouping/AutoExpand.d.ts.map +0 -1
  174. package/lib/cjs/hierarchies/imodel/operators/grouping/AutoExpand.js +0 -26
  175. package/lib/cjs/hierarchies/imodel/operators/grouping/AutoExpand.js.map +0 -1
  176. package/lib/cjs/hierarchies/imodel/operators/grouping/BaseClassGrouping.d.ts.map +0 -1
  177. package/lib/cjs/hierarchies/imodel/operators/grouping/BaseClassGrouping.js +0 -113
  178. package/lib/cjs/hierarchies/imodel/operators/grouping/BaseClassGrouping.js.map +0 -1
  179. package/lib/cjs/hierarchies/imodel/operators/grouping/ClassGrouping.d.ts.map +0 -1
  180. package/lib/cjs/hierarchies/imodel/operators/grouping/ClassGrouping.js +0 -54
  181. package/lib/cjs/hierarchies/imodel/operators/grouping/ClassGrouping.js.map +0 -1
  182. package/lib/cjs/hierarchies/imodel/operators/grouping/GroupHiding.d.ts.map +0 -1
  183. package/lib/cjs/hierarchies/imodel/operators/grouping/GroupHiding.js +0 -49
  184. package/lib/cjs/hierarchies/imodel/operators/grouping/GroupHiding.js.map +0 -1
  185. package/lib/cjs/hierarchies/imodel/operators/grouping/LabelGrouping.d.ts.map +0 -1
  186. package/lib/cjs/hierarchies/imodel/operators/grouping/LabelGrouping.js +0 -52
  187. package/lib/cjs/hierarchies/imodel/operators/grouping/LabelGrouping.js.map +0 -1
  188. package/lib/cjs/hierarchies/imodel/operators/grouping/PropertiesGrouping.d.ts.map +0 -1
  189. package/lib/cjs/hierarchies/imodel/operators/grouping/PropertiesGrouping.js +0 -310
  190. package/lib/cjs/hierarchies/imodel/operators/grouping/PropertiesGrouping.js.map +0 -1
  191. package/lib/cjs/hierarchies/imodel/operators/grouping/Shared.d.ts.map +0 -1
  192. package/lib/cjs/hierarchies/imodel/operators/grouping/Shared.js +0 -31
  193. package/lib/cjs/hierarchies/imodel/operators/grouping/Shared.js.map +0 -1
  194. package/lib/cjs/hierarchies/internal/Common.d.ts.map +0 -1
  195. package/lib/cjs/hierarchies/internal/Common.js +0 -91
  196. package/lib/cjs/hierarchies/internal/Common.js.map +0 -1
  197. package/lib/cjs/hierarchies/internal/DisposePolyfill.d.ts +0 -1
  198. package/lib/cjs/hierarchies/internal/DisposePolyfill.d.ts.map +0 -1
  199. package/lib/cjs/hierarchies/internal/DisposePolyfill.js +0 -11
  200. package/lib/cjs/hierarchies/internal/DisposePolyfill.js.map +0 -1
  201. package/lib/cjs/hierarchies/internal/EachValueFrom.d.ts.map +0 -1
  202. package/lib/cjs/hierarchies/internal/EachValueFrom.js +0 -111
  203. package/lib/cjs/hierarchies/internal/EachValueFrom.js.map +0 -1
  204. package/lib/cjs/hierarchies/internal/LoggingUtils.d.ts.map +0 -1
  205. package/lib/cjs/hierarchies/internal/LoggingUtils.js +0 -37
  206. package/lib/cjs/hierarchies/internal/LoggingUtils.js.map +0 -1
  207. package/lib/cjs/hierarchies/internal/RxjsHierarchyDefinition.d.ts.map +0 -1
  208. package/lib/cjs/hierarchies/internal/RxjsHierarchyDefinition.js +0 -28
  209. package/lib/cjs/hierarchies/internal/RxjsHierarchyDefinition.js.map +0 -1
  210. package/lib/cjs/hierarchies/internal/SubscriptionScheduler.d.ts.map +0 -1
  211. package/lib/cjs/hierarchies/internal/SubscriptionScheduler.js +0 -54
  212. package/lib/cjs/hierarchies/internal/SubscriptionScheduler.js.map +0 -1
  213. package/lib/cjs/hierarchies/internal/operators/Partition.d.ts.map +0 -1
  214. package/lib/cjs/hierarchies/internal/operators/Partition.js +0 -60
  215. package/lib/cjs/hierarchies/internal/operators/Partition.js.map +0 -1
  216. package/lib/cjs/hierarchies/internal/operators/ReduceToMergeMap.d.ts.map +0 -1
  217. package/lib/cjs/hierarchies/internal/operators/ReduceToMergeMap.js +0 -50
  218. package/lib/cjs/hierarchies/internal/operators/ReduceToMergeMap.js.map +0 -1
  219. package/lib/cjs/hierarchies/internal/operators/ReleaseMainThread.d.ts.map +0 -1
  220. package/lib/cjs/hierarchies/internal/operators/ReleaseMainThread.js +0 -24
  221. package/lib/cjs/hierarchies/internal/operators/ReleaseMainThread.js.map +0 -1
  222. package/lib/cjs/hierarchies/internal/operators/ShareReplayWithErrors.d.ts.map +0 -1
  223. package/lib/cjs/hierarchies/internal/operators/ShareReplayWithErrors.js +0 -23
  224. package/lib/cjs/hierarchies/internal/operators/ShareReplayWithErrors.js.map +0 -1
  225. package/lib/cjs/hierarchies/internal/operators/Sorting.d.ts.map +0 -1
  226. package/lib/cjs/hierarchies/internal/operators/Sorting.js +0 -25
  227. package/lib/cjs/hierarchies/internal/operators/Sorting.js.map +0 -1
  228. package/lib/cjs/hierarchies/internal/operators/TapOnce.d.ts.map +0 -1
  229. package/lib/cjs/hierarchies/internal/operators/TapOnce.js +0 -19
  230. package/lib/cjs/hierarchies/internal/operators/TapOnce.js.map +0 -1
  231. package/lib/cjs/package.json +0 -1
  232. package/lib/cjs/presentation-hierarchies.d.ts.map +0 -1
  233. package/lib/cjs/presentation-hierarchies.js +0 -40
  234. package/lib/esm/hierarchies/HierarchyErrors.d.ts +0 -9
  235. package/lib/esm/hierarchies/HierarchyErrors.d.ts.map +0 -1
  236. package/lib/esm/hierarchies/HierarchyErrors.js.map +0 -1
  237. package/lib/esm/hierarchies/HierarchyMerge.d.ts +0 -19
  238. package/lib/esm/hierarchies/HierarchyMerge.d.ts.map +0 -1
  239. package/lib/esm/hierarchies/HierarchyMerge.js.map +0 -1
  240. package/lib/esm/hierarchies/HierarchyNode.d.ts +0 -149
  241. package/lib/esm/hierarchies/HierarchyNode.d.ts.map +0 -1
  242. package/lib/esm/hierarchies/HierarchyNode.js.map +0 -1
  243. package/lib/esm/hierarchies/HierarchyNodeIdentifier.d.ts +0 -31
  244. package/lib/esm/hierarchies/HierarchyNodeIdentifier.d.ts.map +0 -1
  245. package/lib/esm/hierarchies/HierarchyNodeIdentifier.js.map +0 -1
  246. package/lib/esm/hierarchies/HierarchyNodeKey.d.ts.map +0 -1
  247. package/lib/esm/hierarchies/HierarchyNodeKey.js.map +0 -1
  248. package/lib/esm/hierarchies/HierarchyProvider.d.ts +0 -134
  249. package/lib/esm/hierarchies/HierarchyProvider.d.ts.map +0 -1
  250. package/lib/esm/hierarchies/HierarchyProvider.js.map +0 -1
  251. package/lib/esm/hierarchies/HierarchySearch.d.ts +0 -297
  252. package/lib/esm/hierarchies/HierarchySearch.d.ts.map +0 -1
  253. package/lib/esm/hierarchies/HierarchySearch.js.map +0 -1
  254. package/lib/esm/hierarchies/Logging.d.ts +0 -13
  255. package/lib/esm/hierarchies/Logging.d.ts.map +0 -1
  256. package/lib/esm/hierarchies/Logging.js.map +0 -1
  257. package/lib/esm/hierarchies/imodel/HierarchyCache.d.ts +0 -18
  258. package/lib/esm/hierarchies/imodel/HierarchyCache.d.ts.map +0 -1
  259. package/lib/esm/hierarchies/imodel/HierarchyCache.js.map +0 -1
  260. package/lib/esm/hierarchies/imodel/IModelHierarchyDefinition.d.ts.map +0 -1
  261. package/lib/esm/hierarchies/imodel/IModelHierarchyDefinition.js.map +0 -1
  262. package/lib/esm/hierarchies/imodel/IModelHierarchyNode.d.ts.map +0 -1
  263. package/lib/esm/hierarchies/imodel/IModelHierarchyNode.js.map +0 -1
  264. package/lib/esm/hierarchies/imodel/IModelHierarchyProvider.d.ts +0 -138
  265. package/lib/esm/hierarchies/imodel/IModelHierarchyProvider.d.ts.map +0 -1
  266. package/lib/esm/hierarchies/imodel/IModelHierarchyProvider.js.map +0 -1
  267. package/lib/esm/hierarchies/imodel/LimitingECSqlQueryExecutor.d.ts +0 -21
  268. package/lib/esm/hierarchies/imodel/LimitingECSqlQueryExecutor.d.ts.map +0 -1
  269. package/lib/esm/hierarchies/imodel/LimitingECSqlQueryExecutor.js.map +0 -1
  270. package/lib/esm/hierarchies/imodel/NodeSelectQueryFactory.d.ts.map +0 -1
  271. package/lib/esm/hierarchies/imodel/NodeSelectQueryFactory.js.map +0 -1
  272. package/lib/esm/hierarchies/imodel/PredicateBasedHierarchyDefinition.d.ts.map +0 -1
  273. package/lib/esm/hierarchies/imodel/PredicateBasedHierarchyDefinition.js.map +0 -1
  274. package/lib/esm/hierarchies/imodel/SearchHierarchyDefinition.d.ts +0 -35
  275. package/lib/esm/hierarchies/imodel/SearchHierarchyDefinition.d.ts.map +0 -1
  276. package/lib/esm/hierarchies/imodel/SearchHierarchyDefinition.js.map +0 -1
  277. package/lib/esm/hierarchies/imodel/TreeNodesReader.d.ts.map +0 -1
  278. package/lib/esm/hierarchies/imodel/TreeNodesReader.js.map +0 -1
  279. package/lib/esm/hierarchies/imodel/Utils.d.ts +0 -5
  280. package/lib/esm/hierarchies/imodel/Utils.d.ts.map +0 -1
  281. package/lib/esm/hierarchies/imodel/Utils.js.map +0 -1
  282. package/lib/esm/hierarchies/imodel/operators/DetermineChildren.d.ts +0 -11
  283. package/lib/esm/hierarchies/imodel/operators/DetermineChildren.d.ts.map +0 -1
  284. package/lib/esm/hierarchies/imodel/operators/DetermineChildren.js.map +0 -1
  285. package/lib/esm/hierarchies/imodel/operators/Grouping.d.ts +0 -26
  286. package/lib/esm/hierarchies/imodel/operators/Grouping.d.ts.map +0 -1
  287. package/lib/esm/hierarchies/imodel/operators/Grouping.js.map +0 -1
  288. package/lib/esm/hierarchies/imodel/operators/HideIfNoChildren.d.ts +0 -11
  289. package/lib/esm/hierarchies/imodel/operators/HideIfNoChildren.d.ts.map +0 -1
  290. package/lib/esm/hierarchies/imodel/operators/HideIfNoChildren.js.map +0 -1
  291. package/lib/esm/hierarchies/imodel/operators/HideNodesInHierarchy.d.ts +0 -11
  292. package/lib/esm/hierarchies/imodel/operators/HideNodesInHierarchy.d.ts.map +0 -1
  293. package/lib/esm/hierarchies/imodel/operators/HideNodesInHierarchy.js.map +0 -1
  294. package/lib/esm/hierarchies/imodel/operators/grouping/AutoExpand.d.ts +0 -4
  295. package/lib/esm/hierarchies/imodel/operators/grouping/AutoExpand.d.ts.map +0 -1
  296. package/lib/esm/hierarchies/imodel/operators/grouping/AutoExpand.js.map +0 -1
  297. package/lib/esm/hierarchies/imodel/operators/grouping/BaseClassGrouping.d.ts +0 -11
  298. package/lib/esm/hierarchies/imodel/operators/grouping/BaseClassGrouping.d.ts.map +0 -1
  299. package/lib/esm/hierarchies/imodel/operators/grouping/BaseClassGrouping.js.map +0 -1
  300. package/lib/esm/hierarchies/imodel/operators/grouping/ClassGrouping.d.ts +0 -7
  301. package/lib/esm/hierarchies/imodel/operators/grouping/ClassGrouping.d.ts.map +0 -1
  302. package/lib/esm/hierarchies/imodel/operators/grouping/ClassGrouping.js.map +0 -1
  303. package/lib/esm/hierarchies/imodel/operators/grouping/GroupHiding.d.ts +0 -4
  304. package/lib/esm/hierarchies/imodel/operators/grouping/GroupHiding.d.ts.map +0 -1
  305. package/lib/esm/hierarchies/imodel/operators/grouping/GroupHiding.js.map +0 -1
  306. package/lib/esm/hierarchies/imodel/operators/grouping/LabelGrouping.d.ts +0 -5
  307. package/lib/esm/hierarchies/imodel/operators/grouping/LabelGrouping.d.ts.map +0 -1
  308. package/lib/esm/hierarchies/imodel/operators/grouping/LabelGrouping.js.map +0 -1
  309. package/lib/esm/hierarchies/imodel/operators/grouping/PropertiesGrouping.d.ts +0 -32
  310. package/lib/esm/hierarchies/imodel/operators/grouping/PropertiesGrouping.d.ts.map +0 -1
  311. package/lib/esm/hierarchies/imodel/operators/grouping/PropertiesGrouping.js.map +0 -1
  312. package/lib/esm/hierarchies/imodel/operators/grouping/Shared.d.ts +0 -5
  313. package/lib/esm/hierarchies/imodel/operators/grouping/Shared.d.ts.map +0 -1
  314. package/lib/esm/hierarchies/imodel/operators/grouping/Shared.js.map +0 -1
  315. package/lib/esm/hierarchies/internal/Common.d.ts +0 -61
  316. package/lib/esm/hierarchies/internal/Common.d.ts.map +0 -1
  317. package/lib/esm/hierarchies/internal/Common.js.map +0 -1
  318. package/lib/esm/hierarchies/internal/DisposePolyfill.d.ts.map +0 -1
  319. package/lib/esm/hierarchies/internal/DisposePolyfill.js.map +0 -1
  320. package/lib/esm/hierarchies/internal/EachValueFrom.d.ts +0 -12
  321. package/lib/esm/hierarchies/internal/EachValueFrom.d.ts.map +0 -1
  322. package/lib/esm/hierarchies/internal/EachValueFrom.js.map +0 -1
  323. package/lib/esm/hierarchies/internal/LoggingUtils.d.ts +0 -12
  324. package/lib/esm/hierarchies/internal/LoggingUtils.d.ts.map +0 -1
  325. package/lib/esm/hierarchies/internal/LoggingUtils.js.map +0 -1
  326. package/lib/esm/hierarchies/internal/RxjsHierarchyDefinition.d.ts +0 -75
  327. package/lib/esm/hierarchies/internal/RxjsHierarchyDefinition.d.ts.map +0 -1
  328. package/lib/esm/hierarchies/internal/RxjsHierarchyDefinition.js.map +0 -1
  329. package/lib/esm/hierarchies/internal/SubscriptionScheduler.d.ts +0 -17
  330. package/lib/esm/hierarchies/internal/SubscriptionScheduler.d.ts.map +0 -1
  331. package/lib/esm/hierarchies/internal/SubscriptionScheduler.js.map +0 -1
  332. package/lib/esm/hierarchies/internal/operators/Partition.d.ts +0 -7
  333. package/lib/esm/hierarchies/internal/operators/Partition.d.ts.map +0 -1
  334. package/lib/esm/hierarchies/internal/operators/Partition.js.map +0 -1
  335. package/lib/esm/hierarchies/internal/operators/ReduceToMergeMap.d.ts +0 -22
  336. package/lib/esm/hierarchies/internal/operators/ReduceToMergeMap.d.ts.map +0 -1
  337. package/lib/esm/hierarchies/internal/operators/ReduceToMergeMap.js.map +0 -1
  338. package/lib/esm/hierarchies/internal/operators/ReleaseMainThread.d.ts +0 -7
  339. package/lib/esm/hierarchies/internal/operators/ReleaseMainThread.d.ts.map +0 -1
  340. package/lib/esm/hierarchies/internal/operators/ReleaseMainThread.js.map +0 -1
  341. package/lib/esm/hierarchies/internal/operators/ShareReplayWithErrors.d.ts +0 -9
  342. package/lib/esm/hierarchies/internal/operators/ShareReplayWithErrors.d.ts.map +0 -1
  343. package/lib/esm/hierarchies/internal/operators/ShareReplayWithErrors.js.map +0 -1
  344. package/lib/esm/hierarchies/internal/operators/Sorting.d.ts +0 -13
  345. package/lib/esm/hierarchies/internal/operators/Sorting.d.ts.map +0 -1
  346. package/lib/esm/hierarchies/internal/operators/Sorting.js.map +0 -1
  347. package/lib/esm/hierarchies/internal/operators/TapOnce.d.ts +0 -4
  348. package/lib/esm/hierarchies/internal/operators/TapOnce.d.ts.map +0 -1
  349. package/lib/esm/hierarchies/internal/operators/TapOnce.js.map +0 -1
  350. package/lib/esm/presentation-hierarchies.d.ts +0 -24
  351. package/lib/esm/presentation-hierarchies.d.ts.map +0 -1
  352. package/lib/esm/presentation-hierarchies.js.map +0 -1
  353. /package/lib/{cjs/hierarchies → hierarchies}/HierarchyErrors.d.ts +0 -0
  354. /package/lib/{esm/hierarchies → hierarchies}/HierarchyErrors.js +0 -0
  355. /package/lib/{cjs/hierarchies → hierarchies}/HierarchyMerge.d.ts +0 -0
  356. /package/lib/{esm/hierarchies → hierarchies}/HierarchyMerge.js +0 -0
  357. /package/lib/{cjs/hierarchies → hierarchies}/HierarchyNode.d.ts +0 -0
  358. /package/lib/{esm/hierarchies → hierarchies}/HierarchyNode.js +0 -0
  359. /package/lib/{cjs/hierarchies → hierarchies}/HierarchyNodeIdentifier.d.ts +0 -0
  360. /package/lib/{esm/hierarchies → hierarchies}/HierarchyNodeIdentifier.js +0 -0
  361. /package/lib/{cjs/hierarchies → hierarchies}/HierarchyProvider.d.ts +0 -0
  362. /package/lib/{esm/hierarchies → hierarchies}/HierarchyProvider.js +0 -0
  363. /package/lib/{cjs/hierarchies → hierarchies}/HierarchySearch.d.ts +0 -0
  364. /package/lib/{esm/hierarchies → hierarchies}/HierarchySearch.js +0 -0
  365. /package/lib/{cjs/hierarchies → hierarchies}/Logging.d.ts +0 -0
  366. /package/lib/{esm/hierarchies → hierarchies}/Logging.js +0 -0
  367. /package/lib/{cjs/hierarchies → hierarchies}/imodel/HierarchyCache.d.ts +0 -0
  368. /package/lib/{esm/hierarchies → hierarchies}/imodel/HierarchyCache.js +0 -0
  369. /package/lib/{esm/hierarchies → hierarchies}/imodel/IModelHierarchyDefinition.js +0 -0
  370. /package/lib/{esm/hierarchies → hierarchies}/imodel/IModelHierarchyNode.js +0 -0
  371. /package/lib/{cjs/hierarchies → hierarchies}/imodel/IModelHierarchyProvider.d.ts +0 -0
  372. /package/lib/{esm/hierarchies → hierarchies}/imodel/IModelHierarchyProvider.js +0 -0
  373. /package/lib/{cjs/hierarchies → hierarchies}/imodel/LimitingECSqlQueryExecutor.d.ts +0 -0
  374. /package/lib/{esm/hierarchies → hierarchies}/imodel/LimitingECSqlQueryExecutor.js +0 -0
  375. /package/lib/{esm/hierarchies → hierarchies}/imodel/PredicateBasedHierarchyDefinition.js +0 -0
  376. /package/lib/{cjs/hierarchies → hierarchies}/imodel/SearchHierarchyDefinition.d.ts +0 -0
  377. /package/lib/{cjs/hierarchies → hierarchies}/imodel/Utils.d.ts +0 -0
  378. /package/lib/{esm/hierarchies → hierarchies}/imodel/Utils.js +0 -0
  379. /package/lib/{cjs/hierarchies → hierarchies}/imodel/operators/DetermineChildren.d.ts +0 -0
  380. /package/lib/{esm/hierarchies → hierarchies}/imodel/operators/DetermineChildren.js +0 -0
  381. /package/lib/{cjs/hierarchies → hierarchies}/imodel/operators/Grouping.d.ts +0 -0
  382. /package/lib/{esm/hierarchies → hierarchies}/imodel/operators/Grouping.js +0 -0
  383. /package/lib/{cjs/hierarchies → hierarchies}/imodel/operators/HideIfNoChildren.d.ts +0 -0
  384. /package/lib/{esm/hierarchies → hierarchies}/imodel/operators/HideIfNoChildren.js +0 -0
  385. /package/lib/{cjs/hierarchies → hierarchies}/imodel/operators/HideNodesInHierarchy.d.ts +0 -0
  386. /package/lib/{esm/hierarchies → hierarchies}/imodel/operators/HideNodesInHierarchy.js +0 -0
  387. /package/lib/{cjs/hierarchies → hierarchies}/imodel/operators/grouping/AutoExpand.d.ts +0 -0
  388. /package/lib/{esm/hierarchies → hierarchies}/imodel/operators/grouping/AutoExpand.js +0 -0
  389. /package/lib/{cjs/hierarchies → hierarchies}/imodel/operators/grouping/BaseClassGrouping.d.ts +0 -0
  390. /package/lib/{cjs/hierarchies → hierarchies}/imodel/operators/grouping/ClassGrouping.d.ts +0 -0
  391. /package/lib/{cjs/hierarchies → hierarchies}/imodel/operators/grouping/GroupHiding.d.ts +0 -0
  392. /package/lib/{esm/hierarchies → hierarchies}/imodel/operators/grouping/GroupHiding.js +0 -0
  393. /package/lib/{cjs/hierarchies → hierarchies}/imodel/operators/grouping/LabelGrouping.d.ts +0 -0
  394. /package/lib/{esm/hierarchies → hierarchies}/imodel/operators/grouping/LabelGrouping.js +0 -0
  395. /package/lib/{cjs/hierarchies → hierarchies}/imodel/operators/grouping/Shared.d.ts +0 -0
  396. /package/lib/{esm/hierarchies → hierarchies}/imodel/operators/grouping/Shared.js +0 -0
  397. /package/lib/{cjs/hierarchies → hierarchies}/internal/Common.d.ts +0 -0
  398. /package/lib/{esm/hierarchies → hierarchies}/internal/Common.js +0 -0
  399. /package/lib/{esm/hierarchies → hierarchies}/internal/DisposePolyfill.d.ts +0 -0
  400. /package/lib/{esm/hierarchies → hierarchies}/internal/DisposePolyfill.js +0 -0
  401. /package/lib/{cjs/hierarchies → hierarchies}/internal/EachValueFrom.d.ts +0 -0
  402. /package/lib/{esm/hierarchies → hierarchies}/internal/EachValueFrom.js +0 -0
  403. /package/lib/{cjs/hierarchies → hierarchies}/internal/LoggingUtils.d.ts +0 -0
  404. /package/lib/{esm/hierarchies → hierarchies}/internal/LoggingUtils.js +0 -0
  405. /package/lib/{cjs/hierarchies → hierarchies}/internal/RxjsHierarchyDefinition.d.ts +0 -0
  406. /package/lib/{esm/hierarchies → hierarchies}/internal/RxjsHierarchyDefinition.js +0 -0
  407. /package/lib/{cjs/hierarchies → hierarchies}/internal/SubscriptionScheduler.d.ts +0 -0
  408. /package/lib/{esm/hierarchies → hierarchies}/internal/SubscriptionScheduler.js +0 -0
  409. /package/lib/{cjs/hierarchies → hierarchies}/internal/operators/Partition.d.ts +0 -0
  410. /package/lib/{esm/hierarchies → hierarchies}/internal/operators/Partition.js +0 -0
  411. /package/lib/{cjs/hierarchies → hierarchies}/internal/operators/ReduceToMergeMap.d.ts +0 -0
  412. /package/lib/{esm/hierarchies → hierarchies}/internal/operators/ReduceToMergeMap.js +0 -0
  413. /package/lib/{cjs/hierarchies → hierarchies}/internal/operators/ReleaseMainThread.d.ts +0 -0
  414. /package/lib/{esm/hierarchies → hierarchies}/internal/operators/ReleaseMainThread.js +0 -0
  415. /package/lib/{cjs/hierarchies → hierarchies}/internal/operators/ShareReplayWithErrors.d.ts +0 -0
  416. /package/lib/{esm/hierarchies → hierarchies}/internal/operators/ShareReplayWithErrors.js +0 -0
  417. /package/lib/{cjs/hierarchies → hierarchies}/internal/operators/Sorting.d.ts +0 -0
  418. /package/lib/{esm/hierarchies → hierarchies}/internal/operators/Sorting.js +0 -0
  419. /package/lib/{cjs/hierarchies → hierarchies}/internal/operators/TapOnce.d.ts +0 -0
  420. /package/lib/{esm/hierarchies → hierarchies}/internal/operators/TapOnce.js +0 -0
  421. /package/lib/{cjs/presentation-hierarchies.d.ts → presentation-hierarchies.d.ts} +0 -0
  422. /package/lib/{esm/presentation-hierarchies.js → presentation-hierarchies.js} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @itwin/presentation-hierarchies
2
2
 
3
+ ## 2.0.0-alpha.17
4
+
5
+ ### Major Changes
6
+
7
+ - [#1454](https://github.com/iTwin/presentation/pull/1454): Dropped CommonJS support. These packages are now published as ES modules (ESM) only.
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies:
12
+ - @itwin/presentation-shared@2.0.0-alpha.12
13
+
3
14
  ## 2.0.0-alpha.16
4
15
 
5
16
  ### Major Changes
@@ -610,6 +621,22 @@
610
621
  - Updated dependencies:
611
622
  - @itwin/presentation-shared@2.0.0-alpha.0
612
623
 
624
+ ## 1.7.18
625
+
626
+ ### Patch Changes
627
+
628
+ - [#1430](https://github.com/iTwin/presentation/pull/1430): Bump dependencies.
629
+ - Updated dependencies:
630
+ - @itwin/presentation-shared@1.2.18
631
+
632
+ ## 1.7.17
633
+
634
+ ### Patch Changes
635
+
636
+ - [#1400](https://github.com/iTwin/presentation/pull/1400): Bump dependencies.
637
+ - Updated dependencies:
638
+ - @itwin/presentation-shared@1.2.17
639
+
613
640
  ## 1.7.16
614
641
 
615
642
  ### Patch Changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HierarchyErrors.d.ts","sourceRoot":"","sources":["../../src/hierarchies/HierarchyErrors.ts"],"names":[],"mappings":"AAKA;;;GAGG;AACH,qBAAa,sBAAuB,SAAQ,KAAK;aACZ,KAAK,EAAE,MAAM;IAAhD,YAAmC,KAAK,EAAE,MAAM,EAE/C;CACF"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HierarchyErrors.js","sourceRoot":"","sources":["../../src/hierarchies/HierarchyErrors.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG;;;GAGG;AACH,MAAM,OAAO,sBAAuB,SAAQ,KAAK;IACZ,KAAK;IAAxC,YAAmC,KAAa;QAC9C,KAAK,CAAC,uBAAuB,KAAK,WAAW,CAAC,CAAC;qBADd,KAAK;IAExC,CAAC;CACF","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\n/**\n * Error that is thrown when rows amount exceed hierarchy level limit.\n * @public\n */\nexport class RowsLimitExceededError extends Error {\n public constructor(public readonly limit: number) {\n super(`Query rows limit of ${limit} exceeded`);\n }\n}\n"]}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HierarchyMerge.d.ts","sourceRoot":"","sources":["../../src/hierarchies/HierarchyMerge.ts"],"names":[],"mappings":"AAKA,OAAO,+BAA+B,CAAC;AASvC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEhE;;;GAGG;AACH,UAAU,4BAA4B;IACpC,kCAAkC;IAClC,SAAS,EAAE,iBAAiB,EAAE,CAAC;CAChC;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,EAC7B,SAAS,GACV,EAAE,4BAA4B,GAAG,iBAAiB,GAAG;IAAE,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,MA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EAAE,OAAO;KAC1B,CAAC;AACJ,CAAC","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 \"./internal/DisposePolyfill.js\";\n\nimport { filter, first, from, map, mergeMap, of } from \"rxjs\";\nimport { BeEvent } from \"@itwin/core-bentley\";\nimport { safeDispose } from \"./internal/Common.js\";\nimport { eachValueFrom } from \"./internal/EachValueFrom.js\";\nimport { sortNodesByLabelOperator } from \"./internal/operators/Sorting.js\";\n\nimport type { EventArgs } from \"@itwin/presentation-shared\";\nimport type { HierarchyProvider } from \"./HierarchyProvider.js\";\n\n/**\n * Props for `mergeProviders` function.\n * @public\n */\ninterface MergeHierarchyProvidersProps {\n /** List of providers to merge. */\n providers: HierarchyProvider[];\n}\n\n/**\n * Creates a single, merged, hierarchy provider from multiple given providers.\n * @public\n */\nexport function mergeProviders({\n providers,\n}: MergeHierarchyProvidersProps): HierarchyProvider & { [Symbol.dispose]: () => void } {\n const hierarchyChanged = new BeEvent<(args: EventArgs<HierarchyProvider[\"hierarchyChanged\"]>) => void>();\n providers.forEach((p) => {\n p.hierarchyChanged.addListener((args) => hierarchyChanged.raiseEvent(args));\n });\n const dispose = () => {\n hierarchyChanged.clear();\n providers.forEach((p) => safeDispose(p));\n };\n\n return {\n hierarchyChanged,\n getNodes: (props) =>\n eachValueFrom(\n from(providers).pipe(\n mergeMap((provider) =>\n from(provider.getNodes(props)).pipe(\n mergeMap((node) => {\n if (node.children) {\n return of(node);\n }\n // each provider only considers its own data when determining node's children - in case it says\n // the node has no children, we have to check against the other providers too\n return from(providers).pipe(\n filter((p) => p !== provider),\n mergeMap((p) => p.getNodes({ parentNode: node })),\n map(() => true),\n first(undefined, false),\n map((hasChildren) => ({ ...node, children: hasChildren })),\n );\n }),\n ),\n ),\n sortNodesByLabelOperator,\n ),\n ),\n getNodeInstanceKeys: (props) => eachValueFrom(from(providers).pipe(mergeMap((p) => p.getNodeInstanceKeys(props)))),\n setFormatter: (formatter) => providers.forEach((p) => p.setFormatter(formatter)),\n setHierarchySearch: (props) => providers.forEach((p) => p.setHierarchySearch(props)),\n [Symbol.dispose]: dispose,\n };\n}\n"]}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HierarchyNode.d.ts","sourceRoot":"","sources":["../../src/hierarchies/HierarchyNode.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,KAAK,EACV,oBAAoB,EACpB,cAAc,EACd,eAAe,EACf,sBAAsB,EACtB,iBAAiB,EACjB,gBAAgB,EAChB,oBAAoB,EACpB,uBAAuB,EACvB,kCAAkC,EAClC,4BAA4B,EAC5B,iCAAiC,EAClC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAEhE,cAAc;AACd,MAAM,WAAW,wBAAwB;IACvC,4FAA4F;IAC5F,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,wDAAwD;IACxD,mBAAmB,CAAC,EAAE,mBAAmB,EAAE,CAAC;IAC5C,mDAAmD;IACnD,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,oDAAoD;IACpD,OAAO,CAAC,EAAE,mBAAmB,CAAC,SAAS,CAAC,CAAC;CAC1C;AAED;;;GAGG;AACH,UAAU,iBAAiB;IACzB,0FAA0F;IAC1F,UAAU,EAAE,gBAAgB,EAAE,CAAC;IAC/B,4BAA4B;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,8DAA8D;IAC9D,QAAQ,EAAE,OAAO,CAAC;IAClB,6EAA6E;IAC7E,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,yDAAyD;IACzD,YAAY,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,G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BAAsB,yBAIrC,CAAA;IAED;;;;OAIG;IACH,SAAgB,oBAAoB,CAAC,YAA+D;QAClG,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,KAAK,IAAI,CAAC,GAAG,YAAY,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;YAC7D,IAAI,gBAAgB,CAAC,UAAU,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;gBAC5D,KAAK,EAAE,CAAC;YACV,CAAC;iBAAM,CAAC;gBACN,MAAM;YACR,CAAC;QACH,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAVe,cAAA,oBAAoB,uBAUnC,CAAA;AACH,CAAC,EAjFgB,aAAa,KAAb,aAAa,QAiF7B","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 { HierarchyNodeKey } from \"./HierarchyNodeKey.js\";\n\nimport type { OmitOverUnion } from \"@itwin/presentation-shared\";\nimport type {\n ClassGroupingNodeKey,\n GenericNodeKey,\n GroupingNodeKey,\n IModelHierarchyNodeKey,\n IModelInstanceKey,\n InstancesNodeKey,\n LabelGroupingNodeKey,\n PropertyGroupingNodeKey,\n PropertyOtherValuesGroupingNodeKey,\n PropertyValueGroupingNodeKey,\n PropertyValueRangeGroupingNodeKey,\n} from \"./HierarchyNodeKey.js\";\nimport type { HierarchySearchTree } from \"./HierarchySearch.js\";\n\n/** @public */\nexport interface HierarchyNodeSearchProps {\n /** If set to true, then one of the ancestor nodes in the hierarchy is the search target. */\n hasSearchTargetAncestor?: boolean;\n /** Paths to node's children that are search targets. */\n childrenTargetPaths?: HierarchySearchTree[];\n /** Whether or not this node is a search target. */\n isSearchTarget?: boolean;\n /** Options assigned to this node through search. */\n options?: HierarchySearchTree[\"options\"];\n}\n\n/**\n * A data structure that defines attributes that are common to all types of hierarchy nodes.\n * @public\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}\n\n/**\n * A data structure that represents a single non-grouping hierarchy node.\n * @public\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 /** Data that is assigned to the node if hierarchy search is enabled */\n search?: HierarchyNodeSearchProps;\n}\n\n/**\n * A data structure that represents a grouping node that groups other nodes.\n * @public\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 * @public\n */\nexport type HierarchyNode = NonGroupingHierarchyNode | GroupingHierarchyNode;\n\n/** @public */\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 }>(\n node: TNode,\n ): 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 }>(\n node: TNode,\n ): 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 }>(\n node: TNode,\n ): 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 }>(\n node: TNode,\n ): 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 & {\n key: PropertyOtherValuesGroupingNodeKey;\n supportsFiltering?: undefined;\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 } & 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 * Gets the grouping level of the given grouping node.\n *\n * May be useful when setting `groupingLevel` for `HierarchySearchTree.options.autoExpand` or `HierarchySearchPathOptions.reveal`.\n */\n export function getGroupingNodeLevel(groupingNode: Pick<GroupingHierarchyNode, \"key\" | \"parentKeys\">): number {\n let level = 1;\n for (let i = groupingNode.parentKeys.length - 1; i >= 0; i--) {\n if (HierarchyNodeKey.isGrouping(groupingNode.parentKeys[i])) {\n level++;\n } else {\n break;\n }\n }\n return level;\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 * @public\n */\nexport type ParentHierarchyNode<TBase = HierarchyNode> = OmitOverUnion<TBase, \"children\">;\n"]}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HierarchyNodeIdentifier.d.ts","sourceRoot":"","sources":["../../src/hierarchies/HierarchyNodeIdentifier.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE/E;;;;;;;;;GASG;AACH,MAAM,MAAM,uBAAuB,GAAG,iBAAiB,GAAG,cAAc,CAAC;AAEzE,cAAc;AAEd,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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AC,uBAAuB,CAAC,GAAG,CAAC,EAAE,CAAC;gBACzD,MAAM,mBAAmB,GAAG,yBAAyB,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;gBAC9E,IAAI,mBAAmB,KAAK,CAAC,EAAE,CAAC;oBAC9B,OAAO,mBAAmB,CAAC;gBAC7B,CAAC;gBACD,OAAO,cAAc,CAAC,GAAG,CAAC,EAAE,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC;YACxC,CAAC;YACD,OAAO,CAAC,CAAC,CAAC;QACZ,CAAC;QACD,IAAI,uBAAuB,CAAC,wBAAwB,CAAC,GAAG,CAAC,EAAE,CAAC;YAC1D,MAAM,sBAAsB,GAAG,yBAAyB,CAAC,GAAG,CAAC,SAAS,EAAE,GAAG,CAAC,SAAS,CAAC,CAAC;YACvF,IAAI,sBAAsB,KAAK,CAAC,EAAE,CAAC;gBACjC,OAAO,sBAAsB,CAAC;YAChC,CAAC;YACD,OAAO,WAAW,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;QACvC,CAAC;QACD,OAAO,CAAC,CAAC;IACX,CAAC;IAnBe,wBAAA,OAAO,UAmBtB,CAAA;AACH,CAAC,EArCgB,uBAAuB,KAAvB,uBAAuB,QAqCvC","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 { compareStrings, compareStringsOrUndefined } from \"@itwin/core-bentley\";\nimport { InstanceKey } from \"@itwin/presentation-shared\";\n\nimport type { GenericNodeKey, IModelInstanceKey } from \"./HierarchyNodeKey.js\";\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 * @public\n */\nexport type HierarchyNodeIdentifier = IModelInstanceKey | GenericNodeKey;\n\n/** @public */\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 return compare(lhs, rhs) === 0;\n }\n\n /** Compares two identifiers */\n export function compare(lhs: HierarchyNodeIdentifier, rhs: HierarchyNodeIdentifier): number {\n if (HierarchyNodeIdentifier.isGenericNodeIdentifier(lhs)) {\n if (HierarchyNodeIdentifier.isGenericNodeIdentifier(rhs)) {\n const sourceCompareResult = compareStringsOrUndefined(lhs.source, rhs.source);\n if (sourceCompareResult !== 0) {\n return sourceCompareResult;\n }\n return compareStrings(lhs.id, rhs.id);\n }\n return -1;\n }\n if (HierarchyNodeIdentifier.isInstanceNodeIdentifier(rhs)) {\n const imodelKeyCompareResult = compareStringsOrUndefined(lhs.imodelKey, rhs.imodelKey);\n if (imodelKeyCompareResult !== 0) {\n return imodelKeyCompareResult;\n }\n return InstanceKey.compare(lhs, rhs);\n }\n return 1;\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 * @public\n */\nexport type HierarchyNodeIdentifiersPath = HierarchyNodeIdentifier[];\n"]}
@@ -46,7 +46,7 @@ export interface ClassGroupingNodeKey {
46
46
  /** Type of the node */
47
47
  type: "class-grouping";
48
48
  /** Full name of the ECClass that this grouping node is grouping by. */
49
- className: EC.FullClassName;
49
+ className: EC.FullClassNameDotNotation;
50
50
  }
51
51
  /**
52
52
  * A key for a label-grouping node.
@@ -73,7 +73,7 @@ export interface PropertyOtherValuesGroupingNodeKey {
73
73
  type: "property-grouping:other";
74
74
  /** Identifiers of properties whose values are grouped under this node. */
75
75
  properties: Array<{
76
- className: EC.FullClassName;
76
+ className: EC.FullClassNameDotNotation;
77
77
  propertyName: string;
78
78
  }>;
79
79
  }
@@ -87,7 +87,7 @@ export interface PropertyValueGroupingNodeKey {
87
87
  /** Name of the property that is used for grouping nodes. */
88
88
  propertyName: string;
89
89
  /** Full name of the ECClass containing the property. */
90
- propertyClassName: EC.FullClassName;
90
+ propertyClassName: EC.FullClassNameDotNotation;
91
91
  /** Formatted property value that this node is grouping by. */
92
92
  formattedPropertyValue: string;
93
93
  }
@@ -101,7 +101,7 @@ export interface PropertyValueRangeGroupingNodeKey {
101
101
  /** Name of the property that is used for grouping nodes. */
102
102
  propertyName: string;
103
103
  /** Full name of the ECClass containing the property. */
104
- propertyClassName: EC.FullClassName;
104
+ propertyClassName: EC.FullClassNameDotNotation;
105
105
  /** Defines the start of the values' range that this node is grouping by. */
106
106
  fromValue: number;
107
107
  /** Defines the end of the values' range that this node is grouping by. */
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HierarchyNodeKey.d.ts","sourceRoot":"","sources":["../../src/hierarchies/HierarchyNodeKey.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAEzD,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,4BAA4B,CAAC;AAErD;;;GAGG;AACH,MAAM,WAAW,iBAAkB,SAAQ,WAAW;IACpD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,uBAAuB;IACvB,IAAI,EAAE,SAAS,CAAC;IAEhB;;;OAGG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,WAAW,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,GAAG,EAAE,gBAAgB,GAAG,GAAG,IAAI,uBAAuB,CAExF;IAED;;;;;OAKG;IACH,SAAgB,OAAO,CAAC,GAAG,EAAE,gBAAgB,EAAE,GAAG,EAAE,gBAAgB,GAAG,MAAM,CA6G5E;IAED,mDAAmD;IACnD,SAAgB,MAAM,CAAC,GAAG,EAAE,gBAAgB,EAAE,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAE5E;CACF"}
@@ -3,7 +3,7 @@
3
3
  * See LICENSE.md in the project root for license terms and full copyright notice.
4
4
  *--------------------------------------------------------------------------------------------*/
5
5
  import { assert, compareStrings, compareStringsOrUndefined } from "@itwin/core-bentley";
6
- import { InstanceKey, normalizeFullClassName } from "@itwin/presentation-shared";
6
+ import { InstanceKey } from "@itwin/presentation-shared";
7
7
  /** @public */
8
8
  // eslint-disable-next-line @typescript-eslint/no-redeclare
9
9
  export var HierarchyNodeKey;
@@ -97,7 +97,7 @@ export var HierarchyNodeKey;
97
97
  }
98
98
  case "class-grouping": {
99
99
  assert(rhs.type === "class-grouping");
100
- return compareStrings(normalizeFullClassName(lhs.className).toLocaleLowerCase(), normalizeFullClassName(rhs.className).toLocaleLowerCase());
100
+ return compareStrings(lhs.className.toLocaleLowerCase(), rhs.className.toLocaleLowerCase());
101
101
  }
102
102
  case "label-grouping": {
103
103
  assert(rhs.type === "label-grouping");
@@ -113,7 +113,7 @@ export var HierarchyNodeKey;
113
113
  return lhs.properties.length - rhs.properties.length;
114
114
  }
115
115
  for (let i = 0; i < lhs.properties.length; ++i) {
116
- const classCompareResult = compareStrings(normalizeFullClassName(lhs.properties[i].className).toLocaleLowerCase(), normalizeFullClassName(rhs.properties[i].className).toLocaleLowerCase());
116
+ const classCompareResult = compareStrings(lhs.properties[i].className.toLocaleLowerCase(), rhs.properties[i].className.toLocaleLowerCase());
117
117
  if (classCompareResult !== 0) {
118
118
  return classCompareResult;
119
119
  }
@@ -126,7 +126,7 @@ export var HierarchyNodeKey;
126
126
  }
127
127
  case "property-grouping:value": {
128
128
  assert(rhs.type === "property-grouping:value");
129
- const propertyClassNameCompareResult = compareStrings(normalizeFullClassName(lhs.propertyClassName).toLocaleLowerCase(), normalizeFullClassName(rhs.propertyClassName).toLocaleLowerCase());
129
+ const propertyClassNameCompareResult = compareStrings(lhs.propertyClassName.toLocaleLowerCase(), rhs.propertyClassName.toLocaleLowerCase());
130
130
  if (propertyClassNameCompareResult !== 0) {
131
131
  return propertyClassNameCompareResult;
132
132
  }
@@ -138,7 +138,7 @@ export var HierarchyNodeKey;
138
138
  }
139
139
  case "property-grouping:range": {
140
140
  assert(rhs.type === "property-grouping:range");
141
- const propertyClassNameCompareResult = compareStrings(normalizeFullClassName(lhs.propertyClassName).toLocaleLowerCase(), normalizeFullClassName(rhs.propertyClassName).toLocaleLowerCase());
141
+ const propertyClassNameCompareResult = compareStrings(lhs.propertyClassName.toLocaleLowerCase(), rhs.propertyClassName.toLocaleLowerCase());
142
142
  if (propertyClassNameCompareResult !== 0) {
143
143
  return propertyClassNameCompareResult;
144
144
  }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HierarchyNodeKey.js","sourceRoot":"","sources":["../../src/hierarchies/HierarchyNodeKey.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AACxF,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AA4JzD,cAAc;AACd,2DAA2D;AAC3D,MAAM,KAAW,gBAAgB,CA4KhC;AA5KD,WAAiB,gBAAgB;IAC/B,+DAA+D;IAC/D,SAAgB,SAAS,CAAC,GAAqB;QAC7C,OAAO,GAAG,CAAC,IAAI,KAAK,SAAS,CAAC;IAChC,CAAC;IAFe,iBAAA,SAAS,YAExB,CAAA;IAED,yEAAyE;IACzE,SAAgB,eAAe,CAAC,GAAqB;QACnD,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;IACzB,CAAC;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mDAAmD;IACnD,SAAgB,MAAM,CAAC,GAAqB,EAAE,GAAqB;QACjE,OAAO,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC;IACjC,CAAC;IAFe,iBAAA,MAAM,SAErB,CAAA;AACH,CAAC,EA5KgB,gBAAgB,KAAhB,gBAAgB,QA4KhC","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 { assert, compareStrings, compareStringsOrUndefined } from \"@itwin/core-bentley\";\nimport { InstanceKey } from \"@itwin/presentation-shared\";\n\nimport type { EC } from \"@itwin/presentation-shared\";\n\n/**\n * An instance key that may be associated with specific iModel.\n * @public\n */\nexport interface IModelInstanceKey extends InstanceKey {\n imodelKey?: string;\n}\n\n/**\n * A key for a generic node.\n * @public\n */\nexport interface GenericNodeKey {\n /** Type of the node */\n type: \"generic\";\n\n /**\n * Node key identifier, which uniquely identifies the node within the hierarchy level the node is used.\n * The format of the identifier is not specified and is up to the data source.\n */\n id: string;\n\n /**\n * Optional data source identifier. Useful when a hierarchy is built using multiple hierarchy providers - in that\n * case each provider can assign a unique source identifier to its nodes.\n */\n source?: string;\n}\n\n/**\n * A key for a node that represents one or more ECInstances.\n * @public\n */\nexport interface InstancesNodeKey {\n /** Type of the node */\n type: \"instances\";\n\n /**\n * Keys of ECInstances that are represented by the node. Generally, one node represents a single\n * ECInstance, but in some cases (e.g. node merging) there could be more.\n */\n instanceKeys: IModelInstanceKey[];\n}\n\n/**\n * A key for a class-grouping node.\n * @public\n */\nexport interface ClassGroupingNodeKey {\n /** Type of the node */\n type: \"class-grouping\";\n\n /** Full name of the ECClass that this grouping node is grouping by. */\n className: EC.FullClassNameDotNotation;\n}\n\n/**\n * A key for a label-grouping node.\n * @public\n */\nexport interface LabelGroupingNodeKey {\n /** Type of the node */\n type: \"label-grouping\";\n\n /** Node label that this grouping node is grouping by. */\n label: string;\n\n /**\n * Optional group identifier that is assigned to the node key when multiple nodes\n * with the same label shouldn't be grouped together.\n */\n groupId?: string;\n}\n\n/**\n * A key property grouping node that groups nodes whose values don't fall into any other\n * property group in the hierarchy level.\n * @public\n */\nexport interface PropertyOtherValuesGroupingNodeKey {\n /** Type of the node */\n type: \"property-grouping:other\";\n /** Identifiers of properties whose values are grouped under this node. */\n properties: Array<{ className: EC.FullClassNameDotNotation; propertyName: string }>;\n}\n\n/**\n * A key for a property grouping node that groups nodes by formatted property value.\n * @public\n */\nexport interface PropertyValueGroupingNodeKey {\n /** Type of the node */\n type: \"property-grouping:value\";\n\n /** Name of the property that is used for grouping nodes. */\n propertyName: string;\n\n /** Full name of the ECClass containing the property. */\n propertyClassName: EC.FullClassNameDotNotation;\n\n /** Formatted property value that this node is grouping by. */\n formattedPropertyValue: string;\n}\n\n/**\n * A key for a property grouping node that groups nodes by a range of property values.\n * @public\n */\nexport interface PropertyValueRangeGroupingNodeKey {\n /** Type of the node */\n type: \"property-grouping:range\";\n\n /** Name of the property that is used for grouping nodes. */\n propertyName: string;\n\n /** Full name of the ECClass containing the property. */\n propertyClassName: EC.FullClassNameDotNotation;\n\n /** Defines the start of the values' range that this node is grouping by. */\n fromValue: number;\n\n /** Defines the end of the values' range that this node is grouping by. */\n toValue: number;\n}\n\n/**\n * A key for a property grouping node.\n * @public\n */\nexport type PropertyGroupingNodeKey =\n | PropertyValueRangeGroupingNodeKey\n | PropertyValueGroupingNodeKey\n | PropertyOtherValuesGroupingNodeKey;\n\n/**\n * A key for one of the instance grouping nodes.\n * @public\n */\nexport type GroupingNodeKey = ClassGroupingNodeKey | LabelGroupingNodeKey | PropertyGroupingNodeKey;\n\n/**\n * A key for either an instance node or one of the instance grouping nodes.\n * @public\n */\nexport type IModelHierarchyNodeKey = InstancesNodeKey | GroupingNodeKey;\n\n/**\n * A key that uniquely identifies a node in a hierarchy level.\n * @public\n */\nexport type HierarchyNodeKey = IModelHierarchyNodeKey | GenericNodeKey;\n\n/** @public */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport namespace HierarchyNodeKey {\n /** Checks whether the given node key is a generic node key. */\n export function isGeneric(key: HierarchyNodeKey): key is GenericNodeKey {\n return key.type === \"generic\";\n }\n\n /** Checks whether the given node key is a `StandardHierarchyNodeKey`. */\n export function isIModelNodeKey(key: HierarchyNodeKey): key is IModelHierarchyNodeKey {\n return !isGeneric(key);\n }\n\n /** Checks whether the given node key is an `InstancesNodeKey`. */\n export function isInstances(key: HierarchyNodeKey): key is InstancesNodeKey {\n return key.type === \"instances\";\n }\n\n /** Checks whether the given node key is a `GroupingNodeKey`. */\n export function isGrouping(key: HierarchyNodeKey): key is GroupingNodeKey {\n return !isGeneric(key) && !isInstances(key);\n }\n\n /** Checks whether the given node key is a `ClassGroupingNodeKey`. */\n export function isClassGrouping(key: HierarchyNodeKey): key is ClassGroupingNodeKey {\n return key.type === \"class-grouping\";\n }\n\n /** Checks whether the given node key is a `LabelGroupingNodeKey`. */\n export function isLabelGrouping(key: HierarchyNodeKey): key is LabelGroupingNodeKey {\n return key.type === \"label-grouping\";\n }\n\n /** Checks whether the given node key is a `PropertyOtherValuesGroupingNodeKey`. */\n export function isPropertyOtherValuesGrouping(key: HierarchyNodeKey): key is PropertyOtherValuesGroupingNodeKey {\n return key.type === \"property-grouping:other\";\n }\n\n /** Checks whether the given node key is a `PropertyValueRangeGroupingNodeKey`. */\n export function isPropertyValueRangeGrouping(key: HierarchyNodeKey): key is PropertyValueRangeGroupingNodeKey {\n return key.type === \"property-grouping:range\";\n }\n\n /** Checks whether the given node key is a `PropertyValueGroupingNodeKey`. */\n export function isPropertyValueGrouping(key: HierarchyNodeKey): key is PropertyValueGroupingNodeKey {\n return key.type === \"property-grouping:value\";\n }\n\n /** Checks whether the given node key is a `PropertyGroupingNodeKey`. */\n export function isPropertyGrouping(key: HierarchyNodeKey): key is PropertyGroupingNodeKey {\n return isPropertyOtherValuesGrouping(key) || isPropertyValueRangeGrouping(key) || isPropertyValueGrouping(key);\n }\n\n /**\n * Compares two given keys. Returns:\n * - `0` if they are equal,\n * - `negative value` if lhs key is less than rhs key,\n * - `positive value` if lhs key is more than rhs key.\n */\n export function compare(lhs: HierarchyNodeKey, rhs: HierarchyNodeKey): number {\n const typeCompareResult = compareStrings(lhs.type, rhs.type);\n if (typeCompareResult !== 0) {\n return typeCompareResult;\n }\n switch (lhs.type) {\n case \"generic\": {\n assert(rhs.type === \"generic\");\n const idCompareResult = compareStrings(lhs.id, rhs.id);\n if (idCompareResult !== 0) {\n return idCompareResult;\n }\n return compareStringsOrUndefined(lhs.source, rhs.source);\n }\n case \"instances\": {\n assert(rhs.type === \"instances\");\n if (lhs.instanceKeys.length !== rhs.instanceKeys.length) {\n return lhs.instanceKeys.length > rhs.instanceKeys.length ? 1 : -1;\n }\n for (let i = 0; i < lhs.instanceKeys.length; ++i) {\n const instanceKeyCompareResult = InstanceKey.compare(lhs.instanceKeys[i], rhs.instanceKeys[i]);\n if (instanceKeyCompareResult !== 0) {\n return instanceKeyCompareResult;\n }\n const imodelKeyCompareResult = compareStringsOrUndefined(\n lhs.instanceKeys[i].imodelKey,\n rhs.instanceKeys[i].imodelKey,\n );\n if (imodelKeyCompareResult !== 0) {\n return imodelKeyCompareResult;\n }\n }\n return 0;\n }\n case \"class-grouping\": {\n assert(rhs.type === \"class-grouping\");\n return compareStrings(lhs.className.toLocaleLowerCase(), rhs.className.toLocaleLowerCase());\n }\n case \"label-grouping\": {\n assert(rhs.type === \"label-grouping\");\n const labelCompareResult = compareStrings(lhs.label, rhs.label);\n if (labelCompareResult !== 0) {\n return labelCompareResult;\n }\n return compareStringsOrUndefined(lhs.groupId, rhs.groupId);\n }\n case \"property-grouping:other\": {\n assert(rhs.type === \"property-grouping:other\");\n if (lhs.properties.length !== rhs.properties.length) {\n return lhs.properties.length - rhs.properties.length;\n }\n for (let i = 0; i < lhs.properties.length; ++i) {\n const classCompareResult = compareStrings(\n lhs.properties[i].className.toLocaleLowerCase(),\n rhs.properties[i].className.toLocaleLowerCase(),\n );\n if (classCompareResult !== 0) {\n return classCompareResult;\n }\n const nameCompareResult = compareStrings(\n lhs.properties[i].propertyName.toLocaleLowerCase(),\n rhs.properties[i].propertyName.toLocaleLowerCase(),\n );\n if (nameCompareResult !== 0) {\n return nameCompareResult;\n }\n }\n return 0;\n }\n case \"property-grouping:value\": {\n assert(rhs.type === \"property-grouping:value\");\n const propertyClassNameCompareResult = compareStrings(\n lhs.propertyClassName.toLocaleLowerCase(),\n rhs.propertyClassName.toLocaleLowerCase(),\n );\n if (propertyClassNameCompareResult !== 0) {\n return propertyClassNameCompareResult;\n }\n const propertyNameCompareResult = compareStrings(\n lhs.propertyName.toLocaleLowerCase(),\n rhs.propertyName.toLocaleLowerCase(),\n );\n if (propertyNameCompareResult !== 0) {\n return propertyNameCompareResult;\n }\n return compareStrings(lhs.formattedPropertyValue, rhs.formattedPropertyValue);\n }\n case \"property-grouping:range\": {\n assert(rhs.type === \"property-grouping:range\");\n const propertyClassNameCompareResult = compareStrings(\n lhs.propertyClassName.toLocaleLowerCase(),\n rhs.propertyClassName.toLocaleLowerCase(),\n );\n if (propertyClassNameCompareResult !== 0) {\n return propertyClassNameCompareResult;\n }\n const propertyNameCompareResult = compareStrings(\n lhs.propertyName.toLocaleLowerCase(),\n rhs.propertyName.toLocaleLowerCase(),\n );\n if (propertyNameCompareResult !== 0) {\n return propertyNameCompareResult;\n }\n if (lhs.fromValue !== rhs.fromValue) {\n return lhs.fromValue > rhs.fromValue ? 1 : -1;\n }\n return lhs.toValue > rhs.toValue ? 1 : lhs.toValue < rhs.toValue ? -1 : 0;\n }\n }\n }\n\n /** Checks whether the two given keys are equal. */\n export function equals(lhs: HierarchyNodeKey, rhs: HierarchyNodeKey): boolean {\n return compare(lhs, rhs) === 0;\n }\n}\n"]}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HierarchyProvider.d.ts","sourceRoot":"","sources":["../../src/hierarchies/HierarchyPro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AK,CAAC,CAAC,mBAAmB,KAAI,CAAC,EAAE,CAAC;QAC7D,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,oBAAoB,CAAC,EAAE,YAAY,KAAI,CAAC,EAAE,CAAC;QACzG,GAAG,CAAC,IAAI,CAAC,kBAAkB;YACzB,CAAC,CAAC,EAAE,kBAAkB,EAAE,IAAI,CAAC,kBAAkB,EAAE;YACjD,CAAC,CAAC,oBAAoB,CAAC,EAAE,kBAAkB,KAAI,CAAC,EAAE,CAAC;KACtD,CAAC,CAAC;AACL,CAAC","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 { BeEvent } from \"@itwin/core-bentley\";\n\nimport type { GenericInstanceFilter } from \"@itwin/core-common\";\nimport type {\n Event,\n EventListener,\n InstanceKey,\n IPrimitiveValueFormatter,\n Props,\n RaisableEvent,\n} from \"@itwin/presentation-shared\";\nimport type { HierarchyNode, ParentHierarchyNode } from \"./HierarchyNode.js\";\nimport type { HierarchySearchTree } from \"./HierarchySearch.js\";\n\n/**\n * Props for the `HierarchyProvider.getNodes` call.\n * @public\n */\nexport interface GetHierarchyNodesProps {\n /** Parent node to get children for. Pass `undefined` to get root nodes. */\n parentNode: ParentHierarchyNode | undefined;\n\n /** Optional hierarchy level filter. Has no effect if `parentNode` is a `GroupingNode`. */\n instanceFilter?: GenericInstanceFilter;\n\n /**\n * Optional hierarchy level size limit override. This value is passed to `LimitingECSqlQueryExecutor` used\n * by this provider to override query rows limit per hierarchy level. If not provided, defaults to whatever\n * is used by the limiting query executor.\n *\n * Has no effect if `parentNode` is a `GroupingNode`.\n */\n hierarchyLevelSizeLimit?: number | \"unbounded\";\n\n /** When set to `true` ignores the cache and fetches the nodes again. */\n ignoreCache?: boolean;\n}\n\n/**\n * Event arguments for `HierarchyProvider.hierarchyChanged` event.\n * @public\n */\ninterface HierarchyChangedEventArgs {\n /** Set when the hierarchy change was caused by a formatter change. */\n formatterChange?: { newFormatter: IPrimitiveValueFormatter | undefined };\n\n /** Set when the hierarchy change was caused by a hierarchy search change. */\n searchChange?: { newSearch: Props<HierarchyProvider[\"setHierarchySearch\"]> };\n}\n\n/**\n * An interface for a hierarchy provider that knows how to create child nodes for a given parent node.\n * @public\n */\nexport interface HierarchyProvider {\n /**\n * An event that provider raises due to a hierarchy change that requires a reload.\n *\n * Consumers are expected to subscribe to this event and reload the hierarchy when it's raised.\n * Implementations may provide additional details on what caused the change through the\n * event arguments.\n */\n readonly hierarchyChanged: Event<(args: HierarchyChangedEventArgs) => void>;\n\n /**\n * Gets nodes for the specified parent node. This is **the method to implement**, otherwise\n * the provider doesn't return any nodes.\n */\n getNodes(props: GetHierarchyNodesProps): AsyncIterableIterator<HierarchyNode>;\n\n /**\n * Gets instance keys for the specified parent node.\n *\n * The result of this method may be used to determine instances whose nodes would be displayed as children\n * of the specified parent node. For such use cases calling this method should be more efficient compared\n * to calling `getNodes`.\n */\n getNodeInstanceKeys(props: Omit<GetHierarchyNodesProps, \"ignoreCache\">): AsyncIterableIterator<InstanceKey>;\n\n /**\n * Overrides the property value formatter used by the hierarchy provider. Setting to `undefined`\n * resets the formatter, but what that means depends on the provider implementation - it could just\n * use unformatted values, or use some default formatter, e.g. the on created by `createDefaultValueFormatter`\n * from `@itwin/presentation-shared` package.\n *\n * @note Changing formatter is expected to trigger the `hierarchyChanged` event with `formatterChange` arg.\n */\n setFormatter(formatter: IPrimitiveValueFormatter | undefined): void;\n\n /**\n * Sets the hierarchy search used by this hierarchy provider. Setting to `undefined`\n * removes the search.\n *\n * @note There's a difference between `undefined` search and search with empty paths list. The\n * former means no search is applied, while the latter means the search is applied and it filters-out\n * all hierarchy.\n *\n * @note Changing search is expected to trigger the `hierarchyChanged` event with `searchChange` arg.\n */\n setHierarchySearch(\n props:\n | {\n /** A list of search trees that define paths from root to search target nodes. */\n paths: HierarchySearchTree[];\n }\n | undefined,\n ): void;\n}\n\n/**\n * An utility to create a `HierarchyProvider` from a partial implementation.\n *\n * Creating a `HierarchyProvider` directly requires implementing all its methods:\n * ```ts\n * {\n * hierarchyChanged: new BeEvent(),\n * async *getNodes({ parentNode }) {\n * // yield nodes...\n * },\n * async *getNodeInstanceKeys() {},\n * setFormatter() {},\n * setHierarchySearch() {},\n * }\n * ```\n *\n * However, in many cases you may only need to implement the `getNodes` method and\n * can rely on default implementations for other methods.\n *\n * With this utility you can implement only part of it, e.g. just the `getNodes` method:\n * ```ts\n * // provide implementation as a javascript object\n * createHierarchyProvider(({ hierarchyChanged }) => ({\n * async *getNodes({ parentNode }) {\n * // yield nodes...\n * },\n * }));\n *\n * // or, provide implementation as a class instance:\n * createHierarchyProvider(\n * ({ hierarchyChanged }) =>\n * new (class implements Pick<HierarchyProvider, \"getNodes\"> {\n * public async *getNodes({ parentNode }): ReturnType<HierarchyProvider[\"getNodes\"]> {\n * // yield nodes...\n * }\n * })(),\n * );\n * ```\n *\n * @public\n */\nexport function createHierarchyProvider<\n TPartialProvider extends Partial<Omit<HierarchyProvider, \"hierarchyChanged\">> & Pick<HierarchyProvider, \"getNodes\">,\n>(\n partialFactory: (props: {\n hierarchyChanged: RaisableEvent<EventListener<HierarchyProvider[\"hierarchyChanged\"]>>;\n }) => TPartialProvider,\n): TPartialProvider & HierarchyProvider {\n const hierarchyChanged: Props<typeof partialFactory>[\"hierarchyChanged\"] = new BeEvent();\n const impl = partialFactory({ hierarchyChanged });\n return Object.assign(impl, {\n hierarchyChanged,\n ...(impl.getNodeInstanceKeys\n ? { getNodeInstanceKeys: impl.getNodeInstanceKeys }\n : /* v8 ignore next */ { async *getNodeInstanceKeys() {} }),\n ...(impl.setFormatter ? { setFormatter: impl.setFormatter } : /* v8 ignore next */ { setFormatter() {} }),\n ...(impl.setHierarchySearch\n ? { setHierarchySearch: impl.setHierarchySearch }\n : /* v8 ignore next */ { setHierarchySearch() {} }),\n });\n}\n"]}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HierarchySearch.d.ts","sourceRoot":"","sources":["../../src/hierarchies/HierarchySearch.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAIvE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,8BAA8B,CAAC;AACjF,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9E,cAAc;AACd,MAAM,WAAW,0BAA0B;IACzC;;;;;;OAMG;IACH,MAAM,CAAC,EACH,OAAO,GACP;QACE;;;;;;;;;;;;;;;;;WAiBG;QACH,WAAW,EAAE,MAAM,CAAC;KACrB,GACD;QACE;;;;;;WAMG;QACH,aAAa,EAAE,MAAM,CAAC;KACvB,CAAC;IACN;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAC3B,4BAA4B,GAC5B;IAAE,IAAI,EAAE,4BAA4B,CAAC;IAAC,OAAO,CAAC,EAAE,0BAA0B,CAAA;CAAE,CAAC;AACjF,cAAc;AAEd,yBAAiB,mBAAmB,CAAC;IACnC;;;OAGG;IACH,SAAgB,SAAS,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC,mBAAmB,EAAE,4BAA4B,CAAC,CAKjH;IAED;;;;;;;;;;;;OAYG;IACH,SAAgB,YAAY,CAC1B,GAAG,EAAE,0BAA0B,GAAG,SAAS,EAC3C,GAAG,EAAE,0BAA0B,GAAG,SAAS,GAC1C,0BAA0B,GAAG,SAAS,CASxC;CA8BF;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,mBAAmB;IAClC,mEAAmE;IACnE,UAAU,EAAE,uBAAuB,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gBAClF,GAAG,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;gBAChE,GAAG,CAAC,IAAI,CAAC,oBAAoB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,mBAAmB,EAAE,IAAI,CAAC,oBAAoB,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;gBAC1G,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;aAC5D;YACH,CAAC,CAAC,SAAS,CAAC;QAChB,MAAM,UAAU,GAAG,IAAI,CAAC,QAAQ,EAAE,UAAU,KAAK,IAAI,CAAC;QACtD,OAAO,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE,CAAC;IAChG,CAAC;CACF","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 { firstValueFrom, from, map, reduce } from \"rxjs\";\nimport { Dictionary } from \"@itwin/core-bentley\";\nimport { HierarchyNodeIdentifier } from \"./HierarchyNodeIdentifier.js\";\nimport { HierarchyNodeKey } from \"./HierarchyNodeKey.js\";\nimport { releaseMainThreadOnItemsCount } from \"./internal/operators/ReleaseMainThread.js\";\n\nimport type { NonGroupingHierarchyNode } from \"./HierarchyNode.js\";\nimport type { HierarchyNodeIdentifiersPath } from \"./HierarchyNodeIdentifier.js\";\nimport type { GenericNodeKey, InstancesNodeKey } from \"./HierarchyNodeKey.js\";\n\n/** @public */\nexport interface HierarchySearchPathOptions {\n /**\n * This option specifies the way `autoExpand` flag should be assigned to nodes in the searched hierarchy.\n * - If it's `false` or `undefined`, nodes have no 'autoExpand' flag.\n * - If it's `true`, then all nodes up to the search target will have `autoExpand` flag.\n * - If it's a object with `groupingLevel` then `groupingLevel` determines the number of grouping levels to expand for\n * the search target.\n */\n reveal?:\n | boolean\n | {\n /**\n * Index of the node in search path should be revealed in hierarchy by auto-expanding its ancestors.\n *\n * Use when you want to expand up to specific instance node and don't care about grouping nodes.\n *\n * **Use case example:**\n *\n * All nodes up to `Element1` should be expanded in the following hierarchy:\n * - Node1\n * - GroupingNode1\n * - GroupingNode2\n * - Element1\n * - Element2\n *\n * Provide `{ path: [Node1, Element1], reveal: { depthInPath: 1 } }`\n *\n * **NOTE**: All nodes that are up to `depthInPath` will be expanded **except** search targets.\n */\n depthInPath: number;\n }\n | {\n /**\n * The number of grouping levels to expand for the search target. For example, if `groupingLevel` is set to `2`, then all grouping nodes up to the second level\n * will have the `autoExpand` flag.\n *\n * **Note:** if search target has less grouping levels than specified by this attribute, then all grouping nodes up to the search target will have\n * the `autoExpand` flag, but the search target itself won't have the `autoExpand` flag.\n */\n groupingLevel: number;\n };\n /**\n * This option specifies whether or not search target should be expanded.\n * - If it's `false` or `undefined`, search target won't have 'autoExpand' flag.\n * - If it's `true`, search target will have `autoExpand` flag.\n *\n * **Note:** this attribute does not set `autoExpand` flag on nodes up to the search target. For that use `reveal`.\n */\n autoExpand?: boolean;\n}\n\n/**\n * A path of hierarchy node identifiers for search the hierarchy with additional options.\n * @public\n */\nexport type HierarchySearchPath =\n | HierarchyNodeIdentifiersPath\n | { path: HierarchyNodeIdentifiersPath; options?: HierarchySearchPathOptions };\n/** @public */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport namespace HierarchySearchPath {\n /**\n * Normalizes the hierarchy search path to the object form.\n * @public\n */\n export function normalize(source: HierarchySearchPath): Exclude<HierarchySearchPath, HierarchyNodeIdentifiersPath> {\n if (Array.isArray(source)) {\n return { path: source };\n }\n return source;\n }\n\n /**\n * Merges two given `HierarchySearchPathOptions` objects.\n *\n * For the `reveal` attribute, the merge chooses to `reveal` as deep as the deepest input:\n * - if any one of the inputs is `true`, return `true`,\n * - else if only one of the inputs is an object, return it,\n * - else if both inputs are falsy, return `false` or `undefined`,\n * - else:\n * - if only one of the inputs has `groupingLevel` set, return that one,\n * - else compare by matching reveal type (`groupingLevel` or `depthInPath`) and return the deeper one.\n *\n * @public\n */\n export function mergeOptions(\n lhs: HierarchySearchPathOptions | undefined,\n rhs: HierarchySearchPathOptions | undefined,\n ): HierarchySearchPathOptions | undefined {\n const reveal = mergeRevealOptions(lhs?.reveal, rhs?.reveal);\n const autoExpand = mergeAutoExpandOption(lhs?.autoExpand, rhs?.autoExpand);\n return reveal || autoExpand\n ? {\n ...(reveal !== undefined ? { reveal } : undefined),\n ...(autoExpand !== undefined ? { autoExpand } : undefined),\n }\n : undefined;\n }\n function mergeRevealOptions(\n lhs: HierarchySearchPathOptions[\"reveal\"],\n rhs: HierarchySearchPathOptions[\"reveal\"],\n ): HierarchySearchPathOptions[\"reveal\"] {\n if (rhs === true || lhs === true) {\n return true;\n }\n if (!rhs || !lhs) {\n return !!rhs ? rhs : lhs;\n }\n\n if (\"groupingLevel\" in lhs) {\n if (\"groupingLevel\" in rhs) {\n return lhs.groupingLevel > rhs.groupingLevel ? lhs : rhs;\n }\n return lhs;\n } else if (\"groupingLevel\" in rhs) {\n return rhs;\n }\n\n return lhs.depthInPath > rhs.depthInPath ? lhs : rhs;\n }\n\n function mergeAutoExpandOption(\n lhs: HierarchySearchPathOptions[\"autoExpand\"],\n rhs: HierarchySearchPathOptions[\"autoExpand\"],\n ): HierarchySearchPathOptions[\"autoExpand\"] {\n return lhs || rhs ? true : undefined;\n }\n}\n\n/**\n * A tree structure representing hierarchy search paths. Each node in the tree corresponds\n * to a hierarchy node identifier and may have children that represent deeper levels in the\n * hierarchy.\n *\n * The `HierarchySearchTree.createBuilder` or `HierarchySearchTree.createFromPathsList` are\n * typically used create this tree from a flat list of search paths.\n *\n * @public\n */\nexport interface HierarchySearchTree {\n /** Identifier of the hierarchy node this tree entry represents. */\n identifier: HierarchyNodeIdentifier;\n\n /**\n * When `true`, indicates that this node is a search target.\n *\n * Note: A `HierarchySearchTree` node is considered a search target if it has no children, even if `isTarget` is not explicitly set to `true`. This\n * is because a node with no children represents the end of a search path.\n */\n isTarget?: boolean;\n\n /** Provides options for handling this search tree entry, such as auto-expansion behavior. */\n options?: {\n /**\n * - `true` to expand the node and its grouping nodes,\n * - `{ groupingLevel: number }` to expand ancestor grouping nodes, e.g. for the following hierarchy:\n * ```\n * - Grouping node A\n * - Instance node A\n * - Grouping node B1\n * - Grouping node B2\n * - ...\n * - Grouping node Bn\n * - Instance node B\n * ```\n *\n * For \"Instance node B\" search tree entry:\n * - `{ groupingLevel: 1 }` expands its first grouping node \"Grouping node B1\",\n * - `{ groupingLevel: 2 }` expands two levels to \"Grouping node B2\".\n * - `{ groupingLevel: Number.MAX_SAFE_INTEGER }` expands all grouping nodes of that instance node.\n *\n * Note that there's a slight difference between `HierarchySearchTree.options.autoExpand` and\n * `HierarchySearchPath.options.reveal`. The latter option reveals the search target node by expanding its ancestors,\n * while the `HierarchySearchTree.options.autoExpand` also expands the target node itself.\n */\n autoExpand?: boolean | { groupingLevel: number };\n };\n\n /** Child search tree entries representing the next level(s) in the hierarchy search paths. */\n children?: HierarchySearchTree[];\n}\n\n/** @public */\nexport namespace HierarchySearchTree {\n /** @public */\n type HierarchySearchTreeBuilderAcceptHandlerTreeEntry<TExtras extends Record<string, unknown>> = Readonly<\n Pick<HierarchySearchTree, \"identifier\" | \"options\"> & { extras: TExtras }\n > &\n Pick<HierarchySearchTree, \"isTarget\">;\n /** @public */\n type HierarchySearchTreeBuilderAcceptHandlerTreeInput = Readonly<\n Pick<HierarchySearchTree, \"identifier\" | \"isTarget\" | \"options\"> & { hasChildren: boolean }\n >;\n /** @public */\n interface HierarchySearchTreeBuilderAcceptHandler<TExtras extends Record<string, unknown>> {\n /**\n * Called when a new entry is added to the tree. Return `true` to accept the entry, `false` to reject it and all its children, if any.\n */\n onNewEntry?: (props: {\n /** The parent entries of the new entry being added, from root to immediate parent. It's allowed to mutate these entries. */\n parentEntries: Array<HierarchySearchTreeBuilderAcceptHandlerTreeEntry<TExtras>>;\n /** The new entry being added to the tree. */\n inputEntry: HierarchySearchTreeBuilderAcceptHandlerTreeInput;\n }) => boolean;\n /**\n * Called when a new entry is added to the tree and accepted (either it's a new entry or it merges with an existing entry). This can be used to perform\n * side effects such as assigning extra information to the tree entry.\n */\n onEntryHandled?: (props: {\n /** The parent entries of the new entry being added, from root to immediate parent. It's allowed to mutate these entries. */\n parentEntries: Array<HierarchySearchTreeBuilderAcceptHandlerTreeEntry<TExtras>>;\n /** The tree entry that has been handled. It's allowed to mutate this entry. */\n treeEntry: HierarchySearchTreeBuilderAcceptHandlerTreeEntry<TExtras>;\n /** The input entry being added to the tree. */\n inputEntry: HierarchySearchTreeBuilderAcceptHandlerTreeInput;\n }) => void;\n }\n /**\n * Props supplied to HierarchySearchTreeBuilder.accept() method for accepting a hierarchy search path or tree with an optional handler for customizing\n * the behavior of the builder when accepting new entries.\n * @public\n */\n type HierarchySearchTreeBuilderAcceptProps<TAcceptHandlerExtras extends Record<string, unknown>> = (\n | { path: HierarchySearchPath }\n | { tree: HierarchySearchTree }\n ) & {\n /** An optional handler for customizing the behavior of the builder when accepting new entries. */\n handler?: HierarchySearchTreeBuilderAcceptHandler<TAcceptHandlerExtras>;\n };\n /**\n * Props supplied to HierarchySearchTreeBuilder.getTree() method for customizing the resulting tree entries, e.g. by omitting some of them or\n * assigning extra information to them.\n * @public\n */\n interface HierarchySearchTreeBuilderFinalizeTreeProps<TAcceptHandlerExtras extends Record<string, unknown>> {\n /**\n * A function that can be used to process each tree entry before it's added to the final tree.\n *\n * Return `undefined` to omit the entry and its entire branch from the resulting tree.\n */\n processEntry?: (props: {\n treeEntry: HierarchySearchTreeBuilderAcceptHandlerTreeEntry<TAcceptHandlerExtras>;\n parentEntries: Array<HierarchySearchTreeBuilderAcceptHandlerTreeEntry<TAcceptHandlerExtras>>;\n }) => (Omit<HierarchySearchTree, \"children\"> & { extras: TAcceptHandlerExtras }) | undefined;\n }\n /**\n * An utility that accepts hierarchy search paths or search trees one by one and builds a `HierarchySearchTree` structure based on them.\n * @public\n */\n interface HierarchySearchTreeBuilder<TAcceptHandlerExtras extends Record<string, unknown>> {\n /**\n * Accepts a hierarchy search path or paths' tree and adds it to the builder's internal tree structure. Use `getTree()` to create\n * a `HierarchySearchTree[]` from the added paths.\n */\n accept(\n props: HierarchySearchTreeBuilderAcceptProps<TAcceptHandlerExtras>,\n ): HierarchySearchTreeBuilder<TAcceptHandlerExtras>;\n /**\n * Create `HierarchySearchTree[]` from currently added search paths.\n */\n getTree(props?: HierarchySearchTreeBuilderFinalizeTreeProps<TAcceptHandlerExtras>): HierarchySearchTree[];\n }\n\n /**\n * Create a `HierarchySearchTree` builder utility that accepts hierarchy search paths or search trees one by one and builds\n * a `HierarchySearchTree` structure based on them.\n *\n * Usage example:\n *\n * ```ts\n * const builder = HierarchySearchTree.createBuilder();\n * for (const path of searchPaths) {\n * builder.accept({ path });\n * }\n * const searchTree = builder.getTree();\n * ```\n *\n * @public\n */\n export function createBuilder<\n TAcceptHandlerExtras extends Record<string, unknown> = Record<string, unknown>,\n >(): HierarchySearchTreeBuilder<TAcceptHandlerExtras> {\n type HierarchySearchTreeDictionaryEntry = Omit<HierarchySearchTree, \"children\"> & {\n children?: HierarchySearchTreeDictionary;\n extras: TAcceptHandlerExtras;\n };\n type HierarchySearchTreeDictionary = Dictionary<HierarchyNodeIdentifier, HierarchySearchTreeDictionaryEntry>;\n type AcceptHandler = HierarchySearchTreeBuilderAcceptHandler<TAcceptHandlerExtras>;\n return new (class Impl implements HierarchySearchTreeBuilder<TAcceptHandlerExtras> {\n #rootsDictionary: HierarchySearchTreeDictionary = new Dictionary(HierarchyNodeIdentifier.compare);\n\n static #mapDictionaryToTree(\n dictionary: HierarchySearchTreeDictionary,\n parentEntries: Array<HierarchySearchTreeBuilderAcceptHandlerTreeEntry<TAcceptHandlerExtras>>,\n props?: HierarchySearchTreeBuilderFinalizeTreeProps<TAcceptHandlerExtras>,\n ): HierarchySearchTree[] {\n const list: HierarchySearchTree[] = [];\n for (const { children, ...entry } of dictionary.values()) {\n let processedEntry: (Omit<HierarchySearchTree, \"children\"> & { extras: TAcceptHandlerExtras }) | undefined =\n entry;\n if (props?.processEntry) {\n processedEntry = props.processEntry({ treeEntry: entry, parentEntries });\n }\n if (!processedEntry) {\n continue;\n }\n const { extras: _, ...entryWithoutExtras } = processedEntry;\n parentEntries.push(processedEntry);\n list.push({\n ...entryWithoutExtras,\n ...(children ? { children: Impl.#mapDictionaryToTree(children, parentEntries, props) } : undefined),\n });\n parentEntries.pop();\n }\n return list;\n }\n\n static #assignAutoExpandOptionsBasedOnReveal(\n treePath: Pick<HierarchySearchTree, \"options\">[],\n revealOption: HierarchySearchPathOptions[\"reveal\"] | undefined,\n ) {\n if (revealOption === true) {\n Impl.#assignOptionsOnTreePath({\n treePath,\n targetEntryIndex: treePath.length - 1,\n getEntryOptions: (index, targetEntryIndex) => {\n if (index === targetEntryIndex) {\n // auto-expand all grouping nodes of the revealed node\n return { autoExpand: { groupingLevel: Number.MAX_SAFE_INTEGER } };\n }\n // auto-expand all parent nodes\n return { autoExpand: true };\n },\n });\n } else if (revealOption && \"groupingLevel\" in revealOption) {\n Impl.#assignOptionsOnTreePath({\n treePath,\n targetEntryIndex: treePath.length - 1,\n getEntryOptions: (index, targetEntryIndex) => {\n if (index === targetEntryIndex) {\n // the last entry should have `autoExpand` with `groupingLevel` set to the value based on `reveal.groupingLevel`\n return { autoExpand: { groupingLevel: Math.max(revealOption.groupingLevel - 1, 0) } };\n }\n // auto-expand all parent nodes\n return { autoExpand: true };\n },\n });\n } else if (revealOption && \"depthInPath\" in revealOption) {\n Impl.#assignOptionsOnTreePath({\n treePath,\n targetEntryIndex: Math.min(revealOption.depthInPath, treePath.length - 1),\n getEntryOptions: (index, targetEntryIndex) => {\n if (index === targetEntryIndex) {\n // auto-expand all grouping nodes of the revealed node\n return { autoExpand: { groupingLevel: Number.MAX_SAFE_INTEGER } };\n }\n // auto-expand all parent nodes\n return { autoExpand: true };\n },\n });\n }\n }\n\n static #assignOptionsOnTreePath({\n treePath,\n targetEntryIndex,\n getEntryOptions,\n }: {\n treePath: Array<Pick<HierarchySearchTree, \"options\">>;\n targetEntryIndex: number;\n getEntryOptions: (index: number, targetEntryIndex: number) => HierarchySearchTree[\"options\"] | undefined;\n }) {\n // set all parent entries to auto-expand\n for (let i = 0; i <= targetEntryIndex; i++) {\n const options = mergeOptions(treePath[i].options, getEntryOptions(i, targetEntryIndex));\n if (options) {\n treePath[i].options = options;\n }\n }\n }\n\n #acceptNode({\n parentEntries,\n level,\n node,\n handler,\n }: {\n parentEntries: HierarchySearchTreeDictionaryEntry[];\n level: HierarchySearchTreeDictionary;\n node: Pick<HierarchySearchTree, \"identifier\" | \"isTarget\"> & { hasChildren: boolean };\n handler?: AcceptHandler;\n }): HierarchySearchTreeDictionaryEntry | undefined {\n let entry = level.get(node.identifier);\n if (!entry) {\n if (handler?.onNewEntry && !handler.onNewEntry({ parentEntries, inputEntry: node })) {\n return undefined;\n }\n entry = {\n identifier: node.identifier,\n children: node.hasChildren ? new Dictionary(HierarchyNodeIdentifier.compare) : undefined,\n extras: {} as TAcceptHandlerExtras,\n };\n level.set(node.identifier, entry);\n }\n\n const isNodeSearchTarget = node.isTarget || !node.hasChildren;\n if (isNodeSearchTarget && entry.children) {\n entry.isTarget = true;\n }\n if (!entry.children && node.hasChildren) {\n // Existing leaf nodes are implied targets. Preserve that status when adding children.\n entry.isTarget = true;\n entry.children = new Dictionary(HierarchyNodeIdentifier.compare);\n }\n handler?.onEntryHandled?.({ parentEntries, treeEntry: entry, inputEntry: node });\n return entry;\n }\n\n #acceptPath({ path, handler }: { path: HierarchySearchPath; handler?: AcceptHandler }) {\n const normalized = HierarchySearchPath.normalize(path);\n const treePath: Array<HierarchySearchTreeDictionaryEntry> = [];\n let currentLevel: HierarchySearchTreeDictionary = this.#rootsDictionary;\n for (let i = 0; i < normalized.path.length; i++) {\n const identifier = normalized.path[i];\n const acceptedNode = this.#acceptNode({\n parentEntries: treePath,\n node: { identifier, hasChildren: i < normalized.path.length - 1 },\n level: currentLevel,\n handler,\n });\n if (!acceptedNode) {\n break;\n }\n treePath.push(acceptedNode);\n if (!acceptedNode.children) {\n break;\n }\n currentLevel = acceptedNode.children;\n }\n\n if (treePath.length === 0) {\n return;\n }\n\n // handle auto-expand\n const lastNode = treePath[treePath.length - 1];\n if (normalized.options?.autoExpand) {\n (lastNode.options ??= {}).autoExpand = true;\n }\n\n // handle auto-reveal\n Impl.#assignAutoExpandOptionsBasedOnReveal(treePath, normalized.options?.reveal);\n }\n\n #acceptTree({ tree, handler }: { tree: HierarchySearchTree; handler?: AcceptHandler }) {\n const acceptTreeNode = (\n parentEntries: HierarchySearchTreeDictionaryEntry[],\n parentInputs: HierarchySearchTree[],\n level: HierarchySearchTreeDictionary,\n node: HierarchySearchTree,\n ) => {\n const acceptedNode = this.#acceptNode({\n parentEntries,\n node: { ...node, hasChildren: node.children !== undefined },\n level,\n handler,\n });\n if (!acceptedNode) {\n // It was decided to reject this node and its children, if any\n return;\n }\n const treePath = [...parentEntries, acceptedNode];\n const inputsPath = [...parentInputs, node];\n if (!node.children || node.isTarget) {\n // Found an effective search target - merge options from its path\n Impl.#assignOptionsOnTreePath({\n treePath,\n targetEntryIndex: treePath.length - 1,\n getEntryOptions: (index) => inputsPath[index].options,\n });\n }\n const currentLevel = acceptedNode.children;\n if (currentLevel) {\n node.children?.forEach((child) => acceptTreeNode(treePath, inputsPath, currentLevel, child));\n }\n };\n acceptTreeNode([], [], this.#rootsDictionary, tree);\n }\n\n public accept(\n props: ({ path: HierarchySearchPath } | { tree: HierarchySearchTree }) & { handler?: AcceptHandler },\n ): HierarchySearchTreeBuilder<TAcceptHandlerExtras> {\n if (\"path\" in props) {\n this.#acceptPath(props);\n } else {\n this.#acceptTree(props);\n }\n return this;\n }\n\n public getTree(props?: HierarchySearchTreeBuilderFinalizeTreeProps<TAcceptHandlerExtras>) {\n return Impl.#mapDictionaryToTree(this.#rootsDictionary, [], props);\n }\n })();\n }\n\n /**\n * Builds a list of `HierarchySearchTree` nodes from an iterable of search paths. Shared\n * path prefixes are merged so that each unique hierarchy node identifier appears only once\n * per level. The resulting trees carry `isTarget`, `options`, and `children` attributes\n * derived from the paths and their options (`autoExpand`, `reveal`).\n *\n * @public\n */\n export async function createFromPathsList(paths: Iterable<HierarchySearchPath>): Promise<HierarchySearchTree[]> {\n return firstValueFrom(\n from(paths).pipe(\n releaseMainThreadOnItemsCount(1000),\n reduce((builder, path) => builder.accept({ path }), createBuilder()),\n map((builder) => builder.getTree()),\n ),\n );\n }\n\n /**\n * Merges two `HierarchySearchTree` option objects. For the `autoExpand` attribute,\n * `true` takes precedence over `{ groupingLevel }`, and when both sides are\n * `{ groupingLevel }` objects the larger value wins.\n * @public\n */\n export function mergeOptions(\n lhs: HierarchySearchTree[\"options\"] | undefined,\n rhs: HierarchySearchTree[\"options\"] | undefined,\n ): HierarchySearchTree[\"options\"] | undefined {\n if (!lhs) {\n return rhs;\n }\n if (!rhs) {\n return lhs;\n }\n const autoExpand = mergeSearchTreeAutoExpandOption(lhs.autoExpand, rhs.autoExpand);\n const options: NonNullable<HierarchySearchTree[\"options\"]> = { ...(autoExpand ? { autoExpand } : undefined) };\n return Object.keys(options).length > 0 ? options : undefined;\n }\n\n function mergeSearchTreeAutoExpandOption(\n lhs: NonNullable<HierarchySearchTree[\"options\"]>[\"autoExpand\"] | undefined,\n rhs: NonNullable<HierarchySearchTree[\"options\"]>[\"autoExpand\"] | undefined,\n ): NonNullable<HierarchySearchTree[\"options\"]>[\"autoExpand\"] | undefined {\n if (!lhs) {\n return rhs;\n }\n if (!rhs) {\n return lhs;\n }\n return lhs === true || rhs === true ? true : { groupingLevel: Math.max(lhs.groupingLevel, rhs.groupingLevel) };\n }\n}\n\nfunction extractSearchPropsInternal(\n rootLevelSearchProps: HierarchySearchTree[] | undefined,\n parentNode: Pick<NonGroupingHierarchyNode, \"search\"> | undefined,\n): { childrenTargetPaths?: HierarchySearchTree[]; hasSearchTargetAncestor: boolean } | undefined {\n if (!parentNode) {\n return rootLevelSearchProps\n ? { childrenTargetPaths: rootLevelSearchProps, hasSearchTargetAncestor: false }\n : undefined;\n }\n const searchProps: { childrenTargetPaths?: HierarchySearchTree[]; hasSearchTargetAncestor: boolean } = {\n ...(parentNode.search?.childrenTargetPaths\n ? { childrenTargetPaths: parentNode.search.childrenTargetPaths }\n : undefined),\n hasSearchTargetAncestor: !!parentNode.search?.hasSearchTargetAncestor || !!parentNode.search?.isSearchTarget,\n };\n return searchProps.childrenTargetPaths || searchProps.hasSearchTargetAncestor ? searchProps : undefined;\n}\n\n/**\n * Creates a set of utilities for making it easier to search the given hierarchy\n * level.\n *\n * @public\n */\nexport function createHierarchySearchHelper(\n rootLevelSearchProps: HierarchySearchTree[] | undefined,\n parentNode: Pick<NonGroupingHierarchyNode, \"search\"> | undefined,\n) {\n const searchProps = extractSearchPropsInternal(rootLevelSearchProps, parentNode);\n const hasSearch = !!searchProps;\n\n function saveSearchPropsFromPathsIntoReducer(\n extractionProps: { pathsReducer: MatchingSearchPathsReducer; nodeKey: InstancesNodeKey | GenericNodeKey } & (\n | { pathMatcher: (identifier: HierarchyNodeIdentifier) => boolean }\n | {}\n ),\n ): void;\n function saveSearchPropsFromPathsIntoReducer(extractionProps: {\n pathsReducer: MatchingSearchPathsReducer;\n nodeKey: InstancesNodeKey | GenericNodeKey;\n asyncPathMatcher: (identifier: HierarchyNodeIdentifier) => boolean | Promise<boolean>;\n }): void | Promise<void>;\n function saveSearchPropsFromPathsIntoReducer(\n extractionProps: { pathsReducer: MatchingSearchPathsReducer; nodeKey: InstancesNodeKey | GenericNodeKey } & (\n | { pathMatcher: (identifier: HierarchyNodeIdentifier) => boolean }\n | { asyncPathMatcher: (identifier: HierarchyNodeIdentifier) => boolean | Promise<boolean> }\n | {}\n ),\n ): void | Promise<void> {\n // Passes down matching hierarchy search trees to the reducer.\n // It uses `nodeKey`, `pathMatcher` or `asyncPathMatcher` to check if `HierarchyNodeIdentifier` in the search tree item's identifier matches the node\n // and if it does, the path is passed down to the reducer.\n // This function returns a promise only if `asyncPathMatcher` returns a promise.\n if (!searchProps?.childrenTargetPaths) {\n return;\n }\n const matchedTreePromises = new Array<Promise<HierarchySearchTree | undefined>>();\n for (const childrenSearchTree of searchProps.childrenTargetPaths) {\n if (\"asyncPathMatcher\" in extractionProps) {\n const matchesPossiblyPromise = extractionProps.asyncPathMatcher(childrenSearchTree.identifier);\n if (matchesPossiblyPromise instanceof Promise) {\n matchedTreePromises.push(\n matchesPossiblyPromise.then((matches) => (matches ? childrenSearchTree : undefined)),\n );\n } else if (matchesPossiblyPromise) {\n extractionProps.pathsReducer.accept(childrenSearchTree);\n }\n } else {\n const matches =\n \"pathMatcher\" in extractionProps\n ? extractionProps.pathMatcher(childrenSearchTree.identifier)\n : nodeKeyMatchesIdentifier(extractionProps.nodeKey, childrenSearchTree.identifier);\n if (matches) {\n extractionProps.pathsReducer.accept(childrenSearchTree);\n }\n }\n }\n if (matchedTreePromises.length === 0) {\n return;\n }\n return Promise.all(matchedTreePromises).then((matchedTrees) =>\n matchedTrees.forEach((matchedTree) => matchedTree && extractionProps.pathsReducer.accept(matchedTree)),\n );\n }\n\n function createChildNodeProps(props: {\n nodeKey: InstancesNodeKey | GenericNodeKey;\n }): Pick<NonGroupingHierarchyNode, \"search\" | \"autoExpand\"> | undefined;\n function createChildNodeProps(props: {\n nodeKey: InstancesNodeKey | GenericNodeKey;\n pathMatcher: (identifier: HierarchyNodeIdentifier) => boolean;\n }): Pick<NonGroupingHierarchyNode, \"search\" | \"autoExpand\"> | undefined;\n function createChildNodeProps(props: {\n nodeKey: InstancesNodeKey | GenericNodeKey;\n asyncPathMatcher: (identifier: HierarchyNodeIdentifier) => boolean | Promise<boolean>;\n }):\n | Promise<Pick<NonGroupingHierarchyNode, \"search\" | \"autoExpand\"> | undefined>\n | Pick<NonGroupingHierarchyNode, \"search\" | \"autoExpand\">\n | undefined;\n function createChildNodeProps(\n props: { nodeKey: InstancesNodeKey | GenericNodeKey } & (\n | { asyncPathMatcher: (identifier: HierarchyNodeIdentifier) => boolean | Promise<boolean> }\n | { pathMatcher: (identifier: HierarchyNodeIdentifier) => boolean }\n | {}\n ),\n ):\n | Promise<Pick<NonGroupingHierarchyNode, \"search\" | \"autoExpand\"> | undefined>\n | Pick<NonGroupingHierarchyNode, \"search\" | \"autoExpand\">\n | undefined {\n if (!hasSearch) {\n return undefined;\n }\n\n const reducer = new MatchingSearchPathsReducer(searchProps.hasSearchTargetAncestor);\n if (\"asyncPathMatcher\" in props) {\n const extractResult = saveSearchPropsFromPathsIntoReducer({\n pathsReducer: reducer,\n nodeKey: props.nodeKey,\n asyncPathMatcher: props.asyncPathMatcher,\n });\n if (extractResult instanceof Promise) {\n return extractResult.then(() => reducer.aggregatedOptions);\n }\n } else {\n saveSearchPropsFromPathsIntoReducer({ pathsReducer: reducer, ...props });\n }\n return reducer.aggregatedOptions;\n }\n\n return {\n /** Returns a flag indicating if the hierarchy level is filtered. */\n hasSearch,\n /**\n * Returns a flag indicating whether this hierarchy level has an ancestor node\n * that is a search target. That generally means that this and all downstream hierarchy\n * levels should be displayed without search being applied to them, even if search paths\n * say otherwise.\n */\n hasSearchTargetAncestor: searchProps?.hasSearchTargetAncestor ?? false,\n /**\n * Returns a list of hierarchy node identifiers that apply specifically for this\n * hierarchy level. Returns `undefined` if search is not applied to this level.\n */\n getChildNodeSearchIdentifiers: () => {\n if (!searchProps?.childrenTargetPaths) {\n return undefined;\n }\n return searchProps.childrenTargetPaths.map(({ identifier }) => identifier);\n },\n /**\n * When a hierarchy node is created for a filtered hierarchy level, it needs some attributes (e.g. `search`\n * and `autoExpand`) to be set based on the search paths and search options. This function calculates\n * these props for a child node based on its key or path matcher.\n *\n * When using `pathMatcher` or `asyncPathMatcher` prop, callers have more flexibility to decide whether the given `HierarchyNodeIdentifier` applies\n * to their node. For example, only some parts of the identifier can be checked for improved performance. Otherwise, the\n * `nodeKey` prop can be used to check the whole identifier.\n *\n * There are multiple overloads of `createChildNodeProps`: depending on props type it returns different values:\n * - `asyncPathMatcher` is provided - returns either Promise or the regular return value based on whether or not `asyncPathMatcher` returns a `Promise`.\n * - `pathMatcher` or only `nodeKey` is provided - returns undefined **or** `search` and `autoExpand` prop from `HierarchyNode`;\n */\n createChildNodeProps,\n };\n}\n\nfunction nodeKeyMatchesIdentifier(\n nodeKey: InstancesNodeKey | GenericNodeKey,\n identifier: HierarchyNodeIdentifier,\n): boolean {\n return (\n (HierarchyNodeKey.isGeneric(nodeKey) && HierarchyNodeIdentifier.equal(identifier, nodeKey)) ||\n (HierarchyNodeKey.isInstances(nodeKey) &&\n nodeKey.instanceKeys.some((ik) => HierarchyNodeIdentifier.equal(identifier, ik)))\n );\n}\n\n/**\n * Extracts information from search paths and later returns `search` and `autoExpand` values from `HierarchyNode`.\n *\n * Saved values can be applied to a single `HierarchyNode` - this means that a new reducer should be created every time these props are requested for a `HierarchyNode`.\n *\n * Extracts information using `accept` function:\n * - Determines if node is search target, and if it is saves the options as `searchTargetOptions`\n * - Saves `HierarchySearchPathOptions` and `childrenTargetPaths`\n */\nclass MatchingSearchPathsReducer {\n private _childrenTargetPaths = new Array<HierarchySearchTree>();\n private _isSearchTarget = false;\n private _options: HierarchySearchTree[\"options\"] | undefined = undefined;\n\n public constructor(private _hasSearchTargetAncestor: boolean) {}\n\n public accept(tree: HierarchySearchTree): void {\n if (tree.isTarget || tree.children === undefined) {\n this._isSearchTarget = true;\n }\n if (tree.children && tree.children.length > 0) {\n this._childrenTargetPaths.push(...tree.children);\n }\n this._options = HierarchySearchTree.mergeOptions(this._options, tree.options);\n }\n\n public get aggregatedOptions() {\n const search =\n this._hasSearchTargetAncestor || this._isSearchTarget || this._childrenTargetPaths.length > 0 || this._options\n ? {\n ...(this._hasSearchTargetAncestor ? { hasSearchTargetAncestor: true } : undefined),\n ...(this._isSearchTarget ? { isSearchTarget: true } : undefined),\n ...(this._childrenTargetPaths.length > 0 ? { childrenTargetPaths: this._childrenTargetPaths } : undefined),\n ...(this._options ? { options: this._options } : undefined),\n }\n : undefined;\n const autoExpand = this._options?.autoExpand === true;\n return { ...(search ? { search } : undefined), ...(autoExpand ? { autoExpand } : undefined) };\n }\n}\n"]}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Logging.d.ts","sourceRoot":"","sources":["../../src/hierarchies/Logging.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAK1D;;;GAGG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,OAAO,GAAG,SAAS,QAEpD;AAED;;;;GAIG;AACH,wBAAgB,SAAS,IAAI,OAAO,CAEnC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Logging.js","sourceRoot":"","sources":["../../src/hierarchies/Logging.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAIzD,gEAAgE;AAChE,IAAI,QAAQ,GAAY,WAAW,CAAC;AAEpC;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,MAA2B;IACnD,QAAQ,GAAG,MAAM,IAAI,iCAAiC,CAAC,WAAW,CAAC;AACrE,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,SAAS;IACvB,OAAO,QAAQ,CAAC;AAClB,CAAC","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 { NOOP_LOGGER } from \"@itwin/presentation-shared\";\n\nimport type { ILogger } from \"@itwin/presentation-shared\";\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nlet g_logger: ILogger = NOOP_LOGGER;\n\n/**\n * Set logger to use by this package. By default the package uses a no-op logger.\n * @public\n */\nexport function setLogger(logger: ILogger | undefined) {\n g_logger = logger ?? /* v8 ignore next -- @preserve */ NOOP_LOGGER;\n}\n\n/**\n * Get logger used by this package.\n * @see `setLogger`\n * @public\n */\nexport function getLogger(): ILogger {\n return g_logger;\n}\n"]}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HierarchyCache.d.ts","sourceRoot":"","sources":["../../../src/hierarchies/imodel/HierarchyCache.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAStE,UAAU,8BAA8B;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,gBAAgB;AAChB,qBAAa,cAAc,CAAC,CAAC;IAC3B,OAAO,CAAC,IAAI,CAA4D;IACxE,OAAO,CAAC,MAAM,CAAiC;IAE/C,YAAmB,KAAK,EAAE,8BAA8B,EAGvD;IAED,OAAO,CAAC,eAAe;IAuBvB,OAAO,CAAC,iBAAiB;IAyBlB,GAAG,CAAC,YAAY,EAAE,sBAAsB,EAAE,KAAK,EAAE,CAAC,QAGxD;IAEM,GAAG,CAAC,YAAY,EAAE,sBAAsB,GAAG,CAAC,GAAG,SAAS,CAG9D;IAEM,KAAK,SAEX;CACF"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HierarchyCache.js","sourceRoot":"","sources":["../../../src/hierarchies/imodel/HierarchyCache.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAkB1D,gBAAgB;AAChB,MAAM,OAAO,cAAc;IACjB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S,wBAAwB,CAAC,GAAuB,EAAE,GAAuB;IAChF,IAAI,GAAG,CAAC,MAAM,KAAK,GAAG,CAAC,MAAM,EAAE,CAAC;QAC9B,OAAO,GAAG,CAAC,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC;IACjC,CAAC;IACD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC;QACpC,MAAM,iBAAiB,GAAG,gBAAgB,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QACnE,IAAI,iBAAiB,KAAK,CAAC,EAAE,CAAC;YAC5B,OAAO,iBAAiB,CAAC;QAC3B,CAAC;IACH,CAAC;IACD,OAAO,CAAC,CAAC;AACX,CAAC","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 { LRUDictionary, LRUMap } from \"@itwin/core-bentley\";\nimport { HierarchyNodeKey } from \"../HierarchyNodeKey.js\";\n\nimport type { LRUCache } from \"@itwin/core-bentley\";\nimport type { InstanceKey } from \"@itwin/presentation-shared\";\nimport type { GetHierarchyNodesProps } from \"../HierarchyProvider.js\";\n\ninterface HierarchyCacheEntry<T> {\n /** Stores observables for the default case - no instance filter or custom limit for the hierarchy level. */\n primary: T | undefined;\n /** Stores a limited number of variations with custom instance filter and/or custom limit for the hierarchy level. */\n variations: LRUCache<string, T>;\n}\n\ninterface ChildNodeObservablesCacheProps {\n size: number;\n variationsCount?: number;\n}\n\n/** @internal */\nexport class HierarchyCache<T> {\n private _map: LRUDictionary<HierarchyNodeKey[], HierarchyCacheEntry<T>>;\n private _props: ChildNodeObservablesCacheProps;\n\n public constructor(props: ChildNodeObservablesCacheProps) {\n this._props = props;\n this._map = new LRUDictionary<HierarchyNodeKey[], HierarchyCacheEntry<T>>(props.size, compareHierarchyNodeKeys);\n }\n\n private createCacheKeys(\n props: Omit<GetHierarchyNodesProps, \"parentNode\"> & {\n parentNode: { key: HierarchyNodeKey; parentKeys: HierarchyNodeKey[] } | undefined;\n targetInstanceKeys?: InstanceKey[];\n },\n ) {\n function createVariationKey() {\n const { instanceFilter, hierarchyLevelSizeLimit, targetInstanceKeys } = props;\n if (instanceFilter === undefined && hierarchyLevelSizeLimit === undefined && targetInstanceKeys === undefined) {\n return undefined;\n }\n return JSON.stringify({ instanceFilter, hierarchyLevelSizeLimit, targetInstanceKeys });\n }\n\n if (!props.parentNode) {\n return { primaryKey: [], variationKey: createVariationKey() };\n }\n\n const parentKeys = props.parentNode.parentKeys;\n\n return { primaryKey: [...parentKeys, props.parentNode.key], variationKey: createVariationKey() };\n }\n\n private getCacheAccessors(primaryKey: HierarchyNodeKey[], variationKey?: string) {\n const getMapEntry = (create: boolean) => {\n let entry = this._map.get(primaryKey);\n if (!entry && create) {\n entry = { primary: undefined, variations: new LRUMap(this._props.variationsCount ?? 1) };\n this._map.set(primaryKey, entry);\n }\n return entry;\n };\n if (variationKey) {\n return {\n get: () => getMapEntry(false)?.variations.get(variationKey),\n set: (value: T) => {\n getMapEntry(true)!.variations.set(variationKey, value);\n },\n };\n }\n return {\n get: () => getMapEntry(false)?.primary,\n set: (value: T) => {\n getMapEntry(true)!.primary = value;\n },\n };\n }\n\n public set(requestProps: GetHierarchyNodesProps, value: T) {\n const { primaryKey, variationKey } = this.createCacheKeys(requestProps);\n this.getCacheAccessors(primaryKey, variationKey).set(value);\n }\n\n public get(requestProps: GetHierarchyNodesProps): T | undefined {\n const { primaryKey, variationKey } = this.createCacheKeys(requestProps);\n return this.getCacheAccessors(primaryKey, variationKey).get();\n }\n\n public clear() {\n this._map.clear();\n }\n}\n\nfunction compareHierarchyNodeKeys(lhs: HierarchyNodeKey[], rhs: HierarchyNodeKey[]) {\n if (lhs.length !== rhs.length) {\n return lhs.length - rhs.length;\n }\n for (let i = 0; i < lhs.length; ++i) {\n const keysCompareResult = HierarchyNodeKey.compare(lhs[i], rhs[i]);\n if (keysCompareResult !== 0) {\n return keysCompareResult;\n }\n }\n return 0;\n}\n"]}
@@ -22,7 +22,7 @@ export interface InstanceNodesQueryDefinition {
22
22
  * points to a base class of multiple different classes of instances returned by the query, however
23
23
  * the more specific this class is, the more efficient hierarchy building process is.
24
24
  */
25
- fullClassName: EC.FullClassName;
25
+ fullClassName: EC.FullClassNameDotNotation;
26
26
  /**
27
27
  * An ECSQL query that selects nodes from an iModel. `SELECT` clause of the query is expected
28
28
  * to be built using `NodeSelectQueryFactory.createSelectClause`.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IModelHierarchyDefinition.d.ts","sourceRoot":"","sources":["../../../src/hierarchies/imodel/IModelHierarchyDefinition.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,KAAK,EAAE,EAAE,EAAE,yBAAyB,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AACjH,OAAO,KAAK,EAAE,wBAAwB,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AACzF,OAAO,KAAK,EACV,6BAA6B,EAC7B,sBAAsB,EACtB,8BAA8B,EAC9B,0BAA0B,EAC1B,2BAA2B,EAC5B,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAClF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAE3E;;;GAGG;AACH,MAAM,WAAW,8BAA8B;IAC7C,oDAAoD;IACpD,IAAI,EAAE,0BAA0B,CAAC;CAClC;AAED;;;GAGG;AACH,MAAM,WAAW,4BAA4B;IAC3C;;;;OAIG;IACH,aAAa,EAAE,EAAE,CAAC,wBAAwB,CAAC;IAC3C;;;OAGG;IACH,KAAK,EAAE,aAA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AAC,CAAC;AAEvF;;;GAGG;AACH,MAAM,WAAW,yBAA0B,SAAQ,IAAI,CACrD,uBAAuB,EACvB,oBAAoB,GAAG,qBAAqB,CAC7C;IACC,4EAA4E;IAC5E,YAAY,EAAE,0BAA0B,GAAG,gBAAgB,GAAG,yBAAyB,GAAG;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC;IAEhH,2EAA2E;IAC3E,UAAU,EAAE,6BAA6B,GAAG,SAAS,CAAC;IAEtD,uCAAuC;IACvC,cAAc,CAAC,EAAE,qBAAqB,CAAC;CACxC;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;;;;;;;OASG;IACH,SAAS,CAAC,EAAE,UAAU,CAAC;IAEvB;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,gBAAgB,CAAC;IAElC;;;;;;;OAOG;IACH,eAAe,CAAC,EAAE,iBAAiB,CAAC;IAEpC,+EAA+E;IAC/E,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;CAC3F"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IModelHierarchyDefinition.js","sourceRoot":"","sources":["../../../src/hierarchies/imodel/IModelHierarchyDefinition.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AA+ChG,cAAc;AACd,2DAA2D;AAC3D,MAAM,KAAW,wBAAwB,CAOxC;AAPD,WAAiB,wBAAwB;IACvC,SAAgB,aAAa,CAAC,GAA6B;QACzD,OAAO,CAAC,CAAE,GAAsC,CAAC,IAAI,CAAC;IACxD,CAAC;IAFe,yBAAA,aAAa,gBAE5B,CAAA;IACD,SAAgB,oBAAoB,CAAC,GAA6B;QAChE,OAAO,CAAC,CAAE,GAAoC,CAAC,KAAK,CAAC;IACvD,CAAC;IAFe,yBAAA,oBAAoB,uBAEnC,CAAA;AACH,CAAC,EAPgB,wBAAwB,KAAxB,wBAAwB,QAOxC","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 type { GenericInstanceFilter } from \"@itwin/core-common\";\nimport type { EC, ECClassHierarchyInspector, ECSchemaProvider, ECSqlQueryDef } from \"@itwin/presentation-shared\";\nimport type { NonGroupingHierarchyNode, ParentHierarchyNode } from \"../HierarchyNode.js\";\nimport type {\n ProcessedGenericHierarchyNode,\n ProcessedHierarchyNode,\n ProcessedInstanceHierarchyNode,\n SourceGenericHierarchyNode,\n SourceInstanceHierarchyNode,\n} from \"./IModelHierarchyNode.js\";\nimport type { LimitingECSqlQueryExecutor } from \"./LimitingECSqlQueryExecutor.js\";\nimport type { NodesQueryClauseFactory } from \"./NodeSelectQueryFactory.js\";\n\n/**\n * A nodes definition that returns a single generic node.\n * @public\n */\nexport interface GenericHierarchyNodeDefinition {\n /** The node to be created in the hierarchy level */\n node: SourceGenericHierarchyNode;\n}\n\n/**\n * A nodes definition that returns an ECSQL query for selecting nodes from an iModel.\n * @public\n */\nexport interface InstanceNodesQueryDefinition {\n /**\n * Full name of the class whose instances are going to be returned. It's okay if the attribute\n * points to a base class of multiple different classes of instances returned by the query, however\n * the more specific this class is, the more efficient hierarchy building process is.\n */\n fullClassName: EC.FullClassNameDotNotation;\n /**\n * An ECSQL query that selects nodes from an iModel. `SELECT` clause of the query is expected\n * to be built using `NodeSelectQueryFactory.createSelectClause`.\n */\n query: ECSqlQueryDef;\n}\n\n/**\n * A definition of nodes included in a hierarchy level.\n * @public\n */\nexport type HierarchyNodesDefinition = GenericHierarchyNodeDefinition | InstanceNodesQueryDefinition;\n/** @public */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport namespace HierarchyNodesDefinition {\n export function isGenericNode(def: HierarchyNodesDefinition): def is GenericHierarchyNodeDefinition {\n return !!(def as GenericHierarchyNodeDefinition).node;\n }\n export function isInstanceNodesQuery(def: HierarchyNodesDefinition): def is InstanceNodesQueryDefinition {\n return !!(def as InstanceNodesQueryDefinition).query;\n }\n}\n\n/**\n * A definition of a hierarchy level, which may consist of multiple node definitions.\n * @public\n */\nexport type HierarchyLevelDefinition = HierarchyNodesDefinition[];\n\n/**\n * A type for a function that parses a `SourceInstanceHierarchyNode` from provided ECSQL `row` object.\n * @public\n */\nexport type NodeParser = (props: {\n /** The ECSQL row object to parse. Keys & value types depend on the executed query. */\n row: { [columnName: string]: any };\n\n /** The parent node whose child node is being parsed. */\n parentNode?: HierarchyDefinitionParentNode;\n\n /** The key of iModel which is used to run the query. */\n imodelKey: string;\n}) => SourceInstanceHierarchyNode | Promise<SourceInstanceHierarchyNode>;\n\n/**\n * A type for a function that pre-processes given node. Unless the function decides not to make any modifications,\n * it should return a new - modified - node, rather than modifying the given one. Returning `undefined` omits the node\n * from the hierarchy.\n *\n * @public\n */\nexport type NodePreProcessor = <TNode extends ProcessedGenericHierarchyNode | ProcessedInstanceHierarchyNode>(props: {\n /** Node to be pre-processed. */\n node: TNode;\n\n /** The parent node whose child node is being pre-processed. */\n parentNode?: ParentHierarchyNode;\n}) => Promise<TNode | undefined>;\n\n/**\n * A type for a function that post-processes given node. Unless the function decides not to make any modifications,\n * it should return a new - modified - node, rather than modifying the given one.\n *\n * @public\n */\nexport type NodePostProcessor = (props: {\n /** Node to be post-processed. */\n node: ProcessedHierarchyNode;\n\n /** The parent node whose child node is being post-processed. */\n parentNode?: ParentHierarchyNode;\n}) => Promise<ProcessedHierarchyNode>;\n\n/**\n * A type of node that can be passed to `HierarchyDefinition.defineHierarchyLevel`. This basically means\n * a `HierarchyNode` that:\n * - knows nothing about its children,\n * - is either an instances node (key is of `InstancesNodeKey` type) or a generic node (key is of `GenericNodeKey` type).\n * @public\n */\nexport type HierarchyDefinitionParentNode = Omit<NonGroupingHierarchyNode, \"children\">;\n\n/**\n * Props for `HierarchyDefinition.defineHierarchyLevel`.\n * @public\n */\nexport interface DefineHierarchyLevelProps extends Pick<\n NodesQueryClauseFactory,\n \"createSelectClause\" | \"createFilterClauses\"\n> {\n /** The iModel for which the hierarchy definition is being requested for. */\n imodelAccess: LimitingECSqlQueryExecutor & ECSchemaProvider & ECClassHierarchyInspector & { imodelKey: string };\n\n /** Parent node to get children for. Pass `undefined` to get root nodes. */\n parentNode: HierarchyDefinitionParentNode | undefined;\n\n /** Optional hierarchy level filter. */\n instanceFilter?: GenericInstanceFilter;\n}\n\n/**\n * An interface for a factory that knows how define a hierarchy based on a given parent node.\n * @public\n */\nexport interface HierarchyDefinition {\n /**\n * An optional function for parsing ECInstance node from ECSQL row.\n *\n * Should be used in situations when the `HierarchyDefinition` implementation\n * introduces additional ECSQL columns into the select clause and wants to assign additional\n * data to the nodes it produces.\n *\n * Defaults to a function that parses all `HierarchyNode` attributes from a query, whose SELECT\n * clause is created using `NodeSelectQueryFactory.createSelectClause`.\n */\n parseNode?: NodeParser;\n\n /**\n * An optional function for pre-processing nodes.\n *\n * Pre-processing happens immediately after the nodes are loaded based on `HierarchyLevelDefinition`\n * returned by this `HierarchyDefinition` and before their processing (hiding, grouping, sorting, etc.) starts.\n * The step allows assigning nodes additional data or excluding them from the hierarchy based on some attributes.\n */\n preProcessNode?: NodePreProcessor;\n\n /**\n * An optional function for post-processing nodes.\n *\n * Post-processing happens after the loaded nodes go through all the merging, hiding and grouping\n * steps, but before sorting them. This step allows `HierarchyDefinition` implementations to assign additional data\n * to nodes after they're processed. This is especially true for grouping nodes as they're only created during\n * processing.\n */\n postProcessNode?: NodePostProcessor;\n\n /** A function to create a hierarchy level definition for given parent node. */\n defineHierarchyLevel(props: DefineHierarchyLevelProps): Promise<HierarchyLevelDefinition>;\n}\n"]}
@@ -80,7 +80,7 @@ interface HierarchyNodeBaseClassGroupingParams extends HierarchyNodeGroupingPara
80
80
  *
81
81
  * Full class name format: `SchemaName.ClassName`.
82
82
  */
83
- fullClassNames: EC.FullClassName[];
83
+ fullClassNames: EC.FullClassNameDotNotation[];
84
84
  }
85
85
  /**
86
86
  * A data structure that represents properties grouping.
@@ -93,7 +93,7 @@ export interface HierarchyNodePropertiesGroupingParams extends HierarchyNodeGrou
93
93
  *
94
94
  * Full class name format: `SchemaName.ClassName`.
95
95
  */
96
- propertiesClassName: EC.FullClassName;
96
+ propertiesClassName: EC.FullClassNameDotNotation;
97
97
  /**
98
98
  * Property grouping option that determines whether to group nodes whose grouping value is not set or is set to an empty string.
99
99
  *
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IModelHierarchyNode.d.ts","sourceRoot":"","sources":["../../../src/hierarchies/imodel/IModelHierarchyNode.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,iBAAiB,EAAE,EAAE,EAAE,WAAW,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACpH,OAAO,KAAK,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAC3F,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE/E;;;GAGG;AACH,UAAU,iCAAiC;IACzC,wEAAwE;IACxE,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,uGAAuG;IACvG,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED;;;GAGG;AACH,UAAU,2BAA2B;IACnC,OAAO,CAAC,EAAE,gCAAgC,CAAC;IAC3C,OAAO,CAAC,EAAE,OAAO,GAAG,+BAA+B,CAAC;IACpD,aAAa,CAAC,EAAE,oCAAoC,CAAC;IACrD,YAAY,CAAC,EAAE,qCAAqC,CAAC;CACtD;AAED;;;GAGG;AACH,UAAU,oCAAoC;IAC5C,yGAAyG;IACzG,MAAM,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IAC3B,2EAA2E;IAC3E,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,UAAU,qCAAsC,SAAQ,oCAAoC;IAC1F,MAAM,EAAE,OAAO,CAAC;CACjB;AAED;;;GAGG;AACH,UAAU,qCACR,SA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GAAG,CAAC,CAAC;IAC/C,CAAC;IAFe,uBAAA,cAAc,iBAE7B,CAAA;AACH,CAAC,EAbgB,sBAAsB,KAAtB,sBAAsB,QAatC","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 { HierarchyNodeKey } from \"../HierarchyNodeKey.js\";\n\nimport type { ConcatenatedValue, EC, InstanceKey, OmitOverUnion, PrimitiveValue } from \"@itwin/presentation-shared\";\nimport type { GroupingHierarchyNode, NonGroupingHierarchyNode } from \"../HierarchyNode.js\";\nimport type { GenericNodeKey, InstancesNodeKey } from \"../HierarchyNodeKey.js\";\n\n/**\n * Base processing parameters that apply to every node.\n * @public\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 * @public\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 * @public\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 * @public\n */\ninterface HierarchyNodeLabelGroupingMergeParams extends HierarchyNodeLabelGroupingBaseParams {\n action: \"merge\";\n}\n\n/**\n * A data structure for defining label grouping with additional parameters.\n * @public\n */\ninterface HierarchyNodeLabelGroupingGroupParams\n extends HierarchyNodeLabelGroupingBaseParams, HierarchyNodeGroupingParamsBase {\n action?: \"group\";\n}\n\n/**\n * A data structure for defining possible label grouping types.\n * @public\n */\nexport type HierarchyNodeLabelGroupingParams =\n | boolean\n | HierarchyNodeLabelGroupingMergeParams\n | HierarchyNodeLabelGroupingGroupParams;\n\n/**\n * Grouping parameters that are shared across all types of groupings.\n * @public\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 * @public\n */\nexport type HierarchyNodeAutoExpandProp = \"single-child\" | \"always\";\n\n/**\n * A data structure that represents base class grouping.\n * @public\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: EC.FullClassNameDotNotation[];\n}\n\n/**\n * A data structure that represents properties grouping.\n * @public\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: EC.FullClassNameDotNotation;\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 * @public\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 | ConcatenatedValue;\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 * @public\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 * @public\n */\nexport interface InstanceHierarchyNodeProcessingParams extends HierarchyNodeProcessingParamsBase {\n grouping?: HierarchyNodeGroupingParams;\n}\n\n/**\n * A generic (not based on data in an iModel) node that has processing parameters.\n * @public\n */\nexport type ProcessedGenericHierarchyNode = Omit<NonGroupingHierarchyNode, \"key\" | \"children\"> & {\n key: GenericNodeKey;\n children?: boolean;\n processingParams?: HierarchyNodeProcessingParamsBase;\n};\n\n/**\n * An instances' (based on data in an iModel) node that has processing parameters.\n * @public\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 * @public\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 * @public\n */\nexport type ProcessedHierarchyNode =\n | ProcessedGenericHierarchyNode\n | ProcessedInstanceHierarchyNode\n | ProcessedGroupingHierarchyNode;\n\n/** @public */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport namespace ProcessedHierarchyNode {\n /** Checks whether the given node is a generic node */\n export function isGeneric(node: ProcessedHierarchyNode): node is ProcessedGenericHierarchyNode {\n return HierarchyNodeKey.isGeneric(node.key);\n }\n /** Checks whether the given node is an ECInstances-based node */\n export function isInstancesNode(node: ProcessedHierarchyNode): node is ProcessedInstanceHierarchyNode {\n return HierarchyNodeKey.isInstances(node.key);\n }\n /** Checks whether the given node is a grouping node */\n export function isGroupingNode(node: ProcessedHierarchyNode): node is ProcessedGroupingHierarchyNode {\n return HierarchyNodeKey.isGrouping(node.key);\n }\n}\n\n/**\n * A `ProcessedHierarchyNode` that has an unformatted label in a form of `ConcatenatedValue`. Generally this is\n * returned by hierarchy definitions as a generic node or when the node is just parsed from query results.\n * @public\n */\nexport type SourceHierarchyNode<TBase = SourceGenericHierarchyNode | SourceInstanceHierarchyNode> = OmitOverUnion<\n TBase,\n \"label\" | \"parentKeys\"\n> & { label: string | ConcatenatedValue };\n\n/**\n * A kind of `ProcessedGenericHierarchyNode` that has unformatted label and doesn't know about its ancestors.\n * @public\n */\nexport type SourceGenericHierarchyNode = SourceHierarchyNode<\n Omit<ProcessedGenericHierarchyNode, \"key\"> & { key: string }\n>;\n\n/**\n * A kind of `ProcessedInstanceHierarchyNode` that has unformatted label and doesn't know about its ancestors.\n * @public\n */\nexport type SourceInstanceHierarchyNode = SourceHierarchyNode<\n Omit<ProcessedInstanceHierarchyNode, \"key\"> & {\n key: Omit<InstancesNodeKey, \"instanceKeys\"> & { instanceKeys: InstanceKey[] };\n }\n>;\n"]}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IModelHierarchyProvider.d.ts","sourceRoot":"","sources":["../../../src/hierarchies/imodel/IModelHierarchyProvider.ts"],"names":[],"mappings":"AAKA,OAAO,gCAAgC,CAAC;AAkCxC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AA6B5D,OAAO,KAAK,EAEV,yBAAyB,EACzB,gBAAgB,EAEhB,KAAK,EAEL,iCAAiC,EACjC,wBAAwB,EACzB,MAAM,4BAA4B,CAAC;AAGpC,OAAO,KAAK,EAA0B,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAEzF,OAAO,KAAK,EAGV,mBAAmB,EAEpB,MAAM,gCAAgC,CAAC;AAOxC,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAUlF;;;GAGG;AACH,UAAU,uCAAuC;IAC/C;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AAED,cAAc;AACd,KAAK,YAAY,GAAG,gBAAgB,GAAG,0BAA0B,GAAG,yBAAyB,GAAG;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC;AAEtH;;;GAGG;AACH,UAAU,4BAA4B;IACpC;;;;;;OAMG;IACH,YAAY,EAAE,YAAY,CAAC;IAE3B;;;OAGG;IACH,aAAa,CAAC,EAAE,KAAK,CAAC,MAAM,IAAI,CAAC,CAAC;IAElC;;;OAGG;IACH,mBAAmB,EAAE,mBAAmB,CAAC;IAEzC,qGAAqG;IACrG,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;;OAGG;IACH,cAAc,CAAC,EAAE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