@itwin/presentation-hierarchies 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (277) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/LICENSE.md +9 -0
  3. package/README.md +178 -0
  4. package/lib/cjs/hierarchies/HierarchyDefinition.d.ts +228 -0
  5. package/lib/cjs/hierarchies/HierarchyDefinition.d.ts.map +1 -0
  6. package/lib/cjs/hierarchies/HierarchyDefinition.js +94 -0
  7. package/lib/cjs/hierarchies/HierarchyDefinition.js.map +1 -0
  8. package/lib/cjs/hierarchies/HierarchyErrors.d.ts +9 -0
  9. package/lib/cjs/hierarchies/HierarchyErrors.d.ts.map +1 -0
  10. package/lib/cjs/hierarchies/HierarchyErrors.js +20 -0
  11. package/lib/cjs/hierarchies/HierarchyErrors.js.map +1 -0
  12. package/lib/cjs/hierarchies/HierarchyNode.d.ts +337 -0
  13. package/lib/cjs/hierarchies/HierarchyNode.d.ts.map +1 -0
  14. package/lib/cjs/hierarchies/HierarchyNode.js +64 -0
  15. package/lib/cjs/hierarchies/HierarchyNode.js.map +1 -0
  16. package/lib/cjs/hierarchies/HierarchyNodeIdentifier.d.ts +33 -0
  17. package/lib/cjs/hierarchies/HierarchyNodeIdentifier.d.ts.map +1 -0
  18. package/lib/cjs/hierarchies/HierarchyNodeIdentifier.js +34 -0
  19. package/lib/cjs/hierarchies/HierarchyNodeIdentifier.js.map +1 -0
  20. package/lib/cjs/hierarchies/HierarchyNodeKey.d.ts +137 -0
  21. package/lib/cjs/hierarchies/HierarchyNodeKey.d.ts.map +1 -0
  22. package/lib/cjs/hierarchies/HierarchyNodeKey.js +163 -0
  23. package/lib/cjs/hierarchies/HierarchyNodeKey.js.map +1 -0
  24. package/lib/cjs/hierarchies/HierarchyProvider.d.ts +104 -0
  25. package/lib/cjs/hierarchies/HierarchyProvider.d.ts.map +1 -0
  26. package/lib/cjs/hierarchies/HierarchyProvider.js +384 -0
  27. package/lib/cjs/hierarchies/HierarchyProvider.js.map +1 -0
  28. package/lib/cjs/hierarchies/LimitingECSqlQueryExecutor.d.ts +21 -0
  29. package/lib/cjs/hierarchies/LimitingECSqlQueryExecutor.d.ts.map +1 -0
  30. package/lib/cjs/hierarchies/LimitingECSqlQueryExecutor.js +100 -0
  31. package/lib/cjs/hierarchies/LimitingECSqlQueryExecutor.js.map +1 -0
  32. package/lib/cjs/hierarchies/Logging.d.ts +13 -0
  33. package/lib/cjs/hierarchies/Logging.d.ts.map +1 -0
  34. package/lib/cjs/hierarchies/Logging.js +28 -0
  35. package/lib/cjs/hierarchies/Logging.js.map +1 -0
  36. package/lib/cjs/hierarchies/NodeSelectQueryFactory.d.ts +205 -0
  37. package/lib/cjs/hierarchies/NodeSelectQueryFactory.d.ts.map +1 -0
  38. package/lib/cjs/hierarchies/NodeSelectQueryFactory.js +467 -0
  39. package/lib/cjs/hierarchies/NodeSelectQueryFactory.js.map +1 -0
  40. package/lib/cjs/hierarchies/internal/ChildNodeObservablesCache.d.ts +40 -0
  41. package/lib/cjs/hierarchies/internal/ChildNodeObservablesCache.d.ts.map +1 -0
  42. package/lib/cjs/hierarchies/internal/ChildNodeObservablesCache.js +84 -0
  43. package/lib/cjs/hierarchies/internal/ChildNodeObservablesCache.js.map +1 -0
  44. package/lib/cjs/hierarchies/internal/Common.d.ts +20 -0
  45. package/lib/cjs/hierarchies/internal/Common.d.ts.map +1 -0
  46. package/lib/cjs/hierarchies/internal/Common.js +106 -0
  47. package/lib/cjs/hierarchies/internal/Common.js.map +1 -0
  48. package/lib/cjs/hierarchies/internal/EachValueFrom.d.ts +12 -0
  49. package/lib/cjs/hierarchies/internal/EachValueFrom.d.ts.map +1 -0
  50. package/lib/cjs/hierarchies/internal/EachValueFrom.js +108 -0
  51. package/lib/cjs/hierarchies/internal/EachValueFrom.js.map +1 -0
  52. package/lib/cjs/hierarchies/internal/FilteringHierarchyDefinition.d.ts +39 -0
  53. package/lib/cjs/hierarchies/internal/FilteringHierarchyDefinition.d.ts.map +1 -0
  54. package/lib/cjs/hierarchies/internal/FilteringHierarchyDefinition.js +181 -0
  55. package/lib/cjs/hierarchies/internal/FilteringHierarchyDefinition.js.map +1 -0
  56. package/lib/cjs/hierarchies/internal/LoggingUtils.d.ts +14 -0
  57. package/lib/cjs/hierarchies/internal/LoggingUtils.d.ts.map +1 -0
  58. package/lib/cjs/hierarchies/internal/LoggingUtils.js +56 -0
  59. package/lib/cjs/hierarchies/internal/LoggingUtils.js.map +1 -0
  60. package/lib/cjs/hierarchies/internal/SubscriptionScheduler.d.ts +17 -0
  61. package/lib/cjs/hierarchies/internal/SubscriptionScheduler.d.ts.map +1 -0
  62. package/lib/cjs/hierarchies/internal/SubscriptionScheduler.js +57 -0
  63. package/lib/cjs/hierarchies/internal/SubscriptionScheduler.js.map +1 -0
  64. package/lib/cjs/hierarchies/internal/TreeNodesReader.d.ts +37 -0
  65. package/lib/cjs/hierarchies/internal/TreeNodesReader.d.ts.map +1 -0
  66. package/lib/cjs/hierarchies/internal/TreeNodesReader.js +46 -0
  67. package/lib/cjs/hierarchies/internal/TreeNodesReader.js.map +1 -0
  68. package/lib/cjs/hierarchies/internal/operators/DetermineChildren.d.ts +11 -0
  69. package/lib/cjs/hierarchies/internal/operators/DetermineChildren.d.ts.map +1 -0
  70. package/lib/cjs/hierarchies/internal/operators/DetermineChildren.js +34 -0
  71. package/lib/cjs/hierarchies/internal/operators/DetermineChildren.js.map +1 -0
  72. package/lib/cjs/hierarchies/internal/operators/Grouping.d.ts +27 -0
  73. package/lib/cjs/hierarchies/internal/operators/Grouping.d.ts.map +1 -0
  74. package/lib/cjs/hierarchies/internal/operators/Grouping.js +161 -0
  75. package/lib/cjs/hierarchies/internal/operators/Grouping.js.map +1 -0
  76. package/lib/cjs/hierarchies/internal/operators/HideIfNoChildren.d.ts +11 -0
  77. package/lib/cjs/hierarchies/internal/operators/HideIfNoChildren.d.ts.map +1 -0
  78. package/lib/cjs/hierarchies/internal/operators/HideIfNoChildren.js +52 -0
  79. package/lib/cjs/hierarchies/internal/operators/HideIfNoChildren.js.map +1 -0
  80. package/lib/cjs/hierarchies/internal/operators/HideNodesInHierarchy.d.ts +11 -0
  81. package/lib/cjs/hierarchies/internal/operators/HideNodesInHierarchy.d.ts.map +1 -0
  82. package/lib/cjs/hierarchies/internal/operators/HideNodesInHierarchy.js +55 -0
  83. package/lib/cjs/hierarchies/internal/operators/HideNodesInHierarchy.js.map +1 -0
  84. package/lib/cjs/hierarchies/internal/operators/Partition.d.ts +6 -0
  85. package/lib/cjs/hierarchies/internal/operators/Partition.d.ts.map +1 -0
  86. package/lib/cjs/hierarchies/internal/operators/Partition.js +61 -0
  87. package/lib/cjs/hierarchies/internal/operators/Partition.js.map +1 -0
  88. package/lib/cjs/hierarchies/internal/operators/ReduceToMergeMap.d.ts +22 -0
  89. package/lib/cjs/hierarchies/internal/operators/ReduceToMergeMap.d.ts.map +1 -0
  90. package/lib/cjs/hierarchies/internal/operators/ReduceToMergeMap.js +51 -0
  91. package/lib/cjs/hierarchies/internal/operators/ReduceToMergeMap.js.map +1 -0
  92. package/lib/cjs/hierarchies/internal/operators/ReleaseMainThread.d.ts +7 -0
  93. package/lib/cjs/hierarchies/internal/operators/ReleaseMainThread.d.ts.map +1 -0
  94. package/lib/cjs/hierarchies/internal/operators/ReleaseMainThread.js +25 -0
  95. package/lib/cjs/hierarchies/internal/operators/ReleaseMainThread.js.map +1 -0
  96. package/lib/cjs/hierarchies/internal/operators/ShareReplayWithErrors.d.ts +9 -0
  97. package/lib/cjs/hierarchies/internal/operators/ShareReplayWithErrors.d.ts.map +1 -0
  98. package/lib/cjs/hierarchies/internal/operators/ShareReplayWithErrors.js +24 -0
  99. package/lib/cjs/hierarchies/internal/operators/ShareReplayWithErrors.js.map +1 -0
  100. package/lib/cjs/hierarchies/internal/operators/Sorting.d.ts +12 -0
  101. package/lib/cjs/hierarchies/internal/operators/Sorting.d.ts.map +1 -0
  102. package/lib/cjs/hierarchies/internal/operators/Sorting.js +26 -0
  103. package/lib/cjs/hierarchies/internal/operators/Sorting.js.map +1 -0
  104. package/lib/cjs/hierarchies/internal/operators/TapOnce.d.ts +4 -0
  105. package/lib/cjs/hierarchies/internal/operators/TapOnce.d.ts.map +1 -0
  106. package/lib/cjs/hierarchies/internal/operators/TapOnce.js +20 -0
  107. package/lib/cjs/hierarchies/internal/operators/TapOnce.js.map +1 -0
  108. package/lib/cjs/hierarchies/internal/operators/grouping/AutoExpand.d.ts +4 -0
  109. package/lib/cjs/hierarchies/internal/operators/grouping/AutoExpand.d.ts.map +1 -0
  110. package/lib/cjs/hierarchies/internal/operators/grouping/AutoExpand.js +27 -0
  111. package/lib/cjs/hierarchies/internal/operators/grouping/AutoExpand.js.map +1 -0
  112. package/lib/cjs/hierarchies/internal/operators/grouping/BaseClassGrouping.d.ts +10 -0
  113. package/lib/cjs/hierarchies/internal/operators/grouping/BaseClassGrouping.d.ts.map +1 -0
  114. package/lib/cjs/hierarchies/internal/operators/grouping/BaseClassGrouping.js +115 -0
  115. package/lib/cjs/hierarchies/internal/operators/grouping/BaseClassGrouping.js.map +1 -0
  116. package/lib/cjs/hierarchies/internal/operators/grouping/ClassGrouping.d.ts +6 -0
  117. package/lib/cjs/hierarchies/internal/operators/grouping/ClassGrouping.d.ts.map +1 -0
  118. package/lib/cjs/hierarchies/internal/operators/grouping/ClassGrouping.js +56 -0
  119. package/lib/cjs/hierarchies/internal/operators/grouping/ClassGrouping.js.map +1 -0
  120. package/lib/cjs/hierarchies/internal/operators/grouping/GroupHiding.d.ts +4 -0
  121. package/lib/cjs/hierarchies/internal/operators/grouping/GroupHiding.d.ts.map +1 -0
  122. package/lib/cjs/hierarchies/internal/operators/grouping/GroupHiding.js +54 -0
  123. package/lib/cjs/hierarchies/internal/operators/grouping/GroupHiding.js.map +1 -0
  124. package/lib/cjs/hierarchies/internal/operators/grouping/LabelGrouping.d.ts +5 -0
  125. package/lib/cjs/hierarchies/internal/operators/grouping/LabelGrouping.d.ts.map +1 -0
  126. package/lib/cjs/hierarchies/internal/operators/grouping/LabelGrouping.js +61 -0
  127. package/lib/cjs/hierarchies/internal/operators/grouping/LabelGrouping.js.map +1 -0
  128. package/lib/cjs/hierarchies/internal/operators/grouping/PropertiesGrouping.d.ts +31 -0
  129. package/lib/cjs/hierarchies/internal/operators/grouping/PropertiesGrouping.d.ts.map +1 -0
  130. package/lib/cjs/hierarchies/internal/operators/grouping/PropertiesGrouping.js +310 -0
  131. package/lib/cjs/hierarchies/internal/operators/grouping/PropertiesGrouping.js.map +1 -0
  132. package/lib/cjs/hierarchies/internal/operators/grouping/Shared.d.ts +5 -0
  133. package/lib/cjs/hierarchies/internal/operators/grouping/Shared.d.ts.map +1 -0
  134. package/lib/cjs/hierarchies/internal/operators/grouping/Shared.js +30 -0
  135. package/lib/cjs/hierarchies/internal/operators/grouping/Shared.js.map +1 -0
  136. package/lib/cjs/presentation-hierarchies.d.ts +11 -0
  137. package/lib/cjs/presentation-hierarchies.d.ts.map +1 -0
  138. package/lib/cjs/presentation-hierarchies.js +31 -0
  139. package/lib/cjs/presentation-hierarchies.js.map +1 -0
  140. package/lib/esm/hierarchies/HierarchyDefinition.d.ts +228 -0
  141. package/lib/esm/hierarchies/HierarchyDefinition.d.ts.map +1 -0
  142. package/lib/esm/hierarchies/HierarchyDefinition.js +90 -0
  143. package/lib/esm/hierarchies/HierarchyDefinition.js.map +1 -0
  144. package/lib/esm/hierarchies/HierarchyErrors.d.ts +9 -0
  145. package/lib/esm/hierarchies/HierarchyErrors.d.ts.map +1 -0
  146. package/lib/esm/hierarchies/HierarchyErrors.js +16 -0
  147. package/lib/esm/hierarchies/HierarchyErrors.js.map +1 -0
  148. package/lib/esm/hierarchies/HierarchyNode.d.ts +337 -0
  149. package/lib/esm/hierarchies/HierarchyNode.d.ts.map +1 -0
  150. package/lib/esm/hierarchies/HierarchyNode.js +61 -0
  151. package/lib/esm/hierarchies/HierarchyNode.js.map +1 -0
  152. package/lib/esm/hierarchies/HierarchyNodeIdentifier.d.ts +33 -0
  153. package/lib/esm/hierarchies/HierarchyNodeIdentifier.d.ts.map +1 -0
  154. package/lib/esm/hierarchies/HierarchyNodeIdentifier.js +31 -0
  155. package/lib/esm/hierarchies/HierarchyNodeIdentifier.js.map +1 -0
  156. package/lib/esm/hierarchies/HierarchyNodeKey.d.ts +137 -0
  157. package/lib/esm/hierarchies/HierarchyNodeKey.d.ts.map +1 -0
  158. package/lib/esm/hierarchies/HierarchyNodeKey.js +160 -0
  159. package/lib/esm/hierarchies/HierarchyNodeKey.js.map +1 -0
  160. package/lib/esm/hierarchies/HierarchyProvider.d.ts +104 -0
  161. package/lib/esm/hierarchies/HierarchyProvider.d.ts.map +1 -0
  162. package/lib/esm/hierarchies/HierarchyProvider.js +380 -0
  163. package/lib/esm/hierarchies/HierarchyProvider.js.map +1 -0
  164. package/lib/esm/hierarchies/LimitingECSqlQueryExecutor.d.ts +21 -0
  165. package/lib/esm/hierarchies/LimitingECSqlQueryExecutor.d.ts.map +1 -0
  166. package/lib/esm/hierarchies/LimitingECSqlQueryExecutor.js +96 -0
  167. package/lib/esm/hierarchies/LimitingECSqlQueryExecutor.js.map +1 -0
  168. package/lib/esm/hierarchies/Logging.d.ts +13 -0
  169. package/lib/esm/hierarchies/Logging.d.ts.map +1 -0
  170. package/lib/esm/hierarchies/Logging.js +23 -0
  171. package/lib/esm/hierarchies/Logging.js.map +1 -0
  172. package/lib/esm/hierarchies/NodeSelectQueryFactory.d.ts +205 -0
  173. package/lib/esm/hierarchies/NodeSelectQueryFactory.d.ts.map +1 -0
  174. package/lib/esm/hierarchies/NodeSelectQueryFactory.js +463 -0
  175. package/lib/esm/hierarchies/NodeSelectQueryFactory.js.map +1 -0
  176. package/lib/esm/hierarchies/internal/ChildNodeObservablesCache.d.ts +40 -0
  177. package/lib/esm/hierarchies/internal/ChildNodeObservablesCache.d.ts.map +1 -0
  178. package/lib/esm/hierarchies/internal/ChildNodeObservablesCache.js +80 -0
  179. package/lib/esm/hierarchies/internal/ChildNodeObservablesCache.js.map +1 -0
  180. package/lib/esm/hierarchies/internal/Common.d.ts +20 -0
  181. package/lib/esm/hierarchies/internal/Common.d.ts.map +1 -0
  182. package/lib/esm/hierarchies/internal/Common.js +95 -0
  183. package/lib/esm/hierarchies/internal/Common.js.map +1 -0
  184. package/lib/esm/hierarchies/internal/EachValueFrom.d.ts +12 -0
  185. package/lib/esm/hierarchies/internal/EachValueFrom.d.ts.map +1 -0
  186. package/lib/esm/hierarchies/internal/EachValueFrom.js +104 -0
  187. package/lib/esm/hierarchies/internal/EachValueFrom.js.map +1 -0
  188. package/lib/esm/hierarchies/internal/FilteringHierarchyDefinition.d.ts +39 -0
  189. package/lib/esm/hierarchies/internal/FilteringHierarchyDefinition.d.ts.map +1 -0
  190. package/lib/esm/hierarchies/internal/FilteringHierarchyDefinition.js +176 -0
  191. package/lib/esm/hierarchies/internal/FilteringHierarchyDefinition.js.map +1 -0
  192. package/lib/esm/hierarchies/internal/LoggingUtils.d.ts +14 -0
  193. package/lib/esm/hierarchies/internal/LoggingUtils.d.ts.map +1 -0
  194. package/lib/esm/hierarchies/internal/LoggingUtils.js +50 -0
  195. package/lib/esm/hierarchies/internal/LoggingUtils.js.map +1 -0
  196. package/lib/esm/hierarchies/internal/SubscriptionScheduler.d.ts +17 -0
  197. package/lib/esm/hierarchies/internal/SubscriptionScheduler.d.ts.map +1 -0
  198. package/lib/esm/hierarchies/internal/SubscriptionScheduler.js +53 -0
  199. package/lib/esm/hierarchies/internal/SubscriptionScheduler.js.map +1 -0
  200. package/lib/esm/hierarchies/internal/TreeNodesReader.d.ts +37 -0
  201. package/lib/esm/hierarchies/internal/TreeNodesReader.d.ts.map +1 -0
  202. package/lib/esm/hierarchies/internal/TreeNodesReader.js +41 -0
  203. package/lib/esm/hierarchies/internal/TreeNodesReader.js.map +1 -0
  204. package/lib/esm/hierarchies/internal/operators/DetermineChildren.d.ts +11 -0
  205. package/lib/esm/hierarchies/internal/operators/DetermineChildren.d.ts.map +1 -0
  206. package/lib/esm/hierarchies/internal/operators/DetermineChildren.js +30 -0
  207. package/lib/esm/hierarchies/internal/operators/DetermineChildren.js.map +1 -0
  208. package/lib/esm/hierarchies/internal/operators/Grouping.d.ts +27 -0
  209. package/lib/esm/hierarchies/internal/operators/Grouping.d.ts.map +1 -0
  210. package/lib/esm/hierarchies/internal/operators/Grouping.js +156 -0
  211. package/lib/esm/hierarchies/internal/operators/Grouping.js.map +1 -0
  212. package/lib/esm/hierarchies/internal/operators/HideIfNoChildren.d.ts +11 -0
  213. package/lib/esm/hierarchies/internal/operators/HideIfNoChildren.d.ts.map +1 -0
  214. package/lib/esm/hierarchies/internal/operators/HideIfNoChildren.js +48 -0
  215. package/lib/esm/hierarchies/internal/operators/HideIfNoChildren.js.map +1 -0
  216. package/lib/esm/hierarchies/internal/operators/HideNodesInHierarchy.d.ts +11 -0
  217. package/lib/esm/hierarchies/internal/operators/HideNodesInHierarchy.d.ts.map +1 -0
  218. package/lib/esm/hierarchies/internal/operators/HideNodesInHierarchy.js +51 -0
  219. package/lib/esm/hierarchies/internal/operators/HideNodesInHierarchy.js.map +1 -0
  220. package/lib/esm/hierarchies/internal/operators/Partition.d.ts +6 -0
  221. package/lib/esm/hierarchies/internal/operators/Partition.d.ts.map +1 -0
  222. package/lib/esm/hierarchies/internal/operators/Partition.js +57 -0
  223. package/lib/esm/hierarchies/internal/operators/Partition.js.map +1 -0
  224. package/lib/esm/hierarchies/internal/operators/ReduceToMergeMap.d.ts +22 -0
  225. package/lib/esm/hierarchies/internal/operators/ReduceToMergeMap.d.ts.map +1 -0
  226. package/lib/esm/hierarchies/internal/operators/ReduceToMergeMap.js +46 -0
  227. package/lib/esm/hierarchies/internal/operators/ReduceToMergeMap.js.map +1 -0
  228. package/lib/esm/hierarchies/internal/operators/ReleaseMainThread.d.ts +7 -0
  229. package/lib/esm/hierarchies/internal/operators/ReleaseMainThread.d.ts.map +1 -0
  230. package/lib/esm/hierarchies/internal/operators/ReleaseMainThread.js +21 -0
  231. package/lib/esm/hierarchies/internal/operators/ReleaseMainThread.js.map +1 -0
  232. package/lib/esm/hierarchies/internal/operators/ShareReplayWithErrors.d.ts +9 -0
  233. package/lib/esm/hierarchies/internal/operators/ShareReplayWithErrors.d.ts.map +1 -0
  234. package/lib/esm/hierarchies/internal/operators/ShareReplayWithErrors.js +20 -0
  235. package/lib/esm/hierarchies/internal/operators/ShareReplayWithErrors.js.map +1 -0
  236. package/lib/esm/hierarchies/internal/operators/Sorting.d.ts +12 -0
  237. package/lib/esm/hierarchies/internal/operators/Sorting.d.ts.map +1 -0
  238. package/lib/esm/hierarchies/internal/operators/Sorting.js +22 -0
  239. package/lib/esm/hierarchies/internal/operators/Sorting.js.map +1 -0
  240. package/lib/esm/hierarchies/internal/operators/TapOnce.d.ts +4 -0
  241. package/lib/esm/hierarchies/internal/operators/TapOnce.d.ts.map +1 -0
  242. package/lib/esm/hierarchies/internal/operators/TapOnce.js +16 -0
  243. package/lib/esm/hierarchies/internal/operators/TapOnce.js.map +1 -0
  244. package/lib/esm/hierarchies/internal/operators/grouping/AutoExpand.d.ts +4 -0
  245. package/lib/esm/hierarchies/internal/operators/grouping/AutoExpand.d.ts.map +1 -0
  246. package/lib/esm/hierarchies/internal/operators/grouping/AutoExpand.js +23 -0
  247. package/lib/esm/hierarchies/internal/operators/grouping/AutoExpand.js.map +1 -0
  248. package/lib/esm/hierarchies/internal/operators/grouping/BaseClassGrouping.d.ts +10 -0
  249. package/lib/esm/hierarchies/internal/operators/grouping/BaseClassGrouping.d.ts.map +1 -0
  250. package/lib/esm/hierarchies/internal/operators/grouping/BaseClassGrouping.js +109 -0
  251. package/lib/esm/hierarchies/internal/operators/grouping/BaseClassGrouping.js.map +1 -0
  252. package/lib/esm/hierarchies/internal/operators/grouping/ClassGrouping.d.ts +6 -0
  253. package/lib/esm/hierarchies/internal/operators/grouping/ClassGrouping.d.ts.map +1 -0
  254. package/lib/esm/hierarchies/internal/operators/grouping/ClassGrouping.js +52 -0
  255. package/lib/esm/hierarchies/internal/operators/grouping/ClassGrouping.js.map +1 -0
  256. package/lib/esm/hierarchies/internal/operators/grouping/GroupHiding.d.ts +4 -0
  257. package/lib/esm/hierarchies/internal/operators/grouping/GroupHiding.d.ts.map +1 -0
  258. package/lib/esm/hierarchies/internal/operators/grouping/GroupHiding.js +50 -0
  259. package/lib/esm/hierarchies/internal/operators/grouping/GroupHiding.js.map +1 -0
  260. package/lib/esm/hierarchies/internal/operators/grouping/LabelGrouping.d.ts +5 -0
  261. package/lib/esm/hierarchies/internal/operators/grouping/LabelGrouping.d.ts.map +1 -0
  262. package/lib/esm/hierarchies/internal/operators/grouping/LabelGrouping.js +57 -0
  263. package/lib/esm/hierarchies/internal/operators/grouping/LabelGrouping.js.map +1 -0
  264. package/lib/esm/hierarchies/internal/operators/grouping/PropertiesGrouping.d.ts +31 -0
  265. package/lib/esm/hierarchies/internal/operators/grouping/PropertiesGrouping.d.ts.map +1 -0
  266. package/lib/esm/hierarchies/internal/operators/grouping/PropertiesGrouping.js +302 -0
  267. package/lib/esm/hierarchies/internal/operators/grouping/PropertiesGrouping.js.map +1 -0
  268. package/lib/esm/hierarchies/internal/operators/grouping/Shared.d.ts +5 -0
  269. package/lib/esm/hierarchies/internal/operators/grouping/Shared.d.ts.map +1 -0
  270. package/lib/esm/hierarchies/internal/operators/grouping/Shared.js +26 -0
  271. package/lib/esm/hierarchies/internal/operators/grouping/Shared.js.map +1 -0
  272. package/lib/esm/presentation-hierarchies.d.ts +11 -0
  273. package/lib/esm/presentation-hierarchies.d.ts.map +1 -0
  274. package/lib/esm/presentation-hierarchies.js +15 -0
  275. package/lib/esm/presentation-hierarchies.js.map +1 -0
  276. package/media/sample-hierarchy.png +0 -0
  277. package/package.json +71 -0
