@itwin/presentation-hierarchies 2.0.0-alpha.10 → 2.0.0-alpha.11

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 (259) hide show
  1. package/CHANGELOG.md +108 -0
  2. package/lib/cjs/hierarchies/HierarchyMerge.d.ts +1 -1
  3. package/lib/cjs/hierarchies/HierarchyMerge.d.ts.map +1 -1
  4. package/lib/cjs/hierarchies/HierarchyMerge.js +1 -1
  5. package/lib/cjs/hierarchies/HierarchyMerge.js.map +1 -1
  6. package/lib/cjs/hierarchies/HierarchyNode.d.ts +4 -3
  7. package/lib/cjs/hierarchies/HierarchyNode.d.ts.map +1 -1
  8. package/lib/cjs/hierarchies/HierarchyNode.js.map +1 -1
  9. package/lib/cjs/hierarchies/HierarchyNodeIdentifier.d.ts +1 -1
  10. package/lib/cjs/hierarchies/HierarchyNodeIdentifier.d.ts.map +1 -1
  11. package/lib/cjs/hierarchies/HierarchyNodeIdentifier.js.map +1 -1
  12. package/lib/cjs/hierarchies/HierarchyProvider.d.ts +51 -8
  13. package/lib/cjs/hierarchies/HierarchyProvider.d.ts.map +1 -1
  14. package/lib/cjs/hierarchies/HierarchyProvider.js +53 -0
  15. package/lib/cjs/hierarchies/HierarchyProvider.js.map +1 -1
  16. package/lib/cjs/hierarchies/HierarchySearch.d.ts +5 -3
  17. package/lib/cjs/hierarchies/HierarchySearch.d.ts.map +1 -1
  18. package/lib/cjs/hierarchies/HierarchySearch.js.map +1 -1
  19. package/lib/cjs/hierarchies/Logging.d.ts +1 -1
  20. package/lib/cjs/hierarchies/Logging.d.ts.map +1 -1
  21. package/lib/cjs/hierarchies/Logging.js.map +1 -1
  22. package/lib/cjs/hierarchies/imodel/HierarchyCache.d.ts +1 -1
  23. package/lib/cjs/hierarchies/imodel/HierarchyCache.d.ts.map +1 -1
  24. package/lib/cjs/hierarchies/imodel/HierarchyCache.js.map +1 -1
  25. package/lib/cjs/hierarchies/imodel/IModelHierarchyDefinition.d.ts +16 -6
  26. package/lib/cjs/hierarchies/imodel/IModelHierarchyDefinition.d.ts.map +1 -1
  27. package/lib/cjs/hierarchies/imodel/IModelHierarchyDefinition.js.map +1 -1
  28. package/lib/cjs/hierarchies/imodel/IModelHierarchyNode.d.ts +3 -3
  29. package/lib/cjs/hierarchies/imodel/IModelHierarchyNode.d.ts.map +1 -1
  30. package/lib/cjs/hierarchies/imodel/IModelHierarchyNode.js.map +1 -1
  31. package/lib/cjs/hierarchies/imodel/IModelHierarchyProvider.d.ts +4 -4
  32. package/lib/cjs/hierarchies/imodel/IModelHierarchyProvider.d.ts.map +1 -1
  33. package/lib/cjs/hierarchies/imodel/IModelHierarchyProvider.js +12 -12
  34. package/lib/cjs/hierarchies/imodel/IModelHierarchyProvider.js.map +1 -1
  35. package/lib/cjs/hierarchies/imodel/LimitingECSqlQueryExecutor.d.ts +1 -1
  36. package/lib/cjs/hierarchies/imodel/LimitingECSqlQueryExecutor.d.ts.map +1 -1
  37. package/lib/cjs/hierarchies/imodel/LimitingECSqlQueryExecutor.js.map +1 -1
  38. package/lib/cjs/hierarchies/imodel/NodeSelectQueryFactory.d.ts +3 -3
  39. package/lib/cjs/hierarchies/imodel/NodeSelectQueryFactory.d.ts.map +1 -1
  40. package/lib/cjs/hierarchies/imodel/NodeSelectQueryFactory.js +3 -3
  41. package/lib/cjs/hierarchies/imodel/NodeSelectQueryFactory.js.map +1 -1
  42. package/lib/cjs/hierarchies/imodel/PredicateBasedHierarchyDefinition.d.ts +4 -4
  43. package/lib/cjs/hierarchies/imodel/PredicateBasedHierarchyDefinition.d.ts.map +1 -1
  44. package/lib/cjs/hierarchies/imodel/PredicateBasedHierarchyDefinition.js.map +1 -1
  45. package/lib/cjs/hierarchies/imodel/SearchHierarchyDefinition.d.ts +4 -4
  46. package/lib/cjs/hierarchies/imodel/SearchHierarchyDefinition.d.ts.map +1 -1
  47. package/lib/cjs/hierarchies/imodel/SearchHierarchyDefinition.js +2 -2
  48. package/lib/cjs/hierarchies/imodel/SearchHierarchyDefinition.js.map +1 -1
  49. package/lib/cjs/hierarchies/imodel/TreeNodesReader.d.ts +7 -7
  50. package/lib/cjs/hierarchies/imodel/TreeNodesReader.d.ts.map +1 -1
  51. package/lib/cjs/hierarchies/imodel/TreeNodesReader.js +1 -2
  52. package/lib/cjs/hierarchies/imodel/TreeNodesReader.js.map +1 -1
  53. package/lib/cjs/hierarchies/imodel/Utils.d.ts +1 -1
  54. package/lib/cjs/hierarchies/imodel/Utils.d.ts.map +1 -1
  55. package/lib/cjs/hierarchies/imodel/Utils.js.map +1 -1
  56. package/lib/cjs/hierarchies/imodel/operators/DetermineChildren.d.ts +2 -2
  57. package/lib/cjs/hierarchies/imodel/operators/DetermineChildren.d.ts.map +1 -1
  58. package/lib/cjs/hierarchies/imodel/operators/DetermineChildren.js.map +1 -1
  59. package/lib/cjs/hierarchies/imodel/operators/Grouping.d.ts +5 -5
  60. package/lib/cjs/hierarchies/imodel/operators/Grouping.d.ts.map +1 -1
  61. package/lib/cjs/hierarchies/imodel/operators/Grouping.js.map +1 -1
  62. package/lib/cjs/hierarchies/imodel/operators/HideIfNoChildren.d.ts +1 -1
  63. package/lib/cjs/hierarchies/imodel/operators/HideIfNoChildren.d.ts.map +1 -1
  64. package/lib/cjs/hierarchies/imodel/operators/HideIfNoChildren.js.map +1 -1
  65. package/lib/cjs/hierarchies/imodel/operators/HideNodesInHierarchy.d.ts +1 -1
  66. package/lib/cjs/hierarchies/imodel/operators/HideNodesInHierarchy.d.ts.map +1 -1
  67. package/lib/cjs/hierarchies/imodel/operators/HideNodesInHierarchy.js.map +1 -1
  68. package/lib/cjs/hierarchies/imodel/operators/grouping/AutoExpand.d.ts +1 -1
  69. package/lib/cjs/hierarchies/imodel/operators/grouping/AutoExpand.d.ts.map +1 -1
  70. package/lib/cjs/hierarchies/imodel/operators/grouping/AutoExpand.js.map +1 -1
  71. package/lib/cjs/hierarchies/imodel/operators/grouping/BaseClassGrouping.d.ts +4 -4
  72. package/lib/cjs/hierarchies/imodel/operators/grouping/BaseClassGrouping.d.ts.map +1 -1
  73. package/lib/cjs/hierarchies/imodel/operators/grouping/BaseClassGrouping.js.map +1 -1
  74. package/lib/cjs/hierarchies/imodel/operators/grouping/ClassGrouping.d.ts +4 -4
  75. package/lib/cjs/hierarchies/imodel/operators/grouping/ClassGrouping.d.ts.map +1 -1
  76. package/lib/cjs/hierarchies/imodel/operators/grouping/ClassGrouping.js.map +1 -1
  77. package/lib/cjs/hierarchies/imodel/operators/grouping/GroupHiding.d.ts +1 -1
  78. package/lib/cjs/hierarchies/imodel/operators/grouping/GroupHiding.d.ts.map +1 -1
  79. package/lib/cjs/hierarchies/imodel/operators/grouping/GroupHiding.js.map +1 -1
  80. package/lib/cjs/hierarchies/imodel/operators/grouping/LabelGrouping.d.ts +2 -2
  81. package/lib/cjs/hierarchies/imodel/operators/grouping/LabelGrouping.d.ts.map +1 -1
  82. package/lib/cjs/hierarchies/imodel/operators/grouping/LabelGrouping.js.map +1 -1
  83. package/lib/cjs/hierarchies/imodel/operators/grouping/PropertiesGrouping.d.ts +4 -4
  84. package/lib/cjs/hierarchies/imodel/operators/grouping/PropertiesGrouping.d.ts.map +1 -1
  85. package/lib/cjs/hierarchies/imodel/operators/grouping/PropertiesGrouping.js +1 -1
  86. package/lib/cjs/hierarchies/imodel/operators/grouping/PropertiesGrouping.js.map +1 -1
  87. package/lib/cjs/hierarchies/imodel/operators/grouping/Shared.d.ts +2 -2
  88. package/lib/cjs/hierarchies/imodel/operators/grouping/Shared.d.ts.map +1 -1
  89. package/lib/cjs/hierarchies/imodel/operators/grouping/Shared.js.map +1 -1
  90. package/lib/cjs/hierarchies/internal/Common.d.ts +3 -3
  91. package/lib/cjs/hierarchies/internal/Common.d.ts.map +1 -1
  92. package/lib/cjs/hierarchies/internal/Common.js.map +1 -1
  93. package/lib/cjs/hierarchies/internal/EachValueFrom.d.ts +1 -1
  94. package/lib/cjs/hierarchies/internal/EachValueFrom.d.ts.map +1 -1
  95. package/lib/cjs/hierarchies/internal/EachValueFrom.js +2 -0
  96. package/lib/cjs/hierarchies/internal/EachValueFrom.js.map +1 -1
  97. package/lib/cjs/hierarchies/internal/LoggingUtils.d.ts +1 -1
  98. package/lib/cjs/hierarchies/internal/LoggingUtils.d.ts.map +1 -1
  99. package/lib/cjs/hierarchies/internal/LoggingUtils.js.map +1 -1
  100. package/lib/cjs/hierarchies/internal/RxjsHierarchyDefinition.d.ts +12 -5
  101. package/lib/cjs/hierarchies/internal/RxjsHierarchyDefinition.d.ts.map +1 -1
  102. package/lib/cjs/hierarchies/internal/RxjsHierarchyDefinition.js +2 -2
  103. package/lib/cjs/hierarchies/internal/RxjsHierarchyDefinition.js.map +1 -1
  104. package/lib/cjs/hierarchies/internal/SubscriptionScheduler.d.ts +1 -1
  105. package/lib/cjs/hierarchies/internal/SubscriptionScheduler.d.ts.map +1 -1
  106. package/lib/cjs/hierarchies/internal/SubscriptionScheduler.js.map +1 -1
  107. package/lib/cjs/hierarchies/internal/operators/Partition.d.ts +2 -1
  108. package/lib/cjs/hierarchies/internal/operators/Partition.d.ts.map +1 -1
  109. package/lib/cjs/hierarchies/internal/operators/Partition.js.map +1 -1
  110. package/lib/cjs/hierarchies/internal/operators/ReduceToMergeMap.d.ts +1 -1
  111. package/lib/cjs/hierarchies/internal/operators/ReduceToMergeMap.d.ts.map +1 -1
  112. package/lib/cjs/hierarchies/internal/operators/ReduceToMergeMap.js.map +1 -1
  113. package/lib/cjs/hierarchies/internal/operators/ReleaseMainThread.d.ts +1 -1
  114. package/lib/cjs/hierarchies/internal/operators/ReleaseMainThread.d.ts.map +1 -1
  115. package/lib/cjs/hierarchies/internal/operators/ReleaseMainThread.js.map +1 -1
  116. package/lib/cjs/hierarchies/internal/operators/ShareReplayWithErrors.d.ts +1 -1
  117. package/lib/cjs/hierarchies/internal/operators/ShareReplayWithErrors.d.ts.map +1 -1
  118. package/lib/cjs/hierarchies/internal/operators/ShareReplayWithErrors.js.map +1 -1
  119. package/lib/cjs/hierarchies/internal/operators/Sorting.d.ts +1 -1
  120. package/lib/cjs/hierarchies/internal/operators/Sorting.d.ts.map +1 -1
  121. package/lib/cjs/hierarchies/internal/operators/Sorting.js.map +1 -1
  122. package/lib/cjs/hierarchies/internal/operators/TapOnce.d.ts +1 -1
  123. package/lib/cjs/hierarchies/internal/operators/TapOnce.d.ts.map +1 -1
  124. package/lib/cjs/hierarchies/internal/operators/TapOnce.js.map +1 -1
  125. package/lib/cjs/presentation-hierarchies.d.ts +20 -10
  126. package/lib/cjs/presentation-hierarchies.d.ts.map +1 -1
  127. package/lib/cjs/presentation-hierarchies.js +3 -1
  128. package/lib/cjs/presentation-hierarchies.js.map +1 -1
  129. package/lib/esm/hierarchies/HierarchyMerge.d.ts +1 -1
  130. package/lib/esm/hierarchies/HierarchyMerge.d.ts.map +1 -1
  131. package/lib/esm/hierarchies/HierarchyMerge.js +1 -1
  132. package/lib/esm/hierarchies/HierarchyMerge.js.map +1 -1
  133. package/lib/esm/hierarchies/HierarchyNode.d.ts +4 -3
  134. package/lib/esm/hierarchies/HierarchyNode.d.ts.map +1 -1
  135. package/lib/esm/hierarchies/HierarchyNode.js +1 -1
  136. package/lib/esm/hierarchies/HierarchyNode.js.map +1 -1
  137. package/lib/esm/hierarchies/HierarchyNodeIdentifier.d.ts +1 -1
  138. package/lib/esm/hierarchies/HierarchyNodeIdentifier.d.ts.map +1 -1
  139. package/lib/esm/hierarchies/HierarchyNodeIdentifier.js.map +1 -1
  140. package/lib/esm/hierarchies/HierarchyProvider.d.ts +51 -8
  141. package/lib/esm/hierarchies/HierarchyProvider.d.ts.map +1 -1
  142. package/lib/esm/hierarchies/HierarchyProvider.js +52 -1
  143. package/lib/esm/hierarchies/HierarchyProvider.js.map +1 -1
  144. package/lib/esm/hierarchies/HierarchySearch.d.ts +5 -3
  145. package/lib/esm/hierarchies/HierarchySearch.d.ts.map +1 -1
  146. package/lib/esm/hierarchies/HierarchySearch.js.map +1 -1
  147. package/lib/esm/hierarchies/Logging.d.ts +1 -1
  148. package/lib/esm/hierarchies/Logging.d.ts.map +1 -1
  149. package/lib/esm/hierarchies/Logging.js.map +1 -1
  150. package/lib/esm/hierarchies/imodel/HierarchyCache.d.ts +1 -1
  151. package/lib/esm/hierarchies/imodel/HierarchyCache.d.ts.map +1 -1
  152. package/lib/esm/hierarchies/imodel/HierarchyCache.js.map +1 -1
  153. package/lib/esm/hierarchies/imodel/IModelHierarchyDefinition.d.ts +16 -6
  154. package/lib/esm/hierarchies/imodel/IModelHierarchyDefinition.d.ts.map +1 -1
  155. package/lib/esm/hierarchies/imodel/IModelHierarchyDefinition.js.map +1 -1
  156. package/lib/esm/hierarchies/imodel/IModelHierarchyNode.d.ts +3 -3
  157. package/lib/esm/hierarchies/imodel/IModelHierarchyNode.d.ts.map +1 -1
  158. package/lib/esm/hierarchies/imodel/IModelHierarchyNode.js.map +1 -1
  159. package/lib/esm/hierarchies/imodel/IModelHierarchyProvider.d.ts +4 -4
  160. package/lib/esm/hierarchies/imodel/IModelHierarchyProvider.d.ts.map +1 -1
  161. package/lib/esm/hierarchies/imodel/IModelHierarchyProvider.js +14 -14
  162. package/lib/esm/hierarchies/imodel/IModelHierarchyProvider.js.map +1 -1
  163. package/lib/esm/hierarchies/imodel/LimitingECSqlQueryExecutor.d.ts +1 -1
  164. package/lib/esm/hierarchies/imodel/LimitingECSqlQueryExecutor.d.ts.map +1 -1
  165. package/lib/esm/hierarchies/imodel/LimitingECSqlQueryExecutor.js +1 -1
  166. package/lib/esm/hierarchies/imodel/LimitingECSqlQueryExecutor.js.map +1 -1
  167. package/lib/esm/hierarchies/imodel/NodeSelectQueryFactory.d.ts +3 -3
  168. package/lib/esm/hierarchies/imodel/NodeSelectQueryFactory.d.ts.map +1 -1
  169. package/lib/esm/hierarchies/imodel/NodeSelectQueryFactory.js +5 -5
  170. package/lib/esm/hierarchies/imodel/NodeSelectQueryFactory.js.map +1 -1
  171. package/lib/esm/hierarchies/imodel/PredicateBasedHierarchyDefinition.d.ts +4 -4
  172. package/lib/esm/hierarchies/imodel/PredicateBasedHierarchyDefinition.d.ts.map +1 -1
  173. package/lib/esm/hierarchies/imodel/PredicateBasedHierarchyDefinition.js.map +1 -1
  174. package/lib/esm/hierarchies/imodel/SearchHierarchyDefinition.d.ts +4 -4
  175. package/lib/esm/hierarchies/imodel/SearchHierarchyDefinition.d.ts.map +1 -1
  176. package/lib/esm/hierarchies/imodel/SearchHierarchyDefinition.js +3 -3
  177. package/lib/esm/hierarchies/imodel/SearchHierarchyDefinition.js.map +1 -1
  178. package/lib/esm/hierarchies/imodel/TreeNodesReader.d.ts +7 -7
  179. package/lib/esm/hierarchies/imodel/TreeNodesReader.d.ts.map +1 -1
  180. package/lib/esm/hierarchies/imodel/TreeNodesReader.js +1 -2
  181. package/lib/esm/hierarchies/imodel/TreeNodesReader.js.map +1 -1
  182. package/lib/esm/hierarchies/imodel/Utils.d.ts +1 -1
  183. package/lib/esm/hierarchies/imodel/Utils.d.ts.map +1 -1
  184. package/lib/esm/hierarchies/imodel/Utils.js.map +1 -1
  185. package/lib/esm/hierarchies/imodel/operators/DetermineChildren.d.ts +2 -2
  186. package/lib/esm/hierarchies/imodel/operators/DetermineChildren.d.ts.map +1 -1
  187. package/lib/esm/hierarchies/imodel/operators/DetermineChildren.js.map +1 -1
  188. package/lib/esm/hierarchies/imodel/operators/Grouping.d.ts +5 -5
  189. package/lib/esm/hierarchies/imodel/operators/Grouping.d.ts.map +1 -1
  190. package/lib/esm/hierarchies/imodel/operators/Grouping.js.map +1 -1
  191. package/lib/esm/hierarchies/imodel/operators/HideIfNoChildren.d.ts +1 -1
  192. package/lib/esm/hierarchies/imodel/operators/HideIfNoChildren.d.ts.map +1 -1
  193. package/lib/esm/hierarchies/imodel/operators/HideIfNoChildren.js.map +1 -1
  194. package/lib/esm/hierarchies/imodel/operators/HideNodesInHierarchy.d.ts +1 -1
  195. package/lib/esm/hierarchies/imodel/operators/HideNodesInHierarchy.d.ts.map +1 -1
  196. package/lib/esm/hierarchies/imodel/operators/HideNodesInHierarchy.js.map +1 -1
  197. package/lib/esm/hierarchies/imodel/operators/grouping/AutoExpand.d.ts +1 -1
  198. package/lib/esm/hierarchies/imodel/operators/grouping/AutoExpand.d.ts.map +1 -1
  199. package/lib/esm/hierarchies/imodel/operators/grouping/AutoExpand.js.map +1 -1
  200. package/lib/esm/hierarchies/imodel/operators/grouping/BaseClassGrouping.d.ts +4 -4
  201. package/lib/esm/hierarchies/imodel/operators/grouping/BaseClassGrouping.d.ts.map +1 -1
  202. package/lib/esm/hierarchies/imodel/operators/grouping/BaseClassGrouping.js +1 -1
  203. package/lib/esm/hierarchies/imodel/operators/grouping/BaseClassGrouping.js.map +1 -1
  204. package/lib/esm/hierarchies/imodel/operators/grouping/ClassGrouping.d.ts +4 -4
  205. package/lib/esm/hierarchies/imodel/operators/grouping/ClassGrouping.d.ts.map +1 -1
  206. package/lib/esm/hierarchies/imodel/operators/grouping/ClassGrouping.js.map +1 -1
  207. package/lib/esm/hierarchies/imodel/operators/grouping/GroupHiding.d.ts +1 -1
  208. package/lib/esm/hierarchies/imodel/operators/grouping/GroupHiding.d.ts.map +1 -1
  209. package/lib/esm/hierarchies/imodel/operators/grouping/GroupHiding.js.map +1 -1
  210. package/lib/esm/hierarchies/imodel/operators/grouping/LabelGrouping.d.ts +2 -2
  211. package/lib/esm/hierarchies/imodel/operators/grouping/LabelGrouping.d.ts.map +1 -1
  212. package/lib/esm/hierarchies/imodel/operators/grouping/LabelGrouping.js.map +1 -1
  213. package/lib/esm/hierarchies/imodel/operators/grouping/PropertiesGrouping.d.ts +4 -4
  214. package/lib/esm/hierarchies/imodel/operators/grouping/PropertiesGrouping.d.ts.map +1 -1
  215. package/lib/esm/hierarchies/imodel/operators/grouping/PropertiesGrouping.js +1 -1
  216. package/lib/esm/hierarchies/imodel/operators/grouping/PropertiesGrouping.js.map +1 -1
  217. package/lib/esm/hierarchies/imodel/operators/grouping/Shared.d.ts +2 -2
  218. package/lib/esm/hierarchies/imodel/operators/grouping/Shared.d.ts.map +1 -1
  219. package/lib/esm/hierarchies/imodel/operators/grouping/Shared.js.map +1 -1
  220. package/lib/esm/hierarchies/internal/Common.d.ts +3 -3
  221. package/lib/esm/hierarchies/internal/Common.d.ts.map +1 -1
  222. package/lib/esm/hierarchies/internal/Common.js.map +1 -1
  223. package/lib/esm/hierarchies/internal/EachValueFrom.d.ts +1 -1
  224. package/lib/esm/hierarchies/internal/EachValueFrom.d.ts.map +1 -1
  225. package/lib/esm/hierarchies/internal/EachValueFrom.js +2 -0
  226. package/lib/esm/hierarchies/internal/EachValueFrom.js.map +1 -1
  227. package/lib/esm/hierarchies/internal/LoggingUtils.d.ts +1 -1
  228. package/lib/esm/hierarchies/internal/LoggingUtils.d.ts.map +1 -1
  229. package/lib/esm/hierarchies/internal/LoggingUtils.js.map +1 -1
  230. package/lib/esm/hierarchies/internal/RxjsHierarchyDefinition.d.ts +12 -5
  231. package/lib/esm/hierarchies/internal/RxjsHierarchyDefinition.d.ts.map +1 -1
  232. package/lib/esm/hierarchies/internal/RxjsHierarchyDefinition.js +2 -2
  233. package/lib/esm/hierarchies/internal/RxjsHierarchyDefinition.js.map +1 -1
  234. package/lib/esm/hierarchies/internal/SubscriptionScheduler.d.ts +1 -1
  235. package/lib/esm/hierarchies/internal/SubscriptionScheduler.d.ts.map +1 -1
  236. package/lib/esm/hierarchies/internal/SubscriptionScheduler.js.map +1 -1
  237. package/lib/esm/hierarchies/internal/operators/Partition.d.ts +2 -1
  238. package/lib/esm/hierarchies/internal/operators/Partition.d.ts.map +1 -1
  239. package/lib/esm/hierarchies/internal/operators/Partition.js.map +1 -1
  240. package/lib/esm/hierarchies/internal/operators/ReduceToMergeMap.d.ts +1 -1
  241. package/lib/esm/hierarchies/internal/operators/ReduceToMergeMap.d.ts.map +1 -1
  242. package/lib/esm/hierarchies/internal/operators/ReduceToMergeMap.js.map +1 -1
  243. package/lib/esm/hierarchies/internal/operators/ReleaseMainThread.d.ts +1 -1
  244. package/lib/esm/hierarchies/internal/operators/ReleaseMainThread.d.ts.map +1 -1
  245. package/lib/esm/hierarchies/internal/operators/ReleaseMainThread.js.map +1 -1
  246. package/lib/esm/hierarchies/internal/operators/ShareReplayWithErrors.d.ts +1 -1
  247. package/lib/esm/hierarchies/internal/operators/ShareReplayWithErrors.d.ts.map +1 -1
  248. package/lib/esm/hierarchies/internal/operators/ShareReplayWithErrors.js.map +1 -1
  249. package/lib/esm/hierarchies/internal/operators/Sorting.d.ts +1 -1
  250. package/lib/esm/hierarchies/internal/operators/Sorting.d.ts.map +1 -1
  251. package/lib/esm/hierarchies/internal/operators/Sorting.js.map +1 -1
  252. package/lib/esm/hierarchies/internal/operators/TapOnce.d.ts +1 -1
  253. package/lib/esm/hierarchies/internal/operators/TapOnce.d.ts.map +1 -1
  254. package/lib/esm/hierarchies/internal/operators/TapOnce.js.map +1 -1
  255. package/lib/esm/presentation-hierarchies.d.ts +20 -10
  256. package/lib/esm/presentation-hierarchies.d.ts.map +1 -1
  257. package/lib/esm/presentation-hierarchies.js +4 -3
  258. package/lib/esm/presentation-hierarchies.js.map +1 -1
  259. package/package.json +7 -7