@@ -0,0 +1,137 @@
1
+ import { InstanceKey } from "@itwin/presentation-shared";
2
+ /**
3
+ * A key for a node that represents one or more ECInstances.
4
+ * @beta
5
+ */
6
+ export interface InstancesNodeKey {
7
+ /** Type of the node */
8
+ type: "instances";
9
+ /**
10
+ * Keys of ECInstances that are represented by the node. Generally, one node represents a single
11
+ * ECInstance, but in some cases (e.g. node merging) there could be more.
12
+ */
13
+ instanceKeys: InstanceKey[];
14
+ }
15
+ /**
16
+ * A key for a class-grouping node.
17
+ * @internal
18
+ */
19
+ export interface ClassGroupingNodeKey {
20
+ /** Type of the node */
21
+ type: "class-grouping";
22
+ /** Full name of the ECClass that this grouping node is grouping by. */
23
+ className: string;
24
+ }
25
+ /**
26
+ * A key for a label-grouping node.
27
+ * @internal
28
+ */
29
+ export interface LabelGroupingNodeKey {
30
+ /** Type of the node */
31
+ type: "label-grouping";
32
+ /** Node label that this grouping node is grouping by. */
33
+ label: string;
34
+ /**
35
+ * Optional group identifier that is assigned to the node key when multiple nodes
36
+ * with the same label shouldn't be grouped together.
37
+ */
38
+ groupId?: string;
39
+ }
40
+ /**
41
+ * A key property grouping node that groups nodes whose values don't fall into any other
42
+ * property group in the hierarchy level.
43
+ *
44
+ * @internal
45
+ */
46
+ export interface PropertyOtherValuesGroupingNodeKey {
47
+ /** Type of the node */
48
+ type: "property-grouping:other";
49
+ /** Identifiers of properties whose values are grouped under this node. */
50
+ properties: Array<{
51
+ className: string;
52
+ propertyName: string;
53
+ }>;
54
+ }
55
+ /**
56
+ * A key for a property grouping node that groups nodes by formatted property value.
57
+ * @internal
58
+ */
59
+ export interface PropertyValueGroupingNodeKey {
60
+ /** Type of the node */
61
+ type: "property-grouping:value";
62
+ /** Name of the property that is used for grouping nodes. */
63
+ propertyName: string;
64
+ /** Full name of the ECClass containing the property. */
65
+ propertyClassName: string;
66
+ /** Formatted property value that this node is grouping by. */
67
+ formattedPropertyValue: string;
68
+ }
69
+ /**
70
+ * A key for a property grouping node that groups nodes by a range of property values.
71
+ * @internal
72
+ */
73
+ export interface PropertyValueRangeGroupingNodeKey {
74
+ /** Type of the node */
75
+ type: "property-grouping:range";
76
+ /** Name of the property that is used for grouping nodes. */
77
+ propertyName: string;
78
+ /** Full name of the ECClass containing the property. */
79
+ propertyClassName: string;
80
+ /** Defines the start of the values' range that this node is grouping by. */
81
+ fromValue: number;
82
+ /** Defines the end of the values' range that this node is grouping by. */
83
+ toValue: number;
84
+ }
85
+ /**
86
+ * A key for a property grouping node.
87
+ * @internal
88
+ */
89
+ export type PropertyGroupingNodeKey = PropertyValueRangeGroupingNodeKey | PropertyValueGroupingNodeKey | PropertyOtherValuesGroupingNodeKey;
90
+ /**
91
+ * A key for one of the instance grouping nodes.
92
+ * @beta
93
+ */
94
+ export type GroupingNodeKey = ClassGroupingNodeKey | LabelGroupingNodeKey | PropertyGroupingNodeKey;
95
+ /**
96
+ * A key for either an instance node or one of the instance grouping nodes.
97
+ * @internal
98
+ */
99
+ export type StandardHierarchyNodeKey = InstancesNodeKey | GroupingNodeKey;
100
+ /**
101
+ * A key that uniquely identifies a node in a hierarchy level.
102
+ * @beta
103
+ */
104
+ export type HierarchyNodeKey = StandardHierarchyNodeKey | string;
105
+ /** @beta */
106
+ export declare namespace HierarchyNodeKey {
107
+ /** Checks whether the given node key is a custom node key. */
108
+ function isCustom(key: HierarchyNodeKey): key is string;
109
+ /** Checks whether the given node key is a `StandardHierarchyNodeKey`. */
110
+ function isStandard(key: HierarchyNodeKey): key is StandardHierarchyNodeKey;
111
+ /** Checks whether the given node key is an `InstancesNodeKey`. */
112
+ function isInstances(key: HierarchyNodeKey): key is InstancesNodeKey;
113
+ /** Checks whether the given node key is a `GroupingNodeKey`. */
114
+ function isGrouping(key: HierarchyNodeKey): key is GroupingNodeKey;
115
+ /** Checks whether the given node key is a `ClassGroupingNodeKey`. */
116
+ function isClassGrouping(key: HierarchyNodeKey): key is ClassGroupingNodeKey;
117
+ /** Checks whether the given node key is a `LabelGroupingNodeKey`. */
118
+ function isLabelGrouping(key: HierarchyNodeKey): key is LabelGroupingNodeKey;
119
+ /** Checks whether the given node key is a `PropertyOtherValuesGroupingNodeKey`. */
120
+ function isPropertyOtherValuesGrouping(key: HierarchyNodeKey): key is PropertyOtherValuesGroupingNodeKey;
121
+ /** Checks whether the given node key is a `PropertyValueRangeGroupingNodeKey`. */
122
+ function isPropertyValueRangeGrouping(key: HierarchyNodeKey): key is PropertyValueRangeGroupingNodeKey;
123
+ /** Checks whether the given node key is a `PropertyValueGroupingNodeKey`. */
124
+ function isPropertyValueGrouping(key: HierarchyNodeKey): key is PropertyValueGroupingNodeKey;
125
+ /** Checks whether the given node key is a `PropertyGroupingNodeKey`. */
126
+ function isPropertyGrouping(key: HierarchyNodeKey): key is PropertyGroupingNodeKey;
127
+ /**
128
+ * Compares two given keys. Returns:
129
+ * - `0` if they are equal,
130
+ * - `negative value` if lhs key is less than rhs key,
131
+ * - `positive value` if lhs key is more than rhs key.
132
+ */
133
+ function compare(lhs: HierarchyNodeKey, rhs: HierarchyNodeKey): number;
134
+ /** Checks whether the two given keys are equal. */
135
+ function equals(lhs: HierarchyNodeKey, rhs: HierarchyNodeKey): boolean;
136
+ }
137
+ //# sourceMappingURL=HierarchyNodeKey.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HierarchyNodeKey.d.ts","sourceRoot":"","sources":["../../../src/hierarchies/HierarchyNodeKey.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAEzD;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,uBAAuB;IACvB,IAAI,EAAE,WAAW,CAAC;IAElB;;;OAGG;IACH,YAAY,EAAE,WAAW,EAAE,CAAC;CAC7B;AAED;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,uBAAuB;IACvB,IAAI,EAAE,gBAAgB,CAAC;IAEvB,uEAAuE;IACvE,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,uBAAuB;IACvB,IAAI,EAAE,gBAAgB,CAAC;IAEvB,yDAAyD;IACzD,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,OAAO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yE;IACzE,SAAgB,UAAU,CAAC,GAAG,EAAE,gBAAgB,GAAG,GAAG,IAAI,wBAAwB,CAEjF;IAED,kEAAkE;IAClE,SAAgB,WAAW,CAAC,GAAG,EAAE,gBAAgB,GAAG,GAAG,IAAI,gBAAgB,CAE1E;IAED,gEAAgE;IAChE,SAAgB,UAAU,CAAC,GAAG,EAAE,gBAAgB,GAAG,GAAG,IAAI,eAAe,CAExE;IAED,qEAAqE;IACrE,SAAgB,eAAe,CAAC,GAAG,EAAE,gBAAgB,GAAG,GAAG,IAAI,oBAAoB,CAElF;IAED,qEAAqE;IACrE,SAAgB,eAAe,CAAC,GAAG,EAAE,gBAAgB,GAAG,GAAG,IAAI,oBAAoB,CAElF;IAED,mFAAmF;IACnF,SAAgB,6BAA6B,CAAC,GAAG,EAAE,gBAAgB,GAAG,GAAG,IAAI,kCAAkC,CAE9G;IAED,kFAAkF;IAClF,SAAgB,4BAA4B,CAAC,GAAG,EAAE,gBAAgB,GAAG,GAAG,IAAI,iCAAiC,CAE5G;IAED,6EAA6E;IAC7E,SAAgB,uBAAuB,CAAC,GAAG,EAAE,gBAAgB,GAAG,GAAG,IAAI,4BAA4B,CAElG;IAED,wEAAwE;IACxE,SAAgB,kBAAkB,CAAC,GAAG,EAAE,gBAAgB,GAAG,GAAG,IAAI,uBAAuB,CAExF;IAED;;;;;OAKG;IACH,SAAgB,OAAO,CAAC,GAAG,EAAE,gBAAgB,EAAE,GAAG,EAAE,gBAAgB,GAAG,MAAM,CAuF5E;IAED,mDAAmD;IACnD,SAAgB,MAAM,CAAC,GAAG,EAAE,gBAAgB,EAAE,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAE5E;CACF"}
@@ -0,0 +1,160 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ import { assert, compareStrings, compareStringsOrUndefined } from "@itwin/core-bentley";
6
+ import { InstanceKey } from "@itwin/presentation-shared";
7
+ /** @beta */
8
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
9
+ export var HierarchyNodeKey;
10
+ (function (HierarchyNodeKey) {
11
+ /** Checks whether the given node key is a custom node key. */
12
+ function isCustom(key) {
13
+ return typeof key === "string";
14
+ }
15
+ HierarchyNodeKey.isCustom = isCustom;
16
+ /** Checks whether the given node key is a `StandardHierarchyNodeKey`. */
17
+ function isStandard(key) {
18
+ return !!key.type;
19
+ }
20
+ HierarchyNodeKey.isStandard = isStandard;
21
+ /** Checks whether the given node key is an `InstancesNodeKey`. */
22
+ function isInstances(key) {
23
+ return isStandard(key) && key.type === "instances";
24
+ }
25
+ HierarchyNodeKey.isInstances = isInstances;
26
+ /** Checks whether the given node key is a `GroupingNodeKey`. */
27
+ function isGrouping(key) {
28
+ return isStandard(key) && !isInstances(key);
29
+ }
30
+ HierarchyNodeKey.isGrouping = isGrouping;
31
+ /** Checks whether the given node key is a `ClassGroupingNodeKey`. */
32
+ function isClassGrouping(key) {
33
+ return isStandard(key) && key.type === "class-grouping";
34
+ }
35
+ HierarchyNodeKey.isClassGrouping = isClassGrouping;
36
+ /** Checks whether the given node key is a `LabelGroupingNodeKey`. */
37
+ function isLabelGrouping(key) {
38
+ return isStandard(key) && key.type === "label-grouping";
39
+ }
40
+ HierarchyNodeKey.isLabelGrouping = isLabelGrouping;
41
+ /** Checks whether the given node key is a `PropertyOtherValuesGroupingNodeKey`. */
42
+ function isPropertyOtherValuesGrouping(key) {
43
+ return isStandard(key) && key.type === "property-grouping:other";
44
+ }
45
+ HierarchyNodeKey.isPropertyOtherValuesGrouping = isPropertyOtherValuesGrouping;
46
+ /** Checks whether the given node key is a `PropertyValueRangeGroupingNodeKey`. */
47
+ function isPropertyValueRangeGrouping(key) {
48
+ return isStandard(key) && key.type === "property-grouping:range";
49
+ }
50
+ HierarchyNodeKey.isPropertyValueRangeGrouping = isPropertyValueRangeGrouping;
51
+ /** Checks whether the given node key is a `PropertyValueGroupingNodeKey`. */
52
+ function isPropertyValueGrouping(key) {
53
+ return isStandard(key) && key.type === "property-grouping:value";
54
+ }
55
+ HierarchyNodeKey.isPropertyValueGrouping = isPropertyValueGrouping;
56
+ /** Checks whether the given node key is a `PropertyGroupingNodeKey`. */
57
+ function isPropertyGrouping(key) {
58
+ return isPropertyOtherValuesGrouping(key) || isPropertyValueRangeGrouping(key) || isPropertyValueGrouping(key);
59
+ }
60
+ HierarchyNodeKey.isPropertyGrouping = isPropertyGrouping;
61
+ /**
62
+ * Compares two given keys. Returns:
63
+ * - `0` if they are equal,
64
+ * - `negative value` if lhs key is less than rhs key,
65
+ * - `positive value` if lhs key is more than rhs key.
66
+ */
67
+ function compare(lhs, rhs) {
68
+ if (typeof lhs === "string") {
69
+ if (typeof rhs !== "string") {
70
+ return 1;
71
+ }
72
+ return compareStrings(lhs, rhs);
73
+ }
74
+ if (typeof rhs === "string") {
75
+ return -1;
76
+ }
77
+ const typeCompareResult = compareStrings(lhs.type, rhs.type);
78
+ if (typeCompareResult !== 0) {
79
+ return typeCompareResult;
80
+ }
81
+ switch (lhs.type) {
82
+ case "instances": {
83
+ assert(rhs.type === "instances");
84
+ if (lhs.instanceKeys.length !== rhs.instanceKeys.length) {
85
+ return lhs.instanceKeys.length > rhs.instanceKeys.length ? 1 : -1;
86
+ }
87
+ for (let i = 0; i < lhs.instanceKeys.length; ++i) {
88
+ const instanceKeyCompareResult = InstanceKey.compare(lhs.instanceKeys[i], rhs.instanceKeys[i]);
89
+ if (instanceKeyCompareResult !== 0) {
90
+ return instanceKeyCompareResult;
91
+ }
92
+ }
93
+ return 0;
94
+ }
95
+ case "class-grouping": {
96
+ assert(rhs.type === "class-grouping");
97
+ return compareStrings(lhs.className, rhs.className);
98
+ }
99
+ case "label-grouping": {
100
+ assert(rhs.type === "label-grouping");
101
+ const labelCompareResult = compareStrings(lhs.label, rhs.label);
102
+ if (labelCompareResult !== 0) {
103
+ return labelCompareResult;
104
+ }
105
+ return compareStringsOrUndefined(lhs.groupId, rhs.groupId);
106
+ }
107
+ case "property-grouping:other": {
108
+ assert(rhs.type === "property-grouping:other");
109
+ if (lhs.properties.length !== rhs.properties.length) {
110
+ return lhs.properties.length - rhs.properties.length;
111
+ }
112
+ for (let i = 0; i < lhs.properties.length; ++i) {
113
+ const classCompareResult = compareStrings(lhs.properties[i].className, rhs.properties[i].className);
114
+ if (classCompareResult !== 0) {
115
+ return classCompareResult;
116
+ }
117
+ const nameCompareResult = compareStrings(lhs.properties[i].propertyName, rhs.properties[i].propertyName);
118
+ if (nameCompareResult !== 0) {
119
+ return nameCompareResult;
120
+ }
121
+ }
122
+ return 0;
123
+ }
124
+ case "property-grouping:value": {
125
+ assert(rhs.type === "property-grouping:value");
126
+ const propertyClassNameCompareResult = compareStrings(lhs.propertyClassName, rhs.propertyClassName);
127
+ if (propertyClassNameCompareResult !== 0) {
128
+ return propertyClassNameCompareResult;
129
+ }
130
+ const propertyNameCompareResult = compareStrings(lhs.propertyName, rhs.propertyName);
131
+ if (propertyNameCompareResult !== 0) {
132
+ return propertyNameCompareResult;
133
+ }
134
+ return compareStrings(lhs.formattedPropertyValue, rhs.formattedPropertyValue);
135
+ }
136
+ case "property-grouping:range": {
137
+ assert(rhs.type === "property-grouping:range");
138
+ const propertyClassNameCompareResult = compareStrings(lhs.propertyClassName, rhs.propertyClassName);
139
+ if (propertyClassNameCompareResult !== 0) {
140
+ return propertyClassNameCompareResult;
141
+ }
142
+ const propertyNameCompareResult = compareStrings(lhs.propertyName, rhs.propertyName);
143
+ if (propertyNameCompareResult !== 0) {
144
+ return propertyNameCompareResult;
145
+ }
146
+ if (lhs.fromValue !== rhs.fromValue) {
147
+ return lhs.fromValue > rhs.fromValue ? 1 : -1;
148
+ }
149
+ return lhs.toValue > rhs.toValue ? 1 : lhs.toValue < rhs.toValue ? -1 : 0;
150
+ }
151
+ }
152
+ }
153
+ HierarchyNodeKey.compare = compare;
154
+ /** Checks whether the two given keys are equal. */
155
+ function equals(lhs, rhs) {
156
+ return compare(lhs, rhs) === 0;
157
+ }
158
+ HierarchyNodeKey.equals = equals;
159
+ })(HierarchyNodeKey || (HierarchyNodeKey = {}));
160
+ //# sourceMappingURL=HierarchyNodeKey.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HierarchyNodeKey.js","sourceRoot":"","sources":["../../../src/hierarchies/HierarchyNodeKey.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AACxF,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AA8HzD,YAAY;AACZ,2DAA2D;AAC3D,MAAM,KAAW,gBAAgB,CAsJhC;AAtJD,WAAiB,gBAAgB;IAC/B,8DAA8D;IAC9D,SAAgB,QAAQ,CAAC,GAAqB;QAC5C,OAAO,OAAO,GAAG,KAAK,QAAQ,CAAC;IACjC,CAAC;IAFe,yBAAQ,WAEvB,CAAA;IAED,yEAAyE;IACzE,SAAgB,UAAU,CAAC,GAAqB;QAC9C,OAAO,CAAC,CAAE,GAAgC,CAAC,IAAI,CAAC;IAClD,CAAC;IAFe,2BAAU,aAEzB,CAAA;IAED,kEAAkE;IAClE,SAAgB,WAAW,CAAC,GAAqB;QAC/C,OAAO,UAAU,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,IAAI,KAAK,WAAW,CAAC;IACrD,CAAC;IAFe,4BAAW,cAE1B,CAAA;IAED,gEAAgE;IAChE,SAAgB,UAAU,CAAC,GAAqB;QAC9C,OAAO,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IAC9C,CAAC;IAFe,2BAAU,aAEzB,CAAA;IAED,qEAAqE;IACrE,SAAgB,eAAe,CAAC,GAAqB;QACnD,OAAO,UAAU,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,IAAI,KAAK,gBAAgB,CAAC;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C,CAAC,CAAC,CAAC;gBAChD,CAAC;gBACD,OAAO,GAAG,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAC5E,CAAC;QACH,CAAC;IACH,CAAC;IAvFe,wBAAO,UAuFtB,CAAA;IAED,mDAAmD;IACnD,SAAgB,MAAM,CAAC,GAAqB,EAAE,GAAqB;QACjE,OAAO,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC;IACjC,CAAC;IAFe,uBAAM,SAErB,CAAA;AACH,CAAC,EAtJgB,gBAAgB,KAAhB,gBAAgB,QAsJhC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n\nimport { assert, compareStrings, compareStringsOrUndefined } from \"@itwin/core-bentley\";\nimport { InstanceKey } from \"@itwin/presentation-shared\";\n\n/**\n * A key for a node that represents one or more ECInstances.\n * @beta\n */\nexport interface InstancesNodeKey {\n /** Type of the node */\n type: \"instances\";\n\n /**\n * Keys of ECInstances that are represented by the node. Generally, one node represents a single\n * ECInstance, but in some cases (e.g. node merging) there could be more.\n */\n instanceKeys: InstanceKey[];\n}\n\n/**\n * A key for a class-grouping node.\n * @internal\n */\nexport interface ClassGroupingNodeKey {\n /** Type of the node */\n type: \"class-grouping\";\n\n /** Full name of the ECClass that this grouping node is grouping by. */\n className: string;\n}\n\n/**\n * A key for a label-grouping node.\n * @internal\n */\nexport interface LabelGroupingNodeKey {\n /** Type of the node */\n type: \"label-grouping\";\n\n /** Node label that this grouping node is grouping by. */\n label: string;\n\n /**\n * Optional group identifier that is assigned to the node key when multiple nodes\n * with the same label shouldn't be grouped together.\n */\n groupId?: string;\n}\n\n/**\n * A key property grouping node that groups nodes whose values don't fall into any other\n * property group in the hierarchy level.\n *\n * @internal\n */\nexport interface PropertyOtherValuesGroupingNodeKey {\n /** Type of the node */\n type: \"property-grouping:other\";\n /** Identifiers of properties whose values are grouped under this node. */\n properties: Array<{\n className: string;\n propertyName: string;\n }>;\n}\n\n/**\n * A key for a property grouping node that groups nodes by formatted property value.\n * @internal\n */\nexport interface PropertyValueGroupingNodeKey {\n /** Type of the node */\n type: \"property-grouping:value\";\n\n /** Name of the property that is used for grouping nodes. */\n propertyName: string;\n\n /** Full name of the ECClass containing the property. */\n propertyClassName: string;\n\n /** Formatted property value that this node is grouping by. */\n formattedPropertyValue: string;\n}\n\n/**\n * A key for a property grouping node that groups nodes by a range of property values.\n * @internal\n */\nexport interface PropertyValueRangeGroupingNodeKey {\n /** Type of the node */\n type: \"property-grouping:range\";\n\n /** Name of the property that is used for grouping nodes. */\n propertyName: string;\n\n /** Full name of the ECClass containing the property. */\n propertyClassName: string;\n\n /** Defines the start of the values' range that this node is grouping by. */\n fromValue: number;\n\n /** Defines the end of the values' range that this node is grouping by. */\n toValue: number;\n}\n\n/**\n * A key for a property grouping node.\n * @internal\n */\nexport type PropertyGroupingNodeKey = PropertyValueRangeGroupingNodeKey | PropertyValueGroupingNodeKey | PropertyOtherValuesGroupingNodeKey;\n\n/**\n * A key for one of the instance grouping nodes.\n * @beta\n */\nexport type GroupingNodeKey = ClassGroupingNodeKey | LabelGroupingNodeKey | PropertyGroupingNodeKey;\n\n/**\n * A key for either an instance node or one of the instance grouping nodes.\n * @internal\n */\nexport type StandardHierarchyNodeKey = InstancesNodeKey | GroupingNodeKey;\n\n/**\n * A key that uniquely identifies a node in a hierarchy level.\n * @beta\n */\nexport type HierarchyNodeKey = StandardHierarchyNodeKey | string;\n\n/** @beta */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport namespace HierarchyNodeKey {\n /** Checks whether the given node key is a custom node key. */\n export function isCustom(key: HierarchyNodeKey): key is string {\n return typeof key === \"string\";\n }\n\n /** Checks whether the given node key is a `StandardHierarchyNodeKey`. */\n export function isStandard(key: HierarchyNodeKey): key is StandardHierarchyNodeKey {\n return !!(key as StandardHierarchyNodeKey).type;\n }\n\n /** Checks whether the given node key is an `InstancesNodeKey`. */\n export function isInstances(key: HierarchyNodeKey): key is InstancesNodeKey {\n return isStandard(key) && key.type === \"instances\";\n }\n\n /** Checks whether the given node key is a `GroupingNodeKey`. */\n export function isGrouping(key: HierarchyNodeKey): key is GroupingNodeKey {\n return isStandard(key) && !isInstances(key);\n }\n\n /** Checks whether the given node key is a `ClassGroupingNodeKey`. */\n export function isClassGrouping(key: HierarchyNodeKey): key is ClassGroupingNodeKey {\n return isStandard(key) && key.type === \"class-grouping\";\n }\n\n /** Checks whether the given node key is a `LabelGroupingNodeKey`. */\n export function isLabelGrouping(key: HierarchyNodeKey): key is LabelGroupingNodeKey {\n return isStandard(key) && key.type === \"label-grouping\";\n }\n\n /** Checks whether the given node key is a `PropertyOtherValuesGroupingNodeKey`. */\n export function isPropertyOtherValuesGrouping(key: HierarchyNodeKey): key is PropertyOtherValuesGroupingNodeKey {\n return isStandard(key) && key.type === \"property-grouping:other\";\n }\n\n /** Checks whether the given node key is a `PropertyValueRangeGroupingNodeKey`. */\n export function isPropertyValueRangeGrouping(key: HierarchyNodeKey): key is PropertyValueRangeGroupingNodeKey {\n return isStandard(key) && key.type === \"property-grouping:range\";\n }\n\n /** Checks whether the given node key is a `PropertyValueGroupingNodeKey`. */\n export function isPropertyValueGrouping(key: HierarchyNodeKey): key is PropertyValueGroupingNodeKey {\n return isStandard(key) && key.type === \"property-grouping:value\";\n }\n\n /** Checks whether the given node key is a `PropertyGroupingNodeKey`. */\n export function isPropertyGrouping(key: HierarchyNodeKey): key is PropertyGroupingNodeKey {\n return isPropertyOtherValuesGrouping(key) || isPropertyValueRangeGrouping(key) || isPropertyValueGrouping(key);\n }\n\n /**\n * Compares two given keys. Returns:\n * - `0` if they are equal,\n * - `negative value` if lhs key is less than rhs key,\n * - `positive value` if lhs key is more than rhs key.\n */\n export function compare(lhs: HierarchyNodeKey, rhs: HierarchyNodeKey): number {\n if (typeof lhs === \"string\") {\n if (typeof rhs !== \"string\") {\n return 1;\n }\n return compareStrings(lhs, rhs);\n }\n if (typeof rhs === \"string\") {\n return -1;\n }\n\n const typeCompareResult = compareStrings(lhs.type, rhs.type);\n if (typeCompareResult !== 0) {\n return typeCompareResult;\n }\n\n switch (lhs.type) {\n case \"instances\": {\n assert(rhs.type === \"instances\");\n if (lhs.instanceKeys.length !== rhs.instanceKeys.length) {\n return lhs.instanceKeys.length > rhs.instanceKeys.length ? 1 : -1;\n }\n for (let i = 0; i < lhs.instanceKeys.length; ++i) {\n const instanceKeyCompareResult = InstanceKey.compare(lhs.instanceKeys[i], rhs.instanceKeys[i]);\n if (instanceKeyCompareResult !== 0) {\n return instanceKeyCompareResult;\n }\n }\n return 0;\n }\n case \"class-grouping\": {\n assert(rhs.type === \"class-grouping\");\n return compareStrings(lhs.className, rhs.className);\n }\n case \"label-grouping\": {\n assert(rhs.type === \"label-grouping\");\n const labelCompareResult = compareStrings(lhs.label, rhs.label);\n if (labelCompareResult !== 0) {\n return labelCompareResult;\n }\n return compareStringsOrUndefined(lhs.groupId, rhs.groupId);\n }\n case \"property-grouping:other\": {\n assert(rhs.type === \"property-grouping:other\");\n if (lhs.properties.length !== rhs.properties.length) {\n return lhs.properties.length - rhs.properties.length;\n }\n for (let i = 0; i < lhs.properties.length; ++i) {\n const classCompareResult = compareStrings(lhs.properties[i].className, rhs.properties[i].className);\n if (classCompareResult !== 0) {\n return classCompareResult;\n }\n const nameCompareResult = compareStrings(lhs.properties[i].propertyName, rhs.properties[i].propertyName);\n if (nameCompareResult !== 0) {\n return nameCompareResult;\n }\n }\n return 0;\n }\n case \"property-grouping:value\": {\n assert(rhs.type === \"property-grouping:value\");\n const propertyClassNameCompareResult = compareStrings(lhs.propertyClassName, rhs.propertyClassName);\n if (propertyClassNameCompareResult !== 0) {\n return propertyClassNameCompareResult;\n }\n const propertyNameCompareResult = compareStrings(lhs.propertyName, rhs.propertyName);\n if (propertyNameCompareResult !== 0) {\n return propertyNameCompareResult;\n }\n return compareStrings(lhs.formattedPropertyValue, rhs.formattedPropertyValue);\n }\n case \"property-grouping:range\": {\n assert(rhs.type === \"property-grouping:range\");\n const propertyClassNameCompareResult = compareStrings(lhs.propertyClassName, rhs.propertyClassName);\n if (propertyClassNameCompareResult !== 0) {\n return propertyClassNameCompareResult;\n }\n const propertyNameCompareResult = compareStrings(lhs.propertyName, rhs.propertyName);\n if (propertyNameCompareResult !== 0) {\n return propertyNameCompareResult;\n }\n if (lhs.fromValue !== rhs.fromValue) {\n return lhs.fromValue > rhs.fromValue ? 1 : -1;\n }\n return lhs.toValue > rhs.toValue ? 1 : lhs.toValue < rhs.toValue ? -1 : 0;\n }\n }\n }\n\n /** Checks whether the two given keys are equal. */\n export function equals(lhs: HierarchyNodeKey, rhs: HierarchyNodeKey): boolean {\n return compare(lhs, rhs) === 0;\n }\n}\n"]}
@@ -0,0 +1,104 @@
1
+ import { GenericInstanceFilter } from "@itwin/core-common";
2
+ import { ECClassHierarchyInspector, ECSchemaProvider, InstanceKey, IPrimitiveValueFormatter } from "@itwin/presentation-shared";
3
+ import { HierarchyDefinition } from "./HierarchyDefinition";
4
+ import { HierarchyNode, ParentHierarchyNode } from "./HierarchyNode";
5
+ import { HierarchyNodeIdentifiersPath } from "./HierarchyNodeIdentifier";
6
+ import { LimitingECSqlQueryExecutor } from "./LimitingECSqlQueryExecutor";
7
+ /**
8
+ * Props for the `HierarchyProvider.getNodes` call.
9
+ * @beta
10
+ */
11
+ export interface GetHierarchyNodesProps {
12
+ /** Parent node to get children for. Pass `undefined` to get root nodes. */
13
+ parentNode: ParentHierarchyNode | undefined;
14
+ /** Optional hierarchy level filter. Has no effect if `parentNode` is a `GroupingNode`. */
15
+ instanceFilter?: GenericInstanceFilter;
16
+ /**
17
+ * Optional hierarchy level size limit override. This value is passed to `LimitingECSqlQueryExecutor` used
18
+ * by this provider to override query rows limit per hierarchy level. If not provided, defaults to whatever
19
+ * is used by the limiting query executor.
20
+ *
21
+ * Has no effect if `parentNode` is a `GroupingNode`.
22
+ */
23
+ hierarchyLevelSizeLimit?: number | "unbounded";
24
+ /** When set to true ignores the cache and fetches the nodes again. */
25
+ ignoreCache?: boolean;
26
+ }
27
+ /**
28
+ * An interface for a hierarchy provider knows how to create child nodes for a given parent node.
29
+ * @beta
30
+ */
31
+ export interface HierarchyProvider {
32
+ /** Gets nodes for the specified parent node. */
33
+ getNodes(props: GetHierarchyNodesProps): AsyncIterableIterator<HierarchyNode>;
34
+ /** Gets instance keys for the specified parent node. */
35
+ getNodeInstanceKeys(props: Omit<GetHierarchyNodesProps, "ignoreCache">): AsyncIterableIterator<InstanceKey>;
36
+ /** Notifies the provider that the underlying data source has changed and caches should be invalidated. */
37
+ notifyDataSourceChanged(): void;
38
+ /**
39
+ * Overrides the property value formatter used by the hierarchy provider. Setting to `undefined`
40
+ * resets the formatter to the result of `createDefaultValueFormatter` called with default parameters.
41
+ */
42
+ setFormatter(formatter: IPrimitiveValueFormatter | undefined): void;
43
+ }
44
+ /**
45
+ * Defines the strings used by hierarchy provider.
46
+ */
47
+ interface HierarchyProviderLocalizedStrings {
48
+ /**
49
+ * A string for "Unspecified". Used for labels of property grouping nodes
50
+ * that group by an empty value.
51
+ */
52
+ unspecified: string;
53
+ /**
54
+ * A string for "Other". Used for label of a range property grouping node that
55
+ * groups values which don't fit into any other range.
56
+ */
57
+ other: string;
58
+ }
59
+ /**
60
+ * Props for `createHierarchyProvider`.
61
+ */
62
+ interface HierarchyProviderProps {
63
+ /**
64
+ * An object that provides access to iModel's data and metadata.
65
+ *
66
+ * @see `ECSchemaProvider`
67
+ * @see `LimitingECSqlQueryExecutor`
68
+ * @see `ECClassHierarchyInspector`
69
+ */
70
+ imodelAccess: ECSchemaProvider & LimitingECSqlQueryExecutor & ECClassHierarchyInspector;
71
+ /**
72
+ * A function that returns a hierarchy definition, describing how the hierarchy that the provider should be create. The
73
+ * function is called once during the provider's construction.
74
+ */
75
+ hierarchyDefinition: HierarchyDefinition;
76
+ /** Maximum number of queries that the provider attempts to execute in parallel. Defaults to `10`. */
77
+ queryConcurrency?: number;
78
+ /**
79
+ * The amount of queries whose results are stored in-memory for quick retrieval. Defaults to `1`,
80
+ * which means only results of the last run query are cached.
81
+ */
82
+ queryCacheSize?: number;
83
+ /**
84
+ * A values formatter for formatting node labels. Defaults to the
85
+ * result of `createDefaultValueFormatter` called with default parameters.
86
+ */
87
+ formatter?: IPrimitiveValueFormatter;
88
+ /** A set of localized strings to use. Defaults to English strings. */
89
+ localizedStrings?: Partial<HierarchyProviderLocalizedStrings>;
90
+ /** Props for filtering the hierarchy. */
91
+ filtering?: {
92
+ /** A list of node identifiers from root to target node. */
93
+ paths: HierarchyNodeIdentifiersPath[];
94
+ };
95
+ }
96
+ /**
97
+ * Creates an instance of `HierarchyProvider` that creates a hierarchy based on given iModel and
98
+ * a hierarchy definition, which defines each hierarchy level through ECSQL queries.
99
+ *
100
+ * @beta
101
+ */
102
+ export declare function createHierarchyProvider(props: HierarchyProviderProps): HierarchyProvider;
103
+ export {};
104
+ //# sourceMappingURL=HierarchyProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HierarchyProvider.d.ts","sourceRoot":"","sources":["../../../src/hierarchies/HierarchyProvider.ts"],"names":[],"mappings":"AAyBA,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAGL,yBAAyB,EACzB,gBAAgB,EAIhB,WAAW,EACX,wBAAwB,EAEzB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAA6B,mBAAmB,EAA4B,MAAM,uBAAuB,CAAC;AAEjH,OAAO,EACL,aAAa,EAEb,mBAAmB,EAMpB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,4BAA4B,EAAE,MAAM,2BAA2B,CAAC;AAiBz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