@@ -1 +1 @@
1
- {"version":3,"file":"Partition.js","sourceRoot":"","sources":["../../../../../src/hierarchies/internal/operators/Partition.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;AAchG,8BA+CC;AA3DD,+BAAsF;AACtF,sDAA6C;AAO7C;;;GAGG;AACH,SAAgB,SAAS,CAAI,MAA0B,EAAE,SAAgC;IACvF,MAAM,OAAO,GAAG,IAAI,oBAAa,EAAK,CAAC;IACvC,MAAM,UAAU,GAAG,IAAI,oBAAa,EAAK,CAAC;IAC1C,IAAI,kBAA4C,CAAC;IACjD,IAAI,wBAAwB,GAAG,CAAC,CAAC;IACjC,SAAS,iBAAiB;QACxB,IAAI,wBAAwB,EAAE,GAAG,CAAC,EAAE,CAAC;YACnC,OAAO;QACT,CAAC;QACD,IAAA,qBAAM,EAAC,CAAC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AC","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 { from, Observable, ObservableInput, ReplaySubject, Subscription } from \"rxjs\";\nimport { assert } from \"@itwin/core-bentley\";\n\n/** @internal */\nexport function partition<T, U extends T>(source: ObservableInput<T>, predicate: (value: T) => value is U): [Observable<U>, Observable<Exclude<T, U>>];\n/** @internal */\nexport function partition<T>(source: ObservableInput<T>, predicate: (value: T) => boolean): [Observable<T>, Observable<T>];\n\n/**\n * This is similar to `rxjs` `partition` operator, but it subscribes to source observable only once.\n * @internal\n */\nexport function partition<T>(source: ObservableInput<T>, predicate: (value: T) => boolean): [Observable<T>, Observable<T>] {\n const matches = new ReplaySubject<T>();\n const nonMatches = new ReplaySubject<T>();\n let sourceSubscription: Subscription | undefined;\n let sourceSubscriptionsCount = 0;\n function subscribeToSource() {\n if (sourceSubscriptionsCount++ > 0) {\n return;\n }\n assert(!sourceSubscription);\n sourceSubscription = from(source).subscribe({\n next(value) {\n if (predicate(value)) {\n matches.next(value);\n } else {\n nonMatches.next(value);\n }\n },\n error(error) {\n matches.error(error);\n nonMatches.error(error);\n },\n complete() {\n matches.complete();\n nonMatches.complete();\n },\n });\n }\n function unsubscribeFromSource() {\n assert(sourceSubscriptionsCount > 0);\n if (--sourceSubscriptionsCount === 0) {\n assert(!!sourceSubscription);\n sourceSubscription.unsubscribe();\n sourceSubscription = undefined;\n }\n }\n return [matches, nonMatches].map(\n (subject) =>\n new Observable((subscriber) => {\n const subjectSubscription = subject.subscribe(subscriber);\n subscribeToSource();\n return () => {\n subjectSubscription.unsubscribe();\n unsubscribeFromSource();\n };\n }),\n ) as [Observable<T>, Observable<T>];\n}\n"]}
1
+ {"version":3,"file":"Partition.js","sourceRoot":"","sources":["../../../../../src/hierarchies/internal/operators/Partition.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;AAgBhG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IACH,CAAC;IACD,OAAO,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC,GAAG,CAC9B,CAAC,OAAO,EAAE,EAAE,CACV,IAAI,iBAAU,CAAC,CAAC,UAAU,EAAE,EAAE;QAC5B,MAAM,mBAAmB,GAAG,OAAO,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QAC1D,iBAAiB,EAAE,CAAC;QACpB,OAAO,GAAG,EAAE;YACV,mBAAmB,CAAC,WAAW,EAAE,CAAC;YAClC,qBAAqB,EAAE,CAAC;QAC1B,CAAC,CAAC;IACJ,CAAC,CAAC,CAC6B,CAAC;AACtC,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 { from, Observable, ReplaySubject } from \"rxjs\";\nimport { assert } from \"@itwin/core-bentley\";\n\nimport type { ObservableInput, Subscription } from \"rxjs\";\n\n/** @internal */\nexport function partition<T, U extends T>(source: ObservableInput<T>, predicate: (value: T) => value is U): [Observable<U>, Observable<Exclude<T, U>>];\n/** @internal */\nexport function partition<T>(source: ObservableInput<T>, predicate: (value: T) => boolean): [Observable<T>, Observable<T>];\n\n/**\n * This is similar to `rxjs` `partition` operator, but it subscribes to source observable only once.\n * @internal\n */\nexport function partition<T>(source: ObservableInput<T>, predicate: (value: T) => boolean): [Observable<T>, Observable<T>] {\n const matches = new ReplaySubject<T>();\n const nonMatches = new ReplaySubject<T>();\n let sourceSubscription: Subscription | undefined;\n let sourceSubscriptionsCount = 0;\n function subscribeToSource() {\n if (sourceSubscriptionsCount++ > 0) {\n return;\n }\n assert(!sourceSubscription);\n sourceSubscription = from(source).subscribe({\n next(value) {\n if (predicate(value)) {\n matches.next(value);\n } else {\n nonMatches.next(value);\n }\n },\n error(error) {\n matches.error(error);\n nonMatches.error(error);\n },\n complete() {\n matches.complete();\n nonMatches.complete();\n },\n });\n }\n function unsubscribeFromSource() {\n assert(sourceSubscriptionsCount > 0);\n if (--sourceSubscriptionsCount === 0) {\n assert(!!sourceSubscription);\n sourceSubscription.unsubscribe();\n sourceSubscription = undefined;\n }\n }\n return [matches, nonMatches].map(\n (subject) =>\n new Observable((subscriber) => {\n const subjectSubscription = subject.subscribe(subscriber);\n subscribeToSource();\n return () => {\n subjectSubscription.unsubscribe();\n unsubscribeFromSource();\n };\n }),\n ) as [Observable<T>, Observable<T>];\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { ObservableInput } from "rxjs";
1
+ import type { ObservableInput } from "rxjs";
2
2
  /**
3
3
  * Reduces the source observable into a `Map<string, TMapItem[]>`, where all input items are grouped based on their key
4
4
  * and placed into arrays.
@@ -1 +1 @@
1
- {"version":3,"file":"ReduceToMergeMap.d.ts","sourceRoot":"","sources":["../../../../../src/hierarchies/internal/operators/ReduceToMergeMap.ts"],"names":[],"mappings":"AAKA,OAAO,EAAQ,eAAe,EAAU,MAAM,MAAM,CAAC;AAErD;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,MAAM,EAAE,KAAK,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,QAAQ,gGAQrI;AAED;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,QAAQ,EACxD,GAAG,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,MAAM,EAClC,SAAS,EAAE,CAAC,UAAU,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,GAAG,SAAS,KAAK,QAAQ,YAE/D,eAAe,CAAC,WAAW,CAAC,sDAa7C"}
1
+ {"version":3,"file":"ReduceToMergeMap.d.ts","sourceRoot":"","sources":["../../../../../src/hierarchies/internal/operators/ReduceToMergeMap.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AAE5C;;;;;;;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A0B;YAC1B,SAAS,GAAG,IAAI,GAAG,EAAE,CAAC;QACxB,CAAC;QACD,MAAM,QAAQ,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC;QAC3B,SAAS,CAAC,GAAG,CAAC,QAAQ,EAAE,SAAS,CAAC,IAAI,EAAE,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;QAClE,OAAO,SAAS,CAAC;IACnB,CAAC,EAAE,SAAS,CAAC,CACd,CAAC;AACN,CAAC;AACD,MAAM,SAAS,GAAG,IAAI,GAAG,EAAE,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 { from, ObservableInput, reduce } from \"rxjs\";\n\n/**\n * Reduces the source observable into a `Map<string, TMapItem[]>`, where all input items are grouped based on their key\n * and placed into arrays.\n *\n * @param key A function to calculate map key for the item.\n * @param value A function to calculate entry value for the item.\n *\n * @internal\n */\nexport function reduceToMergeMapList<TSourceItem, TMapItem>(key: (item: TSourceItem) => string, value: (item: TSourceItem) => TMapItem) {\n return reduceToMergeMapItem<TSourceItem, TMapItem[]>(key, (item, list) => {\n if (!list) {\n list = [];\n }\n list.push(value(item));\n return list;\n });\n}\n\n/**\n * Reduces the source observable into a `Map<string, TMapItem>`, where all input items are grouped based on their key\n * and merged into a single value using provided merge function.\n *\n * @param key A function to calculate map key for the item.\n * @param value A function to create map value using the _current_ item and an item already _existing_ in the map with the same key.\n *\n * @internal\n */\nexport function reduceToMergeMapItem<TSourceItem, TMapItem>(\n key: (item: TSourceItem) => string,\n mergeFunc: (sourceItem: TSourceItem, mapItem: TMapItem | undefined) => TMapItem,\n) {\n return (source: ObservableInput<TSourceItem>) =>\n from(source).pipe(\n reduce<TSourceItem, Map<string, TMapItem>>((mergedMap, item) => {\n if (mergedMap === EMPTY_MAP) {\n // this helps us avoid creating an empty map for cases when source observable\n // doesn't emit any values\n mergedMap = new Map();\n }\n const mergeKey = key(item);\n mergedMap.set(mergeKey, mergeFunc(item, mergedMap.get(mergeKey)));\n return mergedMap;\n }, EMPTY_MAP),\n );\n}\nconst EMPTY_MAP = new Map();\n"]}
1
+ {"version":3,"file":"ReduceToMergeMap.js","sourceRoot":"","sources":["../../../../../src/hierarchies/internal/operators/ReduceToMergeMap.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;AAehG,oDAQC;AAWD,oDAiBC;AAjDD,+BAAoC;AAIpC;;;;;;;;GAQG;AACH,SAAgB,oBAAoB,CAAwB,GAAkC,EAAE,KAAsC;IACpI,OAAO,oBAAoB,CAA0B,GAAG,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE;QACvE,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,IAAI,GAAG,EAAE,CAAC;QACZ,CAAC;QACD,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;QACvB,OAAO,IAAI,CAAC;IACd,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;GAQG;AACH,SAAgB,oBAAoB,CAClC,GAAkC,EAClC,SAA+E;IAE/E,OAAO,CAAC,MAAoC,EAAE,EAAE,CAC9C,IAAA,WAAI,EAAC,MAAM,CAAC,CAAC,IAAI,CACf,IAAA,aAAM,EAAqC,CAAC,SAAS,EAAE,IAAI,EAAE,EAAE;QAC7D,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;YAC5B,6EAA6E;YAC7E,0BAA0B;YAC1B,SAAS,GAAG,IAAI,GAAG,EAAE,CAAC;QACxB,CAAC;QACD,MAAM,QAAQ,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC;QAC3B,SAAS,CAAC,GAAG,CAAC,QAAQ,EAAE,SAAS,CAAC,IAAI,EAAE,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;QAClE,OAAO,SAAS,CAAC;IACnB,CAAC,EAAE,SAAS,CAAC,CACd,CAAC;AACN,CAAC;AACD,MAAM,SAAS,GAAG,IAAI,GAAG,EAAE,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 { from, reduce } from \"rxjs\";\n\nimport type { ObservableInput } from \"rxjs\";\n\n/**\n * Reduces the source observable into a `Map<string, TMapItem[]>`, where all input items are grouped based on their key\n * and placed into arrays.\n *\n * @param key A function to calculate map key for the item.\n * @param value A function to calculate entry value for the item.\n *\n * @internal\n */\nexport function reduceToMergeMapList<TSourceItem, TMapItem>(key: (item: TSourceItem) => string, value: (item: TSourceItem) => TMapItem) {\n return reduceToMergeMapItem<TSourceItem, TMapItem[]>(key, (item, list) => {\n if (!list) {\n list = [];\n }\n list.push(value(item));\n return list;\n });\n}\n\n/**\n * Reduces the source observable into a `Map<string, TMapItem>`, where all input items are grouped based on their key\n * and merged into a single value using provided merge function.\n *\n * @param key A function to calculate map key for the item.\n * @param value A function to create map value using the _current_ item and an item already _existing_ in the map with the same key.\n *\n * @internal\n */\nexport function reduceToMergeMapItem<TSourceItem, TMapItem>(\n key: (item: TSourceItem) => string,\n mergeFunc: (sourceItem: TSourceItem, mapItem: TMapItem | undefined) => TMapItem,\n) {\n return (source: ObservableInput<TSourceItem>) =>\n from(source).pipe(\n reduce<TSourceItem, Map<string, TMapItem>>((mergedMap, item) => {\n if (mergedMap === EMPTY_MAP) {\n // this helps us avoid creating an empty map for cases when source observable\n // doesn't emit any values\n mergedMap = new Map();\n }\n const mergeKey = key(item);\n mergedMap.set(mergeKey, mergeFunc(item, mergedMap.get(mergeKey)));\n return mergedMap;\n }, EMPTY_MAP),\n );\n}\nconst EMPTY_MAP = new Map();\n"]}
@@ -1,4 +1,4 @@
1
- import { Observable } from "rxjs";
1
+ import type { Observable } from "rxjs";
2
2
  /**
3
3
  * Emits a certain amount of values, then releases the main thread for other timers to use.
4
4
  * @internal
@@ -1 +1 @@
1
- {"version":3,"file":"ReleaseMainThread.d.ts","sourceRoot":"","sources":["../../../../../src/hierarchies/internal/operators/ReleaseMainThread.ts"],"names":[],"mappings":"AAKA,OAAO,EAA4C,UAAU,EAAM,MAAM,MAAM,CAAC;AAEhF;;;GAGG;AACH,wBAAgB,6BAA6B,CAAC,CAAC,EAAE,YAAY,EAAE,MAAM,SACtD,UAAU,CAAC,CAAC,CAAC,KAAG,UAAU,CAAC,CAAC,CAAC,CAa3C"}
1
+ {"version":3,"file":"ReleaseMainThread.d.ts","sourceRoot":"","sources":["../../../../../src/hierarchies/internal/operators/ReleaseMainThread.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAEvC;;;GAGG;AACH,wBAAgB,6BAA6B,CAAC,CAAC,EAAE,YAAY,EAAE,MAAM,SACtD,UAAU,CAAC,CAAC,CAAC,KAAG,UAAU,CAAC,CAAC,CAAC,CAa3C"}
@@ -1 +1 @@
1
- {"version":3,"file":"ReleaseMainThread.js","sourceRoot":"","sources":["../../../../../src/hierarchies/internal/operators/ReleaseMainThread.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;AAQhG,sEAcC;AApBD,+BAAgF;AAEhF;;;GAGG;AACH,SAAgB,6BAA6B,CAAI,YAAoB;IACnE,OAAO,CAAC,GAAkB,EAAiB,EAAE;QAC3C,OAAO,GAAG,CAAC,IAAI,CACb,IAAA,kBAAW,EAAC,YAAY,CAAC,EACzB,IAAA,gBAAS,EAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE;YACpB,MAAM,GAAG,GAAG,IAAA,SAAE,EAAC,IAAI,CAAC,CAAC;YACrB,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,MAAM,GAAG,YAAY,EAAE,CAAC;gBAC1C,OAAO,GAAG,CAAC;YACb,CAAC;YACD,OAAO,GAAG,CAAC,IAAI,CAAC,IAAA,YAAK,EAAC,CAAC,CAAC,CAAC,CAAC;QAC5B,CAAC,CAAC,EACF,IAAA,gBAAS,GAAE,CACZ,CAAC;IACJ,CAAC,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 { bufferCount, concatAll, concatMap, delay, Observable, of } from \"rxjs\";\n\n/**\n * Emits a certain amount of values, then releases the main thread for other timers to use.\n * @internal\n */\nexport function releaseMainThreadOnItemsCount<T>(elementCount: number) {\n return (obs: Observable<T>): Observable<T> => {\n return obs.pipe(\n bufferCount(elementCount),\n concatMap((buff, i) => {\n const out = of(buff);\n if (i === 0 && buff.length < elementCount) {\n return out;\n }\n return out.pipe(delay(0));\n }),\n concatAll(),\n );\n };\n}\n"]}
1
+ {"version":3,"file":"ReleaseMainThread.js","sourceRoot":"","sources":["../../../../../src/hierarchies/internal/operators/ReleaseMainThread.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;AAUhG,sEAcC;AAtBD,+BAAoE;AAIpE;;;GAGG;AACH,SAAgB,6BAA6B,CAAI,YAAoB;IACnE,OAAO,CAAC,GAAkB,EAAiB,EAAE;QAC3C,OAAO,GAAG,CAAC,IAAI,CACb,IAAA,kBAAW,EAAC,YAAY,CAAC,EACzB,IAAA,gBAAS,EAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE;YACpB,MAAM,GAAG,GAAG,IAAA,SAAE,EAAC,IAAI,CAAC,CAAC;YACrB,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,MAAM,GAAG,YAAY,EAAE,CAAC;gBAC1C,OAAO,GAAG,CAAC;YACb,CAAC;YACD,OAAO,GAAG,CAAC,IAAI,CAAC,IAAA,YAAK,EAAC,CAAC,CAAC,CAAC,CAAC;QAC5B,CAAC,CAAC,EACF,IAAA,gBAAS,GAAE,CACZ,CAAC;IACJ,CAAC,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 { bufferCount, concatAll, concatMap, delay, of } from \"rxjs\";\n\nimport type { Observable } from \"rxjs\";\n\n/**\n * Emits a certain amount of values, then releases the main thread for other timers to use.\n * @internal\n */\nexport function releaseMainThreadOnItemsCount<T>(elementCount: number) {\n return (obs: Observable<T>): Observable<T> => {\n return obs.pipe(\n bufferCount(elementCount),\n concatMap((buff, i) => {\n const out = of(buff);\n if (i === 0 && buff.length < elementCount) {\n return out;\n }\n return out.pipe(delay(0));\n }),\n concatAll(),\n );\n };\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { MonoTypeOperatorFunction } from "rxjs";
1
+ import type { MonoTypeOperatorFunction } from "rxjs";
2
2
  /**
3
3
  * This is doing exactly the same as the standard `shareReplay` from `rxjs`, except that
4
4
  * source is not retried on error.
@@ -1 +1 @@
1
- {"version":3,"file":"ShareReplayWithErrors.d.ts","sourceRoot":"","sources":["../../../../../src/hierarchies/internal/operators/ShareReplayWithErrors.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,wBAAwB,EAAwB,MAAM,MAAM,CAAC;AAEtE;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,KAAK,wBAAwB,CAAC,CAAC,CAAC,CAOtE"}
1
+ {"version":3,"file":"ShareReplayWithErrors.d.ts","sourceRoot":"","sources":["../../../../../src/hierarchies/internal/operators/ShareReplayWithErrors.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,MAAM,CAAC;AAErD;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,KAAK,wBAAwB,CAAC,CAAC,CAAC,CAOtE"}
@@ -1 +1 @@
1
- {"version":3,"file":"ShareReplayWithErrors.js","sourceRoot":"","sources":["../../../../../src/hierarchies/internal/operators/ShareReplayWithErrors.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;AAUhG,sDAOC;AAfD,+BAAsE;AAEtE;;;;;GAKG;AACH,SAAgB,qBAAqB;IACnC,OAAO,IAAA,YAAK,EAAI;QACd,SAAS,EAAE,GAAG,EAAE,CAAC,IAAI,oBAAa,EAAE;QACpC,YAAY,EAAE,KAAK;QACnB,eAAe,EAAE,KAAK;QACtB,mBAAmB,EAAE,KAAK;KAC3B,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 { MonoTypeOperatorFunction, ReplaySubject, share } from \"rxjs\";\n\n/**\n * This is doing exactly the same as the standard `shareReplay` from `rxjs`, except that\n * source is not retried on error.\n *\n * @internal\n */\nexport function shareReplayWithErrors<T>(): MonoTypeOperatorFunction<T> {\n return share<T>({\n connector: () => new ReplaySubject(),\n resetOnError: false,\n resetOnComplete: false,\n resetOnRefCountZero: false,\n });\n}\n"]}
1
+ {"version":3,"file":"ShareReplayWithErrors.js","sourceRoot":"","sources":["../../../../../src/hierarchies/internal/operators/ShareReplayWithErrors.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;AAYhG,sDAOC;AAjBD,+BAA4C;AAI5C;;;;;GAKG;AACH,SAAgB,qBAAqB;IACnC,OAAO,IAAA,YAAK,EAAI;QACd,SAAS,EAAE,GAAG,EAAE,CAAC,IAAI,oBAAa,EAAE;QACpC,YAAY,EAAE,KAAK;QACnB,eAAe,EAAE,KAAK;QACtB,mBAAmB,EAAE,KAAK;KAC3B,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 { ReplaySubject, share } from \"rxjs\";\n\nimport type { MonoTypeOperatorFunction } from \"rxjs\";\n\n/**\n * This is doing exactly the same as the standard `shareReplay` from `rxjs`, except that\n * source is not retried on error.\n *\n * @internal\n */\nexport function shareReplayWithErrors<T>(): MonoTypeOperatorFunction<T> {\n return share<T>({\n connector: () => new ReplaySubject(),\n resetOnError: false,\n resetOnComplete: false,\n resetOnRefCountZero: false,\n });\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { Observable } from "rxjs";
1
+ import type { Observable } from "rxjs";
2
2
  /**
3
3
  * This should accept sorting params in some form:
4
4
  * - is sorting disabled?
@@ -1 +1 @@
1
- {"version":3,"file":"Sorting.d.ts","sourceRoot":"","sources":["../../../../../src/hierarchies/internal/operators/Sorting.ts"],"names":[],"mappings":"AAKA,OAAO,EAAkB,UAAU,EAAU,MAAM,MAAM,CAAC;AAI1D;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,SAAS;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,EAAE,KAAK,EAAE,UAAU,CAAC,KAAK,CAAC,GAAG,UAAU,CAAC,KAAK,CAAC,CAYrH"}
1
+ {"version":3,"file":"Sorting.d.ts","sourceRoot":"","sources":["../../../../../src/hierarchies/internal/operators/Sorting.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAEvC;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,SAAS;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,EAAE,KAAK,EAAE,UAAU,CAAC,KAAK,CAAC,GAAG,UAAU,CAAC,KAAK,CAAC,CAYrH"}
@@ -1 +1 @@
1
- {"version":3,"file":"Sorting.js","sourceRoot":"","sources":["../../../../../src/hierarchies/internal/operators/Sorting.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;AAchG,4DAYC;AAxBD,+BAA0D;AAC1D,sDAAmE;AACnE,4CAAmD;AAEnD;;;;;;;GAOG;AACH,SAAgB,wBAAwB,CAAkC,KAAwB;IAChG,OAAO,KAAK,CAAC,IAAI,CACf,IAAA,aAAM,EACJ,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE;QACf,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACpB,OAAO,MAAM,CAAC;IAChB,CAAC,EACD,IAAI,0BAAW,CAAQ,+BAAmB,EAAE,8BAAe,CAAC,KAAK,CAAC,CACnE,EACD,IAAA,UAAG,EAAC,CAAC,WAAW,EAAE,EAAE,CAAC,WAAW,CAAC,YAAY,EAAE,CAAC,EAChD,IAAA,gBAAS,GAAE,CACZ,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 { concatAll, map, Observable, reduce } from \"rxjs\";\nimport { DuplicatePolicy, SortedArray } from \"@itwin/core-bentley\";\nimport { compareNodesByLabel } from \"../Common.js\";\n\n/**\n * This should accept sorting params in some form:\n * - is sorting disabled?\n * - are we sorting by label or some property value, in case of the latter - how do we get the value?\n *\n * @note Nodes with same labels are returned in undefined order.\n * @internal\n */\nexport function sortNodesByLabelOperator<TNode extends { label: string }>(nodes: Observable<TNode>): Observable<TNode> {\n return nodes.pipe(\n reduce(\n (sorted, node) => {\n sorted.insert(node);\n return sorted;\n },\n new SortedArray<TNode>(compareNodesByLabel, DuplicatePolicy.Allow),\n ),\n map((sortedArray) => sortedArray.extractArray()),\n concatAll(),\n );\n}\n"]}
1
+ {"version":3,"file":"Sorting.js","sourceRoot":"","sources":["../../../../../src/hierarchies/internal/operators/Sorting.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;AAgBhG,4DAYC;AA1BD,+BAA8C;AAC9C,sDAAmE;AACnE,4CAAmD;AAInD;;;;;;;GAOG;AACH,SAAgB,wBAAwB,CAAkC,KAAwB;IAChG,OAAO,KAAK,CAAC,IAAI,CACf,IAAA,aAAM,EACJ,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE;QACf,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACpB,OAAO,MAAM,CAAC;IAChB,CAAC,EACD,IAAI,0BAAW,CAAQ,+BAAmB,EAAE,8BAAe,CAAC,KAAK,CAAC,CACnE,EACD,IAAA,UAAG,EAAC,CAAC,WAAW,EAAE,EAAE,CAAC,WAAW,CAAC,YAAY,EAAE,CAAC,EAChD,IAAA,gBAAS,GAAE,CACZ,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 { concatAll, map, reduce } from \"rxjs\";\nimport { DuplicatePolicy, SortedArray } from \"@itwin/core-bentley\";\nimport { compareNodesByLabel } from \"../Common.js\";\n\nimport type { Observable } from \"rxjs\";\n\n/**\n * This should accept sorting params in some form:\n * - is sorting disabled?\n * - are we sorting by label or some property value, in case of the latter - how do we get the value?\n *\n * @note Nodes with same labels are returned in undefined order.\n * @internal\n */\nexport function sortNodesByLabelOperator<TNode extends { label: string }>(nodes: Observable<TNode>): Observable<TNode> {\n return nodes.pipe(\n reduce(\n (sorted, node) => {\n sorted.insert(node);\n return sorted;\n },\n new SortedArray<TNode>(compareNodesByLabel, DuplicatePolicy.Allow),\n ),\n map((sortedArray) => sortedArray.extractArray()),\n concatAll(),\n );\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { MonoTypeOperatorFunction } from "rxjs";
1
+ import type { MonoTypeOperatorFunction } from "rxjs";
2
2
  /** @internal */
3
3
  export declare function tapOnce<T>(observer: () => void): MonoTypeOperatorFunction<T>;
4
4
  //# sourceMappingURL=TapOnce.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TapOnce.d.ts","sourceRoot":"","sources":["../../../../../src/hierarchies/internal/operators/TapOnce.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,wBAAwB,EAAO,MAAM,MAAM,CAAC;AAErD,gBAAgB;AAChB,wBAAgB,OAAO,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,IAAI,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAW5E"}
1
+ {"version":3,"file":"TapOnce.d.ts","sourceRoot":"","sources":["../../../../../src/hierarchies/internal/operators/TapOnce.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,MAAM,CAAC;AAErD,gBAAgB;AAChB,wBAAgB,OAAO,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,IAAI,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAW5E"}
@@ -1 +1 @@
1
- {"version":3,"file":"TapOnce.js","sourceRoot":"","sources":["../../../../../src/hierarchies/internal/operators/TapOnce.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;AAKhG,0BAWC;AAdD,+BAAqD;AAErD,gBAAgB;AAChB,SAAgB,OAAO,CAAI,QAAoB;IAC7C,IAAI,KAAK,GAAG,IAAI,CAAC;IACjB,OAAO,CAAC,MAAM,EAAE,EAAE,CAChB,MAAM,CAAC,IAAI,CACT,IAAA,UAAG,EAAC,GAAG,EAAE;QACP,IAAI,KAAK,EAAE,CAAC;YACV,KAAK,GAAG,KAAK,CAAC;YACd,QAAQ,EAAE,CAAC;QACb,CAAC;IACH,CAAC,CAAC,CACH,CAAC;AACN,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 { MonoTypeOperatorFunction, tap } from \"rxjs\";\n\n/** @internal */\nexport function tapOnce<T>(observer: () => void): MonoTypeOperatorFunction<T> {\n let first = true;\n return (source) =>\n source.pipe(\n tap(() => {\n if (first) {\n first = false;\n observer();\n }\n }),\n );\n}\n"]}
1
+ {"version":3,"file":"TapOnce.js","sourceRoot":"","sources":["../../../../../src/hierarchies/internal/operators/TapOnce.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;AAOhG,0BAWC;AAhBD,+BAA2B;AAI3B,gBAAgB;AAChB,SAAgB,OAAO,CAAI,QAAoB;IAC7C,IAAI,KAAK,GAAG,IAAI,CAAC;IACjB,OAAO,CAAC,MAAM,EAAE,EAAE,CAChB,MAAM,CAAC,IAAI,CACT,IAAA,UAAG,EAAC,GAAG,EAAE;QACP,IAAI,KAAK,EAAE,CAAC;YACV,KAAK,GAAG,KAAK,CAAC;YACd,QAAQ,EAAE,CAAC;QACb,CAAC;IACH,CAAC,CAAC,CACH,CAAC;AACN,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 { tap } from \"rxjs\";\n\nimport type { MonoTypeOperatorFunction } from \"rxjs\";\n\n/** @internal */\nexport function tapOnce<T>(observer: () => void): MonoTypeOperatorFunction<T> {\n let first = true;\n return (source) =>\n source.pipe(\n tap(() => {\n if (first) {\n first = false;\n observer();\n }\n }),\n );\n}\n"]}
@@ -1,16 +1,26 @@
1
1
  export { GenericInstanceFilter } from "@itwin/core-common";
2
- export { DefineHierarchyLevelProps, HierarchyLevelDefinition, HierarchyDefinition, HierarchyNodesDefinition, NodeParser, NodePostProcessor, NodePreProcessor, } from "./hierarchies/imodel/IModelHierarchyDefinition.js";
3
- export { DefineGenericNodeChildHierarchyLevelProps, DefineInstanceNodeChildHierarchyLevelProps, DefineRootHierarchyLevelProps, createPredicateBasedHierarchyDefinition, } from "./hierarchies/imodel/PredicateBasedHierarchyDefinition.js";
4
- export { LimitingECSqlQueryExecutor, createLimitingECSqlQueryExecutor } from "./hierarchies/imodel/LimitingECSqlQueryExecutor.js";
5
- export { NodeSelectClauseColumnNames, NodesQueryClauseFactory, createNodesQueryClauseFactory } from "./hierarchies/imodel/NodeSelectQueryFactory.js";
2
+ export type { DefineHierarchyLevelProps, HierarchyLevelDefinition, HierarchyDefinition, NodeParser, NodePostProcessor, NodePreProcessor, } from "./hierarchies/imodel/IModelHierarchyDefinition.js";
3
+ export { HierarchyNodesDefinition } from "./hierarchies/imodel/IModelHierarchyDefinition.js";
4
+ export type { DefineGenericNodeChildHierarchyLevelProps, DefineInstanceNodeChildHierarchyLevelProps, DefineRootHierarchyLevelProps, } from "./hierarchies/imodel/PredicateBasedHierarchyDefinition.js";
5
+ export { createPredicateBasedHierarchyDefinition } from "./hierarchies/imodel/PredicateBasedHierarchyDefinition.js";
6
+ export type { LimitingECSqlQueryExecutor } from "./hierarchies/imodel/LimitingECSqlQueryExecutor.js";
7
+ export { createLimitingECSqlQueryExecutor } from "./hierarchies/imodel/LimitingECSqlQueryExecutor.js";
8
+ export type { NodesQueryClauseFactory } from "./hierarchies/imodel/NodeSelectQueryFactory.js";
9
+ export { NodeSelectClauseColumnNames, createNodesQueryClauseFactory } from "./hierarchies/imodel/NodeSelectQueryFactory.js";
6
10
  export { createIModelHierarchyProvider, createMergedIModelHierarchyProvider } from "./hierarchies/imodel/IModelHierarchyProvider.js";
7
- export { SourceHierarchyNode, ProcessedHierarchyNode } from "./hierarchies/imodel/IModelHierarchyNode.js";
11
+ export type { SourceHierarchyNode } from "./hierarchies/imodel/IModelHierarchyNode.js";
12
+ export { ProcessedHierarchyNode } from "./hierarchies/imodel/IModelHierarchyNode.js";
8
13
  export { RowsLimitExceededError } from "./hierarchies/HierarchyErrors.js";
9
- export { GroupingHierarchyNode, HierarchyNode, NonGroupingHierarchyNode } from "./hierarchies/HierarchyNode.js";
10
- export { HierarchyNodeIdentifier, HierarchyNodeIdentifiersPath } from "./hierarchies/HierarchyNodeIdentifier.js";
11
- export { GenericNodeKey, GroupingNodeKey, HierarchyNodeKey, IModelInstanceKey, InstancesNodeKey, ClassGroupingNodeKey, LabelGroupingNodeKey, PropertyGroupingNodeKey, PropertyOtherValuesGroupingNodeKey, PropertyValueGroupingNodeKey, PropertyValueRangeGroupingNodeKey, IModelHierarchyNodeKey, } from "./hierarchies/HierarchyNodeKey.js";
12
- export { GetHierarchyNodesProps, HierarchyProvider } from "./hierarchies/HierarchyProvider.js";
14
+ export type { GroupingHierarchyNode, NonGroupingHierarchyNode } from "./hierarchies/HierarchyNode.js";
15
+ export { HierarchyNode } from "./hierarchies/HierarchyNode.js";
16
+ export type { HierarchyNodeIdentifiersPath } from "./hierarchies/HierarchyNodeIdentifier.js";
17
+ export { HierarchyNodeIdentifier } from "./hierarchies/HierarchyNodeIdentifier.js";
18
+ export type { GenericNodeKey, GroupingNodeKey, IModelInstanceKey, InstancesNodeKey, ClassGroupingNodeKey, LabelGroupingNodeKey, PropertyGroupingNodeKey, PropertyOtherValuesGroupingNodeKey, PropertyValueGroupingNodeKey, PropertyValueRangeGroupingNodeKey, IModelHierarchyNodeKey, } from "./hierarchies/HierarchyNodeKey.js";
19
+ export { HierarchyNodeKey } from "./hierarchies/HierarchyNodeKey.js";
20
+ export type { GetHierarchyNodesProps, HierarchyProvider } from "./hierarchies/HierarchyProvider.js";
21
+ export { createHierarchyProvider } from "./hierarchies/HierarchyProvider.js";
13
22
  export { mergeProviders } from "./hierarchies/HierarchyMerge.js";
14
- export { createHierarchySearchHelper, HierarchySearchPath, HierarchySearchPathOptions } from "./hierarchies/HierarchySearch.js";
23
+ export type { HierarchySearchPathOptions } from "./hierarchies/HierarchySearch.js";
24
+ export { createHierarchySearchHelper, HierarchySearchPath } from "./hierarchies/HierarchySearch.js";
15
25
  export { getLogger, setLogger } from "./hierarchies/Logging.js";
16
26
  //# sourceMappingURL=presentation-hierarchies.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"presentation-hierarchies.d.ts","sourceRoot":"","sources":["../../src/presentation-hierarchies.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,OAAO,EACL,yBAAyB,E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ACvB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,YAAY,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AACpG,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,YAAY,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AACnF,OAAO,EAAE,2BAA2B,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACpG,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC"}
@@ -4,7 +4,7 @@
4
4
  * See LICENSE.md in the project root for license terms and full copyright notice.
5
5
  *--------------------------------------------------------------------------------------------*/
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.setLogger = exports.getLogger = exports.HierarchySearchPath = exports.createHierarchySearchHelper = exports.mergeProviders = exports.HierarchyNodeKey = exports.HierarchyNodeIdentifier = exports.HierarchyNode = exports.RowsLimitExceededError = exports.ProcessedHierarchyNode = exports.createMergedIModelHierarchyProvider = exports.createIModelHierarchyProvider = exports.createNodesQueryClauseFactory = exports.NodeSelectClauseColumnNames = exports.createLimitingECSqlQueryExecutor = exports.createPredicateBasedHierarchyDefinition = exports.HierarchyNodesDefinition = exports.GenericInstanceFilter = void 0;
7
+ exports.setLogger = exports.getLogger = exports.HierarchySearchPath = exports.createHierarchySearchHelper = exports.mergeProviders = exports.createHierarchyProvider = exports.HierarchyNodeKey = exports.HierarchyNodeIdentifier = exports.HierarchyNode = exports.RowsLimitExceededError = exports.ProcessedHierarchyNode = exports.createMergedIModelHierarchyProvider = exports.createIModelHierarchyProvider = exports.createNodesQueryClauseFactory = exports.NodeSelectClauseColumnNames = exports.createLimitingECSqlQueryExecutor = exports.createPredicateBasedHierarchyDefinition = exports.HierarchyNodesDefinition = exports.GenericInstanceFilter = void 0;
8
8
  var core_common_1 = require("@itwin/core-common");
9
9
  Object.defineProperty(exports, "GenericInstanceFilter", { enumerable: true, get: function () { return core_common_1.GenericInstanceFilter; } });
10
10
  var IModelHierarchyDefinition_js_1 = require("./hierarchies/imodel/IModelHierarchyDefinition.js");
@@ -29,6 +29,8 @@ var HierarchyNodeIdentifier_js_1 = require("./hierarchies/HierarchyNodeIdentifie
29
29
  Object.defineProperty(exports, "HierarchyNodeIdentifier", { enumerable: true, get: function () { return HierarchyNodeIdentifier_js_1.HierarchyNodeIdentifier; } });
30
30
  var HierarchyNodeKey_js_1 = require("./hierarchies/HierarchyNodeKey.js");
31
31
  Object.defineProperty(exports, "HierarchyNodeKey", { enumerable: true, get: function () { return HierarchyNodeKey_js_1.HierarchyNodeKey; } });
32
+ var HierarchyProvider_js_1 = require("./hierarchies/HierarchyProvider.js");
33
+ Object.defineProperty(exports, "createHierarchyProvider", { enumerable: true, get: function () { return HierarchyProvider_js_1.createHierarchyProvider; } });
32
34
  var HierarchyMerge_js_1 = require("./hierarchies/HierarchyMerge.js");
33
35
  Object.defineProperty(exports, "mergeProviders", { enumerable: true, get: function () { return HierarchyMerge_js_1.mergeProviders; } });
34
36
  var HierarchySearch_js_1 = require("./hierarchies/HierarchySearch.js");
@@ -1 +1 @@
1
- {"version":3,"file":"presentation-hierarchies.js","sourceRoot":"","sources":["../../src/presentation-hierarchies.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;AAEhG,kDAA2D;AAAlD,oHAAA,qBAAqB,OAAA;AAE9B,kGAQ2D;AAJzD,wIAAA,wBAAwB,OAAA;AAK1B,kHAKmE;AADjE,+JAAA,uCAAuC,OAAA;AAEzC,oGAAkI;AAA7F,iJAAA,gCAAgC,OAAA;AACrE,4FAAqJ;AAA5I,wIAAA,2BAA2B,OAAA;AAA2B,0IAAA,6BAA6B,OAAA;AAC5F,8FAAqI;AAA5H,2IAAA,6BAA6B,OAAA;AAAE,iJAAA,mCAAmC,OAAA;AAC3E,sFAA0G;AAA5E,gIAAA,sBAAsB,OAAA;AAEpD,uEAA0E;AAAjE,4HAAA,sBAAsB,OAAA;AAC/B,mEAAgH;AAAhF,iHAAA,aAAa,OAAA;AAC7C,uFAAiH;AAAxG,qIAAA,uBAAuB,OAAA;AAChC,yEAa2C;AAVzC,uHAAA,gBAAgB,OAAA;AAYlB,qEAAiE;AAAxD,mHAAA,cAAc,OAAA;AACvB,uEAAgI;AAAvH,iIAAA,2BAA2B,OAAA;AAAE,yHAAA,mBAAmB,OAAA;AACzD,uDAAgE;AAAvD,uGAAA,SAAS,OAAA;AAAE,uGAAA,SAAS,OAAA","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\nexport { GenericInstanceFilter } from \"@itwin/core-common\";\n\nexport {\n DefineHierarchyLevelProps,\n HierarchyLevelDefinition,\n HierarchyDefinition,\n HierarchyNodesDefinition,\n NodeParser,\n NodePostProcessor,\n NodePreProcessor,\n} from \"./hierarchies/imodel/IModelHierarchyDefinition.js\";\nexport {\n DefineGenericNodeChildHierarchyLevelProps,\n DefineInstanceNodeChildHierarchyLevelProps,\n DefineRootHierarchyLevelProps,\n createPredicateBasedHierarchyDefinition,\n} from \"./hierarchies/imodel/PredicateBasedHierarchyDefinition.js\";\nexport { LimitingECSqlQueryExecutor, createLimitingECSqlQueryExecutor } from \"./hierarchies/imodel/LimitingECSqlQueryExecutor.js\";\nexport { NodeSelectClauseColumnNames, NodesQueryClauseFactory, createNodesQueryClauseFactory } from \"./hierarchies/imodel/NodeSelectQueryFactory.js\";\nexport { createIModelHierarchyProvider, createMergedIModelHierarchyProvider } from \"./hierarchies/imodel/IModelHierarchyProvider.js\";\nexport { SourceHierarchyNode, ProcessedHierarchyNode } from \"./hierarchies/imodel/IModelHierarchyNode.js\";\n\nexport { RowsLimitExceededError } from \"./hierarchies/HierarchyErrors.js\";\nexport { GroupingHierarchyNode, HierarchyNode, NonGroupingHierarchyNode } from \"./hierarchies/HierarchyNode.js\";\nexport { HierarchyNodeIdentifier, HierarchyNodeIdentifiersPath } from \"./hierarchies/HierarchyNodeIdentifier.js\";\nexport {\n GenericNodeKey,\n GroupingNodeKey,\n HierarchyNodeKey,\n IModelInstanceKey,\n InstancesNodeKey,\n ClassGroupingNodeKey,\n LabelGroupingNodeKey,\n PropertyGroupingNodeKey,\n PropertyOtherValuesGroupingNodeKey,\n PropertyValueGroupingNodeKey,\n PropertyValueRangeGroupingNodeKey,\n IModelHierarchyNodeKey,\n} from \"./hierarchies/HierarchyNodeKey.js\";\nexport { GetHierarchyNodesProps, HierarchyProvider } from \"./hierarchies/HierarchyProvider.js\";\nexport { mergeProviders } from \"./hierarchies/HierarchyMerge.js\";\nexport { createHierarchySearchHelper, HierarchySearchPath, HierarchySearchPathOptions } from \"./hierarchies/HierarchySearch.js\";\nexport { getLogger, setLogger } from \"./hierarchies/Logging.js\";\n"]}
1
+ {"version":3,"file":"presentation-hierarchies.js","sourceRoot":"","sources":["../../src/presentation-hierarchies.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;AAEhG,kDAA2D;AAAlD,oHAAA,qBAAqB,OAAA;AAU9B,kGAA6F;AAApF,wIAAA,wBAAwB,OAAA;AAMjC,kHAAoH;AAA3G,+JAAA,uCAAuC,OAAA;AAEhD,oGAAsG;AAA7F,iJAAA,gCAAgC,OAAA;AAEzC,4FAA4H;AAAnH,wIAAA,2BAA2B,OAAA;AAAE,0IAAA,6BAA6B,OAAA;AACnE,8FAAqI;AAA5H,2IAAA,6BAA6B,OAAA;AAAE,iJAAA,mCAAmC,OAAA;AAE3E,sFAAqF;AAA5E,gIAAA,sBAAsB,OAAA;AAE/B,uEAA0E;AAAjE,4HAAA,sBAAsB,OAAA;AAE/B,mEAA+D;AAAtD,iHAAA,aAAa,OAAA;AAEtB,uFAAmF;AAA1E,qIAAA,uBAAuB,OAAA;AAchC,yEAAqE;AAA5D,uHAAA,gBAAgB,OAAA;AAEzB,2EAA6E;AAApE,+HAAA,uBAAuB,OAAA;AAChC,qEAAiE;AAAxD,mHAAA,cAAc,OAAA;AAEvB,uEAAoG;AAA3F,iIAAA,2BAA2B,OAAA;AAAE,yHAAA,mBAAmB,OAAA;AACzD,uDAAgE;AAAvD,uGAAA,SAAS,OAAA;AAAE,uGAAA,SAAS,OAAA","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\nexport { GenericInstanceFilter } from \"@itwin/core-common\";\n\nexport type {\n DefineHierarchyLevelProps,\n HierarchyLevelDefinition,\n HierarchyDefinition,\n NodeParser,\n NodePostProcessor,\n NodePreProcessor,\n} from \"./hierarchies/imodel/IModelHierarchyDefinition.js\";\nexport { HierarchyNodesDefinition } from \"./hierarchies/imodel/IModelHierarchyDefinition.js\";\nexport type {\n DefineGenericNodeChildHierarchyLevelProps,\n DefineInstanceNodeChildHierarchyLevelProps,\n DefineRootHierarchyLevelProps,\n} from \"./hierarchies/imodel/PredicateBasedHierarchyDefinition.js\";\nexport { createPredicateBasedHierarchyDefinition } from \"./hierarchies/imodel/PredicateBasedHierarchyDefinition.js\";\nexport type { LimitingECSqlQueryExecutor } from \"./hierarchies/imodel/LimitingECSqlQueryExecutor.js\";\nexport { createLimitingECSqlQueryExecutor } from \"./hierarchies/imodel/LimitingECSqlQueryExecutor.js\";\nexport type { NodesQueryClauseFactory } from \"./hierarchies/imodel/NodeSelectQueryFactory.js\";\nexport { NodeSelectClauseColumnNames, createNodesQueryClauseFactory } from \"./hierarchies/imodel/NodeSelectQueryFactory.js\";\nexport { createIModelHierarchyProvider, createMergedIModelHierarchyProvider } from \"./hierarchies/imodel/IModelHierarchyProvider.js\";\nexport type { SourceHierarchyNode } from \"./hierarchies/imodel/IModelHierarchyNode.js\";\nexport { ProcessedHierarchyNode } from \"./hierarchies/imodel/IModelHierarchyNode.js\";\n\nexport { RowsLimitExceededError } from \"./hierarchies/HierarchyErrors.js\";\nexport type { GroupingHierarchyNode, NonGroupingHierarchyNode } from \"./hierarchies/HierarchyNode.js\";\nexport { HierarchyNode } from \"./hierarchies/HierarchyNode.js\";\nexport type { HierarchyNodeIdentifiersPath } from \"./hierarchies/HierarchyNodeIdentifier.js\";\nexport { HierarchyNodeIdentifier } from \"./hierarchies/HierarchyNodeIdentifier.js\";\nexport type {\n GenericNodeKey,\n GroupingNodeKey,\n IModelInstanceKey,\n InstancesNodeKey,\n ClassGroupingNodeKey,\n LabelGroupingNodeKey,\n PropertyGroupingNodeKey,\n PropertyOtherValuesGroupingNodeKey,\n PropertyValueGroupingNodeKey,\n PropertyValueRangeGroupingNodeKey,\n IModelHierarchyNodeKey,\n} from \"./hierarchies/HierarchyNodeKey.js\";\nexport { HierarchyNodeKey } from \"./hierarchies/HierarchyNodeKey.js\";\nexport type { GetHierarchyNodesProps, HierarchyProvider } from \"./hierarchies/HierarchyProvider.js\";\nexport { createHierarchyProvider } from \"./hierarchies/HierarchyProvider.js\";\nexport { mergeProviders } from \"./hierarchies/HierarchyMerge.js\";\nexport type { HierarchySearchPathOptions } from \"./hierarchies/HierarchySearch.js\";\nexport { createHierarchySearchHelper, HierarchySearchPath } from \"./hierarchies/HierarchySearch.js\";\nexport { getLogger, setLogger } from \"./hierarchies/Logging.js\";\n"]}
@@ -1,5 +1,5 @@
1
1
  import "./internal/DisposePolyfill.js";
2
- import { HierarchyProvider } from "./HierarchyProvider.js";
2
+ import type { HierarchyProvider } from "./HierarchyProvider.js";
3
3
  /**
4
4
  * Props for `mergeProviders` function.
5
5
  * @public
@@ -1 +1 @@
1
- {"version":3,"file":"HierarchyMerge.d.ts","sourceRoot":"","sources":["../../../src/hierarchies/HierarchyMerge.ts"],"names":[],"mappings":"AAKA,OAAO,+BAA+B,CAAC;AAIvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAK3D;;;GAGG;AACH,UAAU,4BAA4B;IACpC,kCAAkC;IAClC,SAAS,EAAE,iBAAiB,EAAE,CAAC;CAChC;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,EAAE,SAAS,EAAE,EAAE,4BAA4B,GAAG,iBAAiB,GAAG;IAC/F,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CAC9B,CAyCA"}
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,EAAE,SAAS,EAAE,EAAE,4BAA4B,GAAG,iBAAiB,GAAG;IAC/F,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CAC9B,CAyCA"}
@@ -15,7 +15,7 @@ import { sortNodesByLabelOperator } from "./internal/operators/Sorting.js";
15
15
  export function mergeProviders({ providers }) {
16
16
  const hierarchyChanged = new BeEvent();
17
17
  providers.forEach((p) => {
18
- p.hierarchyChanged.addListener(() => hierarchyChanged.raiseEvent());
18
+ p.hierarchyChanged.addListener((args) => hierarchyChanged.raiseEvent(args));
19
19
  });
20
20
  const dispose = () => {
21
21
  hierarchyChanged.clear();
@@ -1 +1 @@
1
- {"version":3,"file":"HierarchyMerge.js","sourceRoot":"","sources":["../../../src/hierarchies/HierarchyMerge.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,+BAA+B,CAAC;AAEvC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,M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AAC,EAC7B,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC,EACjD,GAAG,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,EACf,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,EACvB,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC,CAAC,CAC3D,CAAC;QACJ,CAAC,CAAC,CACH,CACF,EACD,wBAAwB,CACzB,CACF;QACH,mBAAmB,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAClH,YAAY,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;QAChF,kBAAkB,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC;QACpF,CAAC,MAAM,CAAC,OAAO,CAAC,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 { HierarchyProvider } from \"./HierarchyProvider.js\";\nimport { safeDispose } from \"./internal/Common.js\";\nimport { eachValueFrom } from \"./internal/EachValueFrom.js\";\nimport { sortNodesByLabelOperator } from \"./internal/operators/Sorting.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({ providers }: MergeHierarchyProvidersProps): HierarchyProvider & {\n [Symbol.dispose]: () => void;\n} {\n const hierarchyChanged = new BeEvent<() => void>();\n providers.forEach((p) => {\n p.hierarchyChanged.addListener(() => hierarchyChanged.raiseEvent());\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"]}
1
+ {"version":3,"file":"HierarchyMerge.js","sourceRoot":"","sources":["../../../src/hierarchies/HierarchyMerge.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,+BAA+B,CAAC;AAEvC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EA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AAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,QAAQ,CAAC,EAC7B,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC,EACjD,GAAG,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,EACf,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,EACvB,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC,CAAC,CAC3D,CAAC;QACJ,CAAC,CAAC,CACH,CACF,EACD,wBAAwB,CACzB,CACF;QACH,mBAAmB,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAClH,YAAY,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;QAChF,kBAAkB,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC;QACpF,CAAC,MAAM,CAAC,OAAO,CAAC,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({ providers }: MergeHierarchyProvidersProps): HierarchyProvider & {\n [Symbol.dispose]: () => void;\n} {\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"]}
@@ -1,6 +1,7 @@
1
- import { OmitOverUnion } from "@itwin/presentation-shared";
2
- import { ClassGroupingNodeKey, GenericNodeKey, GroupingNodeKey, HierarchyNodeKey, IModelHierarchyNodeKey, IModelInstanceKey, InstancesNodeKey, LabelGroupingNodeKey, PropertyGroupingNodeKey, PropertyOtherValuesGroupingNodeKey, PropertyValueGroupingNodeKey, PropertyValueRangeGroupingNodeKey } from "./HierarchyNodeKey.js";
3
- import { HierarchySearchPath, HierarchySearchPathOptions } from "./HierarchySearch.js";
1
+ import { HierarchyNodeKey } from "./HierarchyNodeKey.js";
2
+ import type { OmitOverUnion } from "@itwin/presentation-shared";
3
+ import type { ClassGroupingNodeKey, GenericNodeKey, GroupingNodeKey, IModelHierarchyNodeKey, IModelInstanceKey, InstancesNodeKey, LabelGroupingNodeKey, PropertyGroupingNodeKey, PropertyOtherValuesGroupingNodeKey, PropertyValueGroupingNodeKey, PropertyValueRangeGroupingNodeKey } from "./HierarchyNodeKey.js";
4
+ import type { HierarchySearchPath, HierarchySearchPathOptions } from "./HierarchySearch.js";
4
5
  /** @public */
5
6
  export type HierarchyNodeSearchProps = {
6
7
  /** If set to true, then one of the ancestor nodes in the hierarchy is the search target. */
@@ -1 +1 @@
1
- {"version":3,"file":"HierarchyNode.d.ts","sourceRoot":"","sources":["../../../src/hierarchies/HierarchyNode.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EACL,oBAAoB,EACpB,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,sBAAsB,EACtB,iBAAiB,EACjB,gBAAgB,EAChB,oBAAoB,EACpB,uBAAuB,EACvB,kCAAkC,EAClC,4BAA4B,EAC5B,iCAAiC,EAClC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,mBAAmB,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAEvF,cAAc;AACd,MAAM,MAAM,wBAAwB,GAAG;IACrC,4FAA4F;IAC5F,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,wDAAwD;IACxD,mBAAmB,CAAC,EAAE,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AAE,GAAG,qBAAqB,CAEzG;CACF;AAED;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,CAAC,KAAK,GAAG,aAAa,IAAI,aAAa,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC"}
@@ -2,7 +2,7 @@
2
2
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
3
  * See LICENSE.md in the project root for license terms and full copyright notice.
4
4
  *--------------------------------------------------------------------------------------------*/
5
- import { HierarchyNodeKey, } from "./HierarchyNodeKey.js";
5
+ import { HierarchyNodeKey } from "./HierarchyNodeKey.js";
6
6
  /** @public */
7
7
  // eslint-disable-next-line @typescript-eslint/no-redeclare
8
8
  export var HierarchyNode;
@@ -1 +1 @@
1
- {"version":3,"file":"HierarchyNode.js","sourceRoot":"","sources":["../../../src/hierarchies/HierarchyNode.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAGhG,OAAO,EAIL,gBAAgB,GASjB,MAAM,uBAAuB,CAAC;AA+E/B,cAAc;AACd,2DAA2D;AAC3D,MAAM,KAAW,aAAa,CAqD7B;AArDD,WAAiB,aAAa;IAC5B,sDAAsD;IACtD,SAAgB,SAAS,CAA0C,IAAW;QAC5E,OAAO,gBAAgB,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC9C,CAAC;IAFe,uBAAS,YAExB,CAAA;IACD,8EAA8E;IAC9E,SAAgB,YAAY,CAA0C,IAAW;QAC/E,OAAO,gBAAgB,CAAC,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACpD,CAAC;IAFe,0BAAY,eAE3B,CAAA;IACD,iEAAiE;IACjE,SAAgB,eAAe,CAA0C,IAAW;QAClF,OAAO,gBAAgB,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAChD,CAAC;IAFe,6BAAe,kBAE9B,CAAA;IACD,uDAAuD;IACvD,SAAgB,cAAc,CAA0C,IAAW;QACjF,OAAO,gBAAgB,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC/C,CAAC;IAFe,4BAAc,iBAE7B,CAAA;IACD,6DAA6D;IAC7D,SAAgB,mBAAmB,CACjC,IAAW;QAEX,OAAO,gBAAgB,CAAC,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACpD,CAAC;IAJe,iCAAmB,sBAIlC,CAAA;IACD,6DAA6D;IAC7D,SAAgB,mBAAmB,CACjC,IAAW;QAEX,OAAO,gBAAgB,CAAC,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACpD,CAAC;IAJe,iCAAmB,sBAIlC,CAAA;IACD,gFAAgF;IAChF,SAAgB,iCAAiC,CAC/C,IAAW;QAEX,OAAO,gBAAgB,CAAC,6BAA6B,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAClE,CAAC;IAJe,+CAAiC,oCAIhD,CAAA;IACD,sEAAsE;IACtE,SAAgB,2BAA2B,CACzC,IAAW;QAEX,OAAO,gBAAgB,CAAC,uBAAuB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC5D,CAAC;IAJe,yCAA2B,8BAI1C,CAAA;IACD,4EAA4E;IAC5E,SAAgB,gCAAgC,CAC9C,IAAW;QAEX,OAAO,gBAAgB,CAAC,4BAA4B,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACjE,CAAC;IAJe,8CAAgC,mCAI/C,CAAA;IACD,gEAAgE;IAChE,SAAgB,sBAAsB,CACpC,IAAW;QAEX,OAAO,gBAAgB,CAAC,kBAAkB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACvD,CAAC;IAJe,oCAAsB,yBAIrC,CAAA;AACH,CAAC,EArDgB,aAAa,KAAb,aAAa,QAqD7B","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n\nimport { OmitOverUnion } from \"@itwin/presentation-shared\";\nimport {\n ClassGroupingNodeKey,\n GenericNodeKey,\n GroupingNodeKey,\n HierarchyNodeKey,\n IModelHierarchyNodeKey,\n IModelInstanceKey,\n InstancesNodeKey,\n LabelGroupingNodeKey,\n PropertyGroupingNodeKey,\n PropertyOtherValuesGroupingNodeKey,\n PropertyValueGroupingNodeKey,\n PropertyValueRangeGroupingNodeKey,\n} from \"./HierarchyNodeKey.js\";\nimport { HierarchySearchPath, HierarchySearchPathOptions } from \"./HierarchySearch.js\";\n\n/** @public */\nexport type 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?: HierarchySearchPath[];\n} & (\n | {\n /** Whether or not this node is a search target. */\n isSearchTarget?: false;\n }\n | {\n /** Whether or not this node is a search target. */\n isSearchTarget: true;\n /** Options that were used to search the node. */\n searchTargetOptions?: HierarchySearchPathOptions;\n }\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 }>(node: TNode): node is TNode & NonGroupingHierarchyNode & { key: GenericNodeKey } {\n return HierarchyNodeKey.isGeneric(node.key);\n }\n /** Checks whether the given node is a standard (iModel content based) node */\n export function isIModelNode<TNode extends { key: HierarchyNodeKey }>(node: TNode): node is TNode & { key: IModelHierarchyNodeKey } {\n return HierarchyNodeKey.isIModelNodeKey(node.key);\n }\n /** Checks whether the given node is an ECInstances-based node */\n export function isInstancesNode<TNode extends { key: HierarchyNodeKey }>(node: TNode): node is TNode & NonGroupingHierarchyNode & { key: InstancesNodeKey } {\n return HierarchyNodeKey.isInstances(node.key);\n }\n /** Checks whether the given node is a grouping node */\n export function isGroupingNode<TNode extends { key: HierarchyNodeKey }>(node: TNode): node is TNode & GroupingHierarchyNode {\n return HierarchyNodeKey.isGrouping(node.key);\n }\n /** Checks whether the given node is a class grouping node */\n export function isClassGroupingNode<TNode extends { key: HierarchyNodeKey }>(\n node: TNode,\n ): node is TNode & { key: ClassGroupingNodeKey; supportsFiltering?: undefined } & GroupingHierarchyNode {\n return HierarchyNodeKey.isClassGrouping(node.key);\n }\n /** Checks whether the given node is a label grouping node */\n export function isLabelGroupingNode<TNode extends { key: HierarchyNodeKey }>(\n node: TNode,\n ): node is TNode & { key: LabelGroupingNodeKey; supportsFiltering?: undefined } & GroupingHierarchyNode {\n return HierarchyNodeKey.isLabelGrouping(node.key);\n }\n /** Checks whether the given node is property grouping node for other values */\n export function isPropertyOtherValuesGroupingNode<TNode extends { key: HierarchyNodeKey }>(\n node: TNode,\n ): node is TNode & { key: PropertyOtherValuesGroupingNodeKey; supportsFiltering?: undefined } & GroupingHierarchyNode {\n return HierarchyNodeKey.isPropertyOtherValuesGrouping(node.key);\n }\n /** Checks whether the given node is a property value grouping node */\n export function isPropertyValueGroupingNode<TNode extends { key: HierarchyNodeKey }>(\n node: TNode,\n ): node is TNode & { key: PropertyValueGroupingNodeKey; supportsFiltering?: undefined } & GroupingHierarchyNode {\n return HierarchyNodeKey.isPropertyValueGrouping(node.key);\n }\n /** Checks whether the given node is a property value range grouping node */\n export function isPropertyValueRangeGroupingNode<TNode extends { key: HierarchyNodeKey }>(\n node: TNode,\n ): node is TNode & { key: PropertyValueRangeGroupingNodeKey; supportsFiltering?: undefined } & GroupingHierarchyNode {\n return HierarchyNodeKey.isPropertyValueRangeGrouping(node.key);\n }\n /** Checks whether the given node is a property grouping node */\n export function isPropertyGroupingNode<TNode extends { key: HierarchyNodeKey }>(\n node: TNode,\n ): node is TNode & { key: PropertyGroupingNodeKey; supportsFiltering?: undefined } & GroupingHierarchyNode {\n return HierarchyNodeKey.isPropertyGrouping(node.key);\n }\n}\n\n/**\n * A type of `HierarchyNode` that doesn't know about its children and is an input when requesting\n * them using `HierarchyProvider.getNodes`.\n * @public\n */\nexport type ParentHierarchyNode<TBase = HierarchyNode> = OmitOverUnion<TBase, \"children\">;\n"]}
1
+ {"version":3,"file":"HierarchyNode.js","sourceRoot":"","sources":["../../../src/hierarchies/HierarchyNode.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AA8FzD,cAAc;AACd,2DAA2D;AAC3D,MAAM,KAAW,aAAa,CAqD7B;AArDD,WAAiB,aAA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Je,yCAA2B,8BAI1C,CAAA;IACD,4EAA4E;IAC5E,SAAgB,gCAAgC,CAC9C,IAAW;QAEX,OAAO,gBAAgB,CAAC,4BAA4B,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACjE,CAAC;IAJe,8CAAgC,mCAI/C,CAAA;IACD,gEAAgE;IAChE,SAAgB,sBAAsB,CACpC,IAAW;QAEX,OAAO,gBAAgB,CAAC,kBAAkB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACvD,CAAC;IAJe,oCAAsB,yBAIrC,CAAA;AACH,CAAC,EArDgB,aAAa,KAAb,aAAa,QAqD7B","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n\nimport { 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 { HierarchySearchPath, HierarchySearchPathOptions } from \"./HierarchySearch.js\";\n\n/** @public */\nexport type 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?: HierarchySearchPath[];\n} & (\n | {\n /** Whether or not this node is a search target. */\n isSearchTarget?: false;\n }\n | {\n /** Whether or not this node is a search target. */\n isSearchTarget: true;\n /** Options that were used to search the node. */\n searchTargetOptions?: HierarchySearchPathOptions;\n }\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 }>(node: TNode): node is TNode & NonGroupingHierarchyNode & { key: GenericNodeKey } {\n return HierarchyNodeKey.isGeneric(node.key);\n }\n /** Checks whether the given node is a standard (iModel content based) node */\n export function isIModelNode<TNode extends { key: HierarchyNodeKey }>(node: TNode): node is TNode & { key: IModelHierarchyNodeKey } {\n return HierarchyNodeKey.isIModelNodeKey(node.key);\n }\n /** Checks whether the given node is an ECInstances-based node */\n export function isInstancesNode<TNode extends { key: HierarchyNodeKey }>(node: TNode): node is TNode & NonGroupingHierarchyNode & { key: InstancesNodeKey } {\n return HierarchyNodeKey.isInstances(node.key);\n }\n /** Checks whether the given node is a grouping node */\n export function isGroupingNode<TNode extends { key: HierarchyNodeKey }>(node: TNode): node is TNode & GroupingHierarchyNode {\n return HierarchyNodeKey.isGrouping(node.key);\n }\n /** Checks whether the given node is a class grouping node */\n export function isClassGroupingNode<TNode extends { key: HierarchyNodeKey }>(\n node: TNode,\n ): node is TNode & { key: ClassGroupingNodeKey; supportsFiltering?: undefined } & GroupingHierarchyNode {\n return HierarchyNodeKey.isClassGrouping(node.key);\n }\n /** Checks whether the given node is a label grouping node */\n export function isLabelGroupingNode<TNode extends { key: HierarchyNodeKey }>(\n node: TNode,\n ): node is TNode & { key: LabelGroupingNodeKey; supportsFiltering?: undefined } & GroupingHierarchyNode {\n return HierarchyNodeKey.isLabelGrouping(node.key);\n }\n /** Checks whether the given node is property grouping node for other values */\n export function isPropertyOtherValuesGroupingNode<TNode extends { key: HierarchyNodeKey }>(\n node: TNode,\n ): node is TNode & { key: PropertyOtherValuesGroupingNodeKey; supportsFiltering?: undefined } & GroupingHierarchyNode {\n return HierarchyNodeKey.isPropertyOtherValuesGrouping(node.key);\n }\n /** Checks whether the given node is a property value grouping node */\n export function isPropertyValueGroupingNode<TNode extends { key: HierarchyNodeKey }>(\n node: TNode,\n ): node is TNode & { key: PropertyValueGroupingNodeKey; supportsFiltering?: undefined } & GroupingHierarchyNode {\n return HierarchyNodeKey.isPropertyValueGrouping(node.key);\n }\n /** Checks whether the given node is a property value range grouping node */\n export function isPropertyValueRangeGroupingNode<TNode extends { key: HierarchyNodeKey }>(\n node: TNode,\n ): node is TNode & { key: PropertyValueRangeGroupingNodeKey; supportsFiltering?: undefined } & GroupingHierarchyNode {\n return HierarchyNodeKey.isPropertyValueRangeGrouping(node.key);\n }\n /** Checks whether the given node is a property grouping node */\n export function isPropertyGroupingNode<TNode extends { key: HierarchyNodeKey }>(\n node: TNode,\n ): node is TNode & { key: PropertyGroupingNodeKey; supportsFiltering?: undefined } & GroupingHierarchyNode {\n return HierarchyNodeKey.isPropertyGrouping(node.key);\n }\n}\n\n/**\n * A type of `HierarchyNode` that doesn't know about its children and is an input when requesting\n * them using `HierarchyProvider.getNodes`.\n * @public\n */\nexport type ParentHierarchyNode<TBase = HierarchyNode> = OmitOverUnion<TBase, \"children\">;\n"]}
@@ -1,4 +1,4 @@
1
- import { GenericNodeKey, IModelInstanceKey } from "./HierarchyNodeKey.js";
1
+ import type { GenericNodeKey, IModelInstanceKey } from "./HierarchyNodeKey.js";
2
2
  /**
3
3
  * An identifier that can be used to identify either an ECInstance or a generic node.
4
4
  *
@@ -1 +1 @@
1
- {"version":3,"file":"HierarchyNodeIdentifier.d.ts","sourceRoot":"","sources":["../../../src/hierarchies/HierarchyNodeIdentifier.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE1E;;;;;;;;;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,IAAI,cAAc,CAEzF;IAED,0CAA0C;IAC1C,SAAgB,KAAK,CAAC,GAAG,EAAE,uBAAuB,EAAE,GAAG,EAAE,uBAAuB,WAQ/E;CACF;AAED;;;;;GAKG;AACH,MAAM,MAAM,4BAA4B,GAAG,uBAAuB,EAAE,CAAC"}
1
+ {"version":3,"file":"HierarchyNodeIdentifier.d.ts","sourceRoot":"","sources":["../../../src/hierarchies/HierarchyNodeIdentifier.ts"],"names":[],"mappings":"AAOA,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,IAAI,cAAc,CAEzF;IAED,0CAA0C;IAC1C,SAAgB,KAAK,CAAC,GAAG,EAAE,uBAAuB,EAAE,GAAG,EAAE,uBAAuB,WAQ/E;CACF;AAED;;;;;GAKG;AACH,MAAM,MAAM,4BAA4B,GAAG,uBAAuB,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"HierarchyNodeIdentifier.js","sourceRoot":"","sources":["../../../src/hierarchies/HierarchyNodeIdentifier.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAezD,cAAc;AACd,2DAA2D;AAC3D,MAAM,KAAW,uBAAuB,CAqBvC;AArBD,WAAiB,uBAAuB;IACtC,yEAAyE;IACzE,SAAgB,wBAAwB,CAAC,EAA2B;QAClE,OAAO,WAAW,IAAI,EAAE,CAAC;IAC3B,CAAC;IAFe,gDAAwB,2BAEvC,CAAA;IAED,uEAAuE;IACvE,SAAgB,uBAAuB,CAAC,EAA2B;QACjE,OAAO,CAAC,wBAAwB,CAAC,EAAE,CAAC,CAAC;IACvC,CAAC;IAFe,+CAAuB,0BAEtC,CAAA;IAED,0CAA0C;IAC1C,SAAgB,KAAK,CAAC,GAA4B,EAAE,GAA4B;QAC9E,IAAI,wBAAwB,CAAC,GAAG,CAAC,IAAI,wBAAwB,CAAC,GAAG,CAAC,EAAE,CAAC;YACnE,OAAO,WAAW,CAAC,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,IAAI,GAAG,CAAC,SAAS,KAAK,GAAG,CAAC,SAAS,CAAC;QACzE,CAAC;QACD,IAAI,uBAAuB,CAAC,GAAG,CAAC,IAAI,uBAAuB,CAAC,GAAG,CAAC,EAAE,CAAC;YACjE,OAAO,GAAG,CAAC,MAAM,KAAK,GAAG,CAAC,MAAM,IAAI,GAAG,CAAC,EAAE,KAAK,GAAG,CAAC,EAAE,CAAC;QACxD,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IARe,6BAAK,QAQpB,CAAA;AACH,CAAC,EArBgB,uBAAuB,KAAvB,uBAAuB,QAqBvC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n\nimport { InstanceKey } from \"@itwin/presentation-shared\";\nimport { GenericNodeKey, IModelInstanceKey } from \"./HierarchyNodeKey.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 if (isInstanceNodeIdentifier(lhs) && isInstanceNodeIdentifier(rhs)) {\n return InstanceKey.equals(lhs, rhs) && lhs.imodelKey === rhs.imodelKey;\n }\n if (isGenericNodeIdentifier(lhs) && isGenericNodeIdentifier(rhs)) {\n return lhs.source === rhs.source && lhs.id === rhs.id;\n }\n return false;\n }\n}\n\n/**\n * A path of hierarchy node identifiers, typically used to describe a path from root down\n * to specific node deep in the hierarchy.\n *\n * @public\n */\nexport type HierarchyNodeIdentifiersPath = HierarchyNodeIdentifier[];\n"]}
1
+ {"version":3,"file":"HierarchyNodeIdentifier.js","sourceRoot":"","sources":["../../../src/hierarchies/HierarchyNodeIdentifier.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAgBzD,cAAc;AACd,2DAA2D;AAC3D,MAAM,KAAW,uBAAuB,CAqBvC;AArBD,WAAiB,uBAAuB;IACtC,yEAAyE;IACzE,SAAgB,wBAAwB,CAAC,EAA2B;QAClE,OAAO,WAAW,IAAI,EAAE,CAAC;IAC3B,CAAC;IAFe,gDAAwB,2BAEvC,CAAA;IAED,uEAAuE;IACvE,SAAgB,uBAAuB,CAAC,EAA2B;QACjE,OAAO,CAAC,wBAAwB,CAAC,EAAE,CAAC,CAAC;IACvC,CAAC;IAFe,+CAAuB,0BAEtC,CAAA;IAED,0CAA0C;IAC1C,SAAgB,KAAK,CAAC,GAA4B,EAAE,GAA4B;QAC9E,IAAI,wBAAwB,CAAC,GAAG,CAAC,IAAI,wBAAwB,CAAC,GAAG,CAAC,EAAE,CAAC;YACnE,OAAO,WAAW,CAAC,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,IAAI,GAAG,CAAC,SAAS,KAAK,GAAG,CAAC,SAAS,CAAC;QACzE,CAAC;QACD,IAAI,uBAAuB,CAAC,GAAG,CAAC,IAAI,uBAAuB,CAAC,GAAG,CAAC,EAAE,CAAC;YACjE,OAAO,GAAG,CAAC,MAAM,KAAK,GAAG,CAAC,MAAM,IAAI,GAAG,CAAC,EAAE,KAAK,GAAG,CAAC,EAAE,CAAC;QACxD,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IARe,6BAAK,QAQpB,CAAA;AACH,CAAC,EArBgB,uBAAuB,KAAvB,uBAAuB,QAqBvC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n\nimport { InstanceKey } from \"@itwin/presentation-shared\";\n\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 if (isInstanceNodeIdentifier(lhs) && isInstanceNodeIdentifier(rhs)) {\n return InstanceKey.equals(lhs, rhs) && lhs.imodelKey === rhs.imodelKey;\n }\n if (isGenericNodeIdentifier(lhs) && isGenericNodeIdentifier(rhs)) {\n return lhs.source === rhs.source && lhs.id === rhs.id;\n }\n return false;\n }\n}\n\n/**\n * A path of hierarchy node identifiers, typically used to describe a path from root down\n * to specific node deep in the hierarchy.\n *\n * @public\n */\nexport type HierarchyNodeIdentifiersPath = HierarchyNodeIdentifier[];\n"]}
@@ -1,7 +1,7 @@
1
- import { GenericInstanceFilter } from "@itwin/core-common";
2
- import { Event, InstanceKey, IPrimitiveValueFormatter, Props } from "@itwin/presentation-shared";
3
- import { HierarchyNode, ParentHierarchyNode } from "./HierarchyNode.js";
4
- import { HierarchySearchPath } from "./HierarchySearch.js";
1
+ import type { GenericInstanceFilter } from "@itwin/core-common";
2
+ import type { Event, EventListener, InstanceKey, IPrimitiveValueFormatter, Props, RaisableEvent } from "@itwin/presentation-shared";
3
+ import type { HierarchyNode, ParentHierarchyNode } from "./HierarchyNode.js";
4
+ import type { HierarchySearchPath } from "./HierarchySearch.js";
5
5
  /**
6
6
  * Props for the `HierarchyProvider.getNodes` call.
7
7
  * @public
@@ -42,14 +42,13 @@ interface HierarchyChangedEventArgs {
42
42
  */
43
43
  export interface HierarchyProvider {
44
44
  /**
45
- * An event that provider raises due to a hierarchy change, that requires a reload. Provider may
46
- * set additional event arguments to provide extra information about what caused the change.
45
+ * An event that provider raises due to a hierarchy change that requires a reload.
47
46
  *
48
47
  * Consumers are expected to subscribe to this event and reload the hierarchy when it's raised.
49
- * Implementations may provide additional details on what caused the change through the optional
48
+ * Implementations may provide additional details on what caused the change through the
50
49
  * event arguments.
51
50
  */
52
- readonly hierarchyChanged: Event<(args?: HierarchyChangedEventArgs) => void>;
51
+ readonly hierarchyChanged: Event<(args: HierarchyChangedEventArgs) => void>;
53
52
  /**
54
53
  * Gets nodes for the specified parent node. This is **the method to implement**, otherwise
55
54
  * the provider doesn't return any nodes.
@@ -87,5 +86,49 @@ export interface HierarchyProvider {
87
86
  paths: HierarchySearchPath[];
88
87
  } | undefined): void;
89
88
  }
89
+ /**
90
+ * An utility to create a `HierarchyProvider` from a partial implementation.
91
+ *
92
+ * Creating a `HierarchyProvider` directly requires implementing all its methods:
93
+ * ```ts
94
+ * {
95
+ * hierarchyChanged: new BeEvent(),
96
+ * async *getNodes({ parentNode }) {
97
+ * // yield nodes...
98
+ * },
99
+ * async *getNodeInstanceKeys() {},
100
+ * setFormatter() {},
101
+ * setHierarchySearch() {},
102
+ * }
103
+ * ```
104
+ *
105
+ * However, in many cases you may only need to implement the `getNodes` method and
106
+ * can rely on default implementations for other methods.
107
+ *
108
+ * With this utility you can implement only part of it, e.g. just the `getNodes` method:
109
+ * ```ts
110
+ * // provide implementation as a javascript object
111
+ * createHierarchyProvider(({ hierarchyChanged }) => ({
112
+ * async *getNodes({ parentNode }) {
113
+ * // yield nodes...
114
+ * },
115
+ * }));
116
+ *
117
+ * // or, provide implementation as a class instance:
118
+ * createHierarchyProvider(
119
+ * ({ hierarchyChanged }) =>
120
+ * new (class implements Pick<HierarchyProvider, "getNodes"> {
121
+ * public async *getNodes({ parentNode }): ReturnType<HierarchyProvider["getNodes"]> {
122
+ * // yield nodes...
123
+ * }
124
+ * })(),
125
+ * );
126
+ * ```
127
+ *
128
+ * @public
129
+ */
130
+ export declare function createHierarchyProvider<TPartialProvider extends Partial<Omit<HierarchyProvider, "hierarchyChanged">> & Pick<HierarchyProvider, "getNodes">>(partialFactory: (props: {
131
+ hierarchyChanged: RaisableEvent<EventListener<HierarchyProvider["hierarchyChanged"]>>;
132
+ }) => TPartialProvider): TPartialProvider & HierarchyProvider;
90
133
  export {};
91
134
  //# sourceMappingURL=HierarchyProvider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"HierarchyProvider.d.ts","sourceRoot":"","sources":["../../../src/hierarchies/HierarchyProvider.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,wBAAwB,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACjG,O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;IACH,mBAAmB,CAAC,KAAK,EAAE,IAAI,CAAC,sBAAsB,EAAE,aAAa,CAAC,GAAG,qBAAqB,CAAC,WAAW,CAAC,CAAC;IAE5G;;;;;;;OAOG;IACH,YAAY,CAAC,SAAS,EAAE,wBAAwB,GAAG,SAAS,GAAG,IAAI,CAAC;IAEpE;;;;;;;;;OASG;IACH,kBAAkB,CAChB,KAAK,EACD;QACE,2DAA2D;QAC3D,KAAK,EAAE,mBAAmB,EAAE,CAAC;KAC9B,GACD,SAAS,GACZ,IAAI,CAAC;CACT;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,wBAAgB,uBAAuB,CAAC,gBAAgB,SAAS,OAAO,CAAC,IAAI,CAAC,iBAAiB,EAAE,kBAAkB,CAAC,CAAC,GAAG,IAAI,CAAC,iBAAiB,EAAE,UAAU,CAAC,EACzJ,cAAc,EAAE,CAAC,KAAK,EAAE;IAAE,gBAAgB,EAAE,aAAa,CAAC,aAAa,CAAC,iBAAiB,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAA;CAAE,KAAK,gBAAgB,GACrI,gBAAgB,GAAG,iBAAiB,CAStC"}
@@ -2,5 +2,56 @@
2
2
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
3
  * See LICENSE.md in the project root for license terms and full copyright notice.
4
4
  *--------------------------------------------------------------------------------------------*/
5
- export {};
5
+ import { BeEvent } from "@itwin/core-bentley";
6
+ /**
7
+ * An utility to create a `HierarchyProvider` from a partial implementation.
8
+ *
9
+ * Creating a `HierarchyProvider` directly requires implementing all its methods:
10
+ * ```ts
11
+ * {
12
+ * hierarchyChanged: new BeEvent(),
13
+ * async *getNodes({ parentNode }) {
14
+ * // yield nodes...
15
+ * },
16
+ * async *getNodeInstanceKeys() {},
17
+ * setFormatter() {},
18
+ * setHierarchySearch() {},
19
+ * }
20
+ * ```
21
+ *
22
+ * However, in many cases you may only need to implement the `getNodes` method and
23
+ * can rely on default implementations for other methods.
24
+ *
25
+ * With this utility you can implement only part of it, e.g. just the `getNodes` method:
26
+ * ```ts
27
+ * // provide implementation as a javascript object
28
+ * createHierarchyProvider(({ hierarchyChanged }) => ({
29
+ * async *getNodes({ parentNode }) {
30
+ * // yield nodes...
31
+ * },
32
+ * }));
33
+ *
34
+ * // or, provide implementation as a class instance:
35
+ * createHierarchyProvider(
36
+ * ({ hierarchyChanged }) =>
37
+ * new (class implements Pick<HierarchyProvider, "getNodes"> {
38
+ * public async *getNodes({ parentNode }): ReturnType<HierarchyProvider["getNodes"]> {
39
+ * // yield nodes...
40
+ * }
41
+ * })(),
42
+ * );
43
+ * ```
44
+ *
45
+ * @public
46
+ */
47
+ export function createHierarchyProvider(partialFactory) {
48
+ const hierarchyChanged = new BeEvent();
49
+ const impl = partialFactory({ hierarchyChanged });
50
+ return Object.assign(impl, {
51
+ hierarchyChanged,
52
+ ...(impl.getNodeInstanceKeys ? { getNodeInstanceKeys: impl.getNodeInstanceKeys } : { /* c8 ignore next */ async *getNodeInstanceKeys() { } }),
53
+ ...(impl.setFormatter ? { setFormatter: impl.setFormatter } : { /* c8 ignore next */ setFormatter() { } }),
54
+ ...(impl.setHierarchySearch ? { setHierarchySearch: impl.setHierarchySearch } : { /* c8 ignore next */ setHierarchySearch() { } }),
55
+ });
56
+ }
6
57
  //# sourceMappingURL=HierarchyProvider.js.map