@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,310 @@
1
+ "use strict";
2
+ /*---------------------------------------------------------------------------------------------
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.createPropertiesGroupingHandlers = exports.doRangesMatch = exports.doPreviousPropertiesMatch = exports.getUniquePropertiesGroupInfo = exports.createPropertyGroups = void 0;
8
+ const core_bentley_1 = require("@itwin/core-bentley");
9
+ const presentation_shared_1 = require("@itwin/presentation-shared");
10
+ const HierarchyNode_1 = require("../../../HierarchyNode");
11
+ const HierarchyNodeKey_1 = require("../../../HierarchyNodeKey");
12
+ /** @internal */
13
+ async function createPropertyGroups(nodesToGroup, nodesAlreadyGrouped, handlerGroupingParams, valueFormatter, localizedStrings, classHierarchyInspector) {
14
+ let otherValuesGrouping;
15
+ const getOtherValuesGroupingNode = () => {
16
+ if (!otherValuesGrouping) {
17
+ const node = nodesAlreadyGrouped.find((n) => HierarchyNodeKey_1.HierarchyNodeKey.isPropertyOtherValuesGrouping(n.key));
18
+ if (node) {
19
+ otherValuesGrouping = { node, new: false };
20
+ }
21
+ }
22
+ otherValuesGrouping ??= {
23
+ node: {
24
+ key: {
25
+ type: "property-grouping:other",
26
+ properties: [],
27
+ },
28
+ parentKeys: [],
29
+ groupedInstanceKeys: [],
30
+ label: localizedStrings.other,
31
+ children: [],
32
+ },
33
+ new: true,
34
+ };
35
+ return otherValuesGrouping.node;
36
+ };
37
+ const releaseMainThread = (0, presentation_shared_1.createMainThreadReleaseOnTimePassedHandler)();
38
+ const groupings = { ungrouped: [], grouped: new Map() };
39
+ for (const node of nodesToGroup) {
40
+ await releaseMainThread();
41
+ const byProperties = node.processingParams?.grouping?.byProperties;
42
+ if (!byProperties) {
43
+ groupings.ungrouped.push(node);
44
+ continue;
45
+ }
46
+ if (!(await shouldCreatePropertyGroup(handlerGroupingParams, byProperties, node.key.instanceKeys[0].className, classHierarchyInspector))) {
47
+ groupings.ungrouped.push(node);
48
+ continue;
49
+ }
50
+ const currentProperty = byProperties.propertyGroups[handlerGroupingParams.previousPropertiesGroupingInfo.length];
51
+ const propertyIdentifier = {
52
+ propertyName: currentProperty.propertyName,
53
+ propertyClassName: byProperties.propertiesClassName,
54
+ };
55
+ const propertyClass = handlerGroupingParams.ecClass;
56
+ const property = await propertyClass.getProperty(currentProperty.propertyName);
57
+ if (!property?.isPrimitive() || property.primitiveType === "Binary" || property.primitiveType === "IGeometry") {
58
+ groupings.ungrouped.push(node);
59
+ continue;
60
+ }
61
+ const koqName = (await property.kindOfQuantity)?.fullName;
62
+ if (!currentProperty.propertyValue) {
63
+ if (byProperties.createGroupForUnspecifiedValues) {
64
+ addGroupingToMap(groupings.grouped, `${currentProperty.propertyName}:Unspecified`, {
65
+ label: localizedStrings.unspecified,
66
+ propertyGroupingNodeKey: {
67
+ type: "property-grouping:value",
68
+ ...propertyIdentifier,
69
+ formattedPropertyValue: "",
70
+ },
71
+ }, node);
72
+ continue;
73
+ }
74
+ groupings.ungrouped.push(node);
75
+ continue;
76
+ }
77
+ if (currentProperty.ranges) {
78
+ if (typeof currentProperty.propertyValue === "number") {
79
+ const propValue = currentProperty.propertyValue;
80
+ const matchingRange = currentProperty.ranges.find((range) => propValue >= range.fromValue && propValue <= range.toValue);
81
+ if (matchingRange) {
82
+ const fromValueTypedPrimitive = {
83
+ type: Number.isInteger(matchingRange.fromValue) ? "Integer" : "Double",
84
+ extendedType: property.extendedTypeName,
85
+ koqName,
86
+ value: matchingRange.fromValue,
87
+ };
88
+ const toValueTypedPrimitive = {
89
+ type: Number.isInteger(matchingRange.toValue) ? "Integer" : "Double",
90
+ extendedType: property.extendedTypeName,
91
+ koqName,
92
+ value: matchingRange.toValue,
93
+ };
94
+ const rangeLabel = matchingRange.rangeLabel ?? `${await valueFormatter(fromValueTypedPrimitive)} - ${await valueFormatter(toValueTypedPrimitive)}`;
95
+ addGroupingToMap(groupings.grouped, `${currentProperty.propertyName}:[${matchingRange.fromValue}-${matchingRange.toValue}]${matchingRange.rangeLabel ? `(${matchingRange.rangeLabel})` : ""}`, {
96
+ label: rangeLabel,
97
+ propertyGroupingNodeKey: {
98
+ ...propertyIdentifier,
99
+ type: "property-grouping:range",
100
+ fromValue: matchingRange.fromValue,
101
+ toValue: matchingRange.toValue,
102
+ },
103
+ }, node);
104
+ continue;
105
+ }
106
+ }
107
+ if (byProperties.createGroupForOutOfRangeValues) {
108
+ const groupingNode = getOtherValuesGroupingNode();
109
+ (0, core_bentley_1.assert)(HierarchyNodeKey_1.HierarchyNodeKey.isPropertyOtherValuesGrouping(groupingNode.key));
110
+ const thisPropertyIdentifier = {
111
+ className: propertyIdentifier.propertyClassName,
112
+ propertyName: propertyIdentifier.propertyName,
113
+ };
114
+ const hasPropertyIdentifier = groupingNode.key.properties.find((x) => x.className === thisPropertyIdentifier.className && x.propertyName === thisPropertyIdentifier.propertyName);
115
+ if (!hasPropertyIdentifier) {
116
+ groupingNode.key.properties.push(thisPropertyIdentifier);
117
+ }
118
+ node.key.instanceKeys.forEach((k) => groupingNode.groupedInstanceKeys.push(k));
119
+ groupingNode.parentKeys = node.parentKeys;
120
+ groupingNode.children.push(Object.assign(node, { parentKeys: [...node.parentKeys, groupingNode.key] }));
121
+ continue;
122
+ }
123
+ groupings.ungrouped.push(node);
124
+ continue;
125
+ }
126
+ const formattedValue = await valueFormatter(presentation_shared_1.TypedPrimitiveValue.create(currentProperty.propertyValue, property.primitiveType, koqName, property.extendedTypeName));
127
+ addGroupingToMap(groupings.grouped, `${currentProperty.propertyName}:${formattedValue}`, {
128
+ label: formattedValue,
129
+ propertyGroupingNodeKey: {
130
+ ...propertyIdentifier,
131
+ type: "property-grouping:value",
132
+ formattedPropertyValue: formattedValue,
133
+ },
134
+ }, node);
135
+ }
136
+ return createGroupingNodes(groupings, otherValuesGrouping?.new ? otherValuesGrouping.node : undefined);
137
+ }
138
+ exports.createPropertyGroups = createPropertyGroups;
139
+ function addGroupingToMap(groupingMap, mapKey, propertyToAdd, node) {
140
+ let groupingInfo = groupingMap.get(mapKey);
141
+ if (!groupingInfo) {
142
+ groupingInfo = {
143
+ displayablePropertyGroupingInfo: propertyToAdd,
144
+ groupedNodes: [node],
145
+ };
146
+ groupingMap.set(mapKey, groupingInfo);
147
+ return;
148
+ }
149
+ groupingInfo.groupedNodes.push(node);
150
+ }
151
+ function createGroupingNodes(groupings, otherValuesGroupingNode) {
152
+ const groupedNodes = new Array();
153
+ groupings.grouped.forEach((entry) => {
154
+ const groupedNodeParentKeys = entry.groupedNodes[0].parentKeys;
155
+ groupedNodes.push({
156
+ label: entry.displayablePropertyGroupingInfo.label,
157
+ key: entry.displayablePropertyGroupingInfo.propertyGroupingNodeKey,
158
+ parentKeys: groupedNodeParentKeys,
159
+ groupedInstanceKeys: entry.groupedNodes.flatMap((groupedInstanceNode) => groupedInstanceNode.key.instanceKeys),
160
+ children: entry.groupedNodes.map((gn) => ({
161
+ ...gn,
162
+ parentKeys: [...groupedNodeParentKeys, entry.displayablePropertyGroupingInfo.propertyGroupingNodeKey],
163
+ })),
164
+ });
165
+ });
166
+ if (otherValuesGroupingNode) {
167
+ groupedNodes.push(otherValuesGroupingNode);
168
+ }
169
+ return { grouped: groupedNodes, ungrouped: groupings.ungrouped, groupingType: "property" };
170
+ }
171
+ function createNodePropertyGroupPathMatchers(node) {
172
+ if (!HierarchyNode_1.HierarchyNode.isPropertyGroupingNode(node)) {
173
+ return [];
174
+ }
175
+ const keys = [...node.parentKeys, node.key];
176
+ const propertyGroupingNodeKeys = [];
177
+ for (let i = keys.length - 1; i >= 0; --i) {
178
+ const key = keys[i];
179
+ if (HierarchyNodeKey_1.HierarchyNodeKey.isPropertyGrouping(key)) {
180
+ propertyGroupingNodeKeys.push(key);
181
+ }
182
+ else {
183
+ break;
184
+ }
185
+ }
186
+ propertyGroupingNodeKeys.reverse();
187
+ return propertyGroupingNodeKeys.map((key) => {
188
+ if (HierarchyNodeKey_1.HierarchyNodeKey.isPropertyOtherValuesGrouping(key)) {
189
+ return (x) => key.properties.some((p) => p.className === x.propertiesClassName && p.propertyName === x.propertyName && !!x.isRange);
190
+ }
191
+ if (HierarchyNodeKey_1.HierarchyNodeKey.isPropertyValueRangeGrouping(key)) {
192
+ return (x) => key.propertyClassName === x.propertiesClassName && key.propertyName === x.propertyName && !!x.isRange;
193
+ }
194
+ // istanbul ignore else
195
+ if (HierarchyNodeKey_1.HierarchyNodeKey.isPropertyValueGrouping(key)) {
196
+ return (x) => key.propertyClassName === x.propertiesClassName && key.propertyName === x.propertyName && !x.isRange;
197
+ }
198
+ // https://github.com/microsoft/TypeScript/issues/21985
199
+ // istanbul ignore next
200
+ return ((x) => x)(key);
201
+ });
202
+ }
203
+ /** @internal */
204
+ async function getUniquePropertiesGroupInfo(schemaProvider, parentNode, nodes) {
205
+ const releaseMainThread = (0, presentation_shared_1.createMainThreadReleaseOnTimePassedHandler)();
206
+ const parentPropertyGroupPath = parentNode ? createNodePropertyGroupPathMatchers(parentNode) : [];
207
+ const uniqueProperties = new Map();
208
+ for (const node of nodes) {
209
+ await releaseMainThread();
210
+ const byProperties = node.processingParams?.grouping?.byProperties;
211
+ if (!byProperties) {
212
+ continue;
213
+ }
214
+ let propertyGroupIndex = 0;
215
+ const previousPropertiesInfo = new Array();
216
+ for (const propertyGroup of byProperties.propertyGroups) {
217
+ const mapKeyRanges = getRangesAsString(propertyGroup.ranges);
218
+ const lastKey = previousPropertiesInfo.length > 0 ? previousPropertiesInfo[previousPropertiesInfo.length - 1].propertyGroupKey : "";
219
+ const propertyGroupKey = `${lastKey}:${propertyGroup.propertyName}(${mapKeyRanges})`;
220
+ const mapKey = `${byProperties.propertiesClassName}:${propertyGroupKey}`;
221
+ let isAlreadyGrouped = false;
222
+ if (!isAlreadyGrouped && parentPropertyGroupPath.length > 0 && propertyGroupIndex < parentPropertyGroupPath.length) {
223
+ const groupMatcher = parentPropertyGroupPath[propertyGroupIndex];
224
+ isAlreadyGrouped = groupMatcher({
225
+ propertiesClassName: byProperties.propertiesClassName,
226
+ propertyName: propertyGroup.propertyName,
227
+ isRange: !!propertyGroup.ranges,
228
+ });
229
+ }
230
+ if (!isAlreadyGrouped && !uniqueProperties.get(mapKey)) {
231
+ uniqueProperties.set(mapKey, {
232
+ ecClass: await (0, presentation_shared_1.getClass)(schemaProvider, byProperties.propertiesClassName),
233
+ propertyGroup: {
234
+ propertyName: propertyGroup.propertyName,
235
+ ranges: propertyGroup.ranges,
236
+ },
237
+ previousPropertiesGroupingInfo: previousPropertiesInfo.map((groupingInfo) => ({
238
+ propertiesClassName: byProperties.propertiesClassName,
239
+ propertyName: groupingInfo.propertyGroup.propertyName,
240
+ isRange: !!groupingInfo.propertyGroup.ranges,
241
+ })),
242
+ });
243
+ }
244
+ previousPropertiesInfo.push({
245
+ propertyGroup,
246
+ propertyGroupKey,
247
+ });
248
+ ++propertyGroupIndex;
249
+ }
250
+ }
251
+ // Order might change in uniqueProperties, resorting to make sure that properties with fewer previous properties are returned first.
252
+ return [...uniqueProperties.values()].sort((lhs, rhs) => lhs.previousPropertiesGroupingInfo.length - rhs.previousPropertiesGroupingInfo.length);
253
+ }
254
+ exports.getUniquePropertiesGroupInfo = getUniquePropertiesGroupInfo;
255
+ function getRangesAsString(ranges) {
256
+ return ranges
257
+ ? ranges
258
+ .map((range) => `${range.fromValue}-${range.toValue}(${range.rangeLabel ?? ""})`)
259
+ .sort()
260
+ .join(";")
261
+ : "";
262
+ }
263
+ async function shouldCreatePropertyGroup(handlerGroupingParams, nodePropertyGroupingParams, nodeFullClassName, classHierarchyInspector) {
264
+ if (nodePropertyGroupingParams.propertiesClassName !== handlerGroupingParams.ecClass.fullName ||
265
+ nodePropertyGroupingParams.propertyGroups.length < handlerGroupingParams.previousPropertiesGroupingInfo.length + 1) {
266
+ return false;
267
+ }
268
+ const currentProperty = nodePropertyGroupingParams.propertyGroups[handlerGroupingParams.previousPropertiesGroupingInfo.length];
269
+ if (currentProperty.propertyName !== handlerGroupingParams.propertyGroup.propertyName ||
270
+ !doRangesMatch(currentProperty.ranges, handlerGroupingParams.propertyGroup.ranges)) {
271
+ return false;
272
+ }
273
+ if (!doPreviousPropertiesMatch(handlerGroupingParams.previousPropertiesGroupingInfo, nodePropertyGroupingParams)) {
274
+ return false;
275
+ }
276
+ return classHierarchyInspector.classDerivesFrom(nodeFullClassName, handlerGroupingParams.ecClass.fullName);
277
+ }
278
+ /** @internal */
279
+ function doPreviousPropertiesMatch(previousPropertiesGroupingInfo, nodesProperties) {
280
+ return (previousPropertiesGroupingInfo.length <= nodesProperties.propertyGroups.length &&
281
+ previousPropertiesGroupingInfo.every((groupingInfo, index) => groupingInfo.propertiesClassName === nodesProperties.propertiesClassName &&
282
+ groupingInfo.propertyName === nodesProperties.propertyGroups[index].propertyName &&
283
+ !!groupingInfo.isRange === !!nodesProperties.propertyGroups[index].ranges));
284
+ }
285
+ exports.doPreviousPropertiesMatch = doPreviousPropertiesMatch;
286
+ /** @internal */
287
+ function doRangesMatch(ranges1, ranges2) {
288
+ if (typeof ranges1 !== typeof ranges2) {
289
+ return false;
290
+ }
291
+ if (!ranges1) {
292
+ return true;
293
+ }
294
+ (0, core_bentley_1.assert)(Array.isArray(ranges2));
295
+ if (ranges1.length !== ranges2.length) {
296
+ return false;
297
+ }
298
+ return (
299
+ // Check twice, to validate if both ranges have the same elements (elements can be in a different order)
300
+ ranges1.every((lhsRange) => ranges2.some((rhsRange) => lhsRange.fromValue === rhsRange.fromValue && lhsRange.toValue === rhsRange.toValue && lhsRange.rangeLabel === rhsRange.rangeLabel)) &&
301
+ ranges2.every((lhsRange) => ranges1.some((rhsRange) => lhsRange.fromValue === rhsRange.fromValue && lhsRange.toValue === rhsRange.toValue && lhsRange.rangeLabel === rhsRange.rangeLabel)));
302
+ }
303
+ exports.doRangesMatch = doRangesMatch;
304
+ /** @internal */
305
+ async function createPropertiesGroupingHandlers(imodelAccess, parentNode, nodes, valueFormatter, localizedStrings) {
306
+ const propertiesGroupInfo = await getUniquePropertiesGroupInfo(imodelAccess, parentNode, nodes);
307
+ return propertiesGroupInfo.map((propertyInfo) => async (nodesToGroup, nodesAlreadyGrouped) => createPropertyGroups(nodesToGroup, nodesAlreadyGrouped, propertyInfo, valueFormatter, localizedStrings, imodelAccess));
308
+ }
309
+ exports.createPropertiesGroupingHandlers = createPropertiesGroupingHandlers;
310
+ //# sourceMappingURL=PropertiesGrouping.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PropertiesGrouping.js","sourceRoot":"","sources":["../../../../../../src/hierarchies/internal/operators/grouping/PropertiesGrouping.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;AAEhG,sDAA6C;AAC7C,oEASoC;AACpC,0DAOgC;AAChC,gEAAsF;AA6BtF,gBAAgB;AACT,KAAK,UAAU,oBAAoB,CACxC,YAA8C,EAC9C,mBAA8D,EAC9D,qBAAwC,EACxC,cAAwC,EACxC,gBAAoD,EACpD,uBAAkD;IAElD,IAAI,mBAAgG,CAAC;IACrG,MAAM,0BAA0B,GAAG,GAAG,EAAE;QACtC,IAAI,CAAC,mBAAmB,EAAE,CAAC;YACzB,MAAM,IAAI,GAAG,mBAAmB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,mCAAgB,CAAC,6BAA6B,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;YACpG,IAAI,IAAI,EAAE,CAAC;gBACT,mBAAmB,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC;YAC7C,CAAC;QACH,CAAC;QACD,mBAAmB,KAAK;YACtB,IAAI,EAAE;gBACJ,GAAG,EAAE;oBACH,IAAI,EAAE,yBAAkC;oBACxC,UAAU,EAAE,EAAE;iBACf;gBACD,UAAU,EAAE,EAAE;gBACd,mBAAmB,EAAE,EAAE;gBACvB,KAAK,EAAE,gBAAgB,CAAC,KAAK;gBAC7B,QAAQ,EAAE,EAAE;aACb;YACD,GAAG,EAAE,IAAI;SACV,CAAC;QACF,OAAO,mBAAmB,CAAC,IAAI,CAAC;IAClC,CAAC,CAAC;IAEF,MAAM,iBAAiB,GAAG,IAAA,gEAA0C,GAAE,CAAC;IACvE,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AC;AAZD,4EAYC","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 } from \"@itwin/core-bentley\";\nimport {\n ArrayElement,\n createMainThreadReleaseOnTimePassedHandler,\n EC,\n ECClassHierarchyInspector,\n ECSchemaProvider,\n getClass,\n IPrimitiveValueFormatter,\n TypedPrimitiveValue,\n} from \"@itwin/presentation-shared\";\nimport {\n HierarchyNode,\n HierarchyNodePropertiesGroupingParams,\n HierarchyNodePropertyGroup,\n HierarchyNodePropertyValueRange,\n ParentHierarchyNode,\n ProcessedInstanceHierarchyNode,\n} from \"../../../HierarchyNode\";\nimport { HierarchyNodeKey, PropertyGroupingNodeKey } from \"../../../HierarchyNodeKey\";\nimport { GroupingHandler, GroupingHandlerResult, ProcessedInstancesGroupingHierarchyNode } from \"../Grouping\";\n\ninterface DisplayablePropertyGroupingInfo {\n label: string;\n propertyGroupingNodeKey: PropertyGroupingNodeKey;\n}\n\ninterface PropertyGroupingInformation {\n ungrouped: ProcessedInstanceHierarchyNode[];\n grouped: Map<string, { displayablePropertyGroupingInfo: DisplayablePropertyGroupingInfo; groupedNodes: ProcessedInstanceHierarchyNode[] }>;\n}\n\n/** @internal */\nexport interface PropertiesGroupingLocalizedStrings {\n other: string;\n unspecified: string;\n}\n\n/** @internal */\nexport interface PropertyGroupInfo {\n ecClass: EC.Class;\n previousPropertiesGroupingInfo: PreviousPropertiesGroupingInfo;\n propertyGroup: Omit<HierarchyNodePropertyGroup, \"propertyValue\">;\n}\n\n/** @internal */\nexport type PreviousPropertiesGroupingInfo = Array<{ propertiesClassName: string; propertyName: string; isRange?: boolean }>;\n\n/** @internal */\nexport async function createPropertyGroups(\n nodesToGroup: ProcessedInstanceHierarchyNode[],\n nodesAlreadyGrouped: ProcessedInstancesGroupingHierarchyNode[],\n handlerGroupingParams: PropertyGroupInfo,\n valueFormatter: IPrimitiveValueFormatter,\n localizedStrings: PropertiesGroupingLocalizedStrings,\n classHierarchyInspector: ECClassHierarchyInspector,\n): Promise<GroupingHandlerResult> {\n let otherValuesGrouping: { node: ProcessedInstancesGroupingHierarchyNode; new: boolean } | undefined;\n const getOtherValuesGroupingNode = () => {\n if (!otherValuesGrouping) {\n const node = nodesAlreadyGrouped.find((n) => HierarchyNodeKey.isPropertyOtherValuesGrouping(n.key));\n if (node) {\n otherValuesGrouping = { node, new: false };\n }\n }\n otherValuesGrouping ??= {\n node: {\n key: {\n type: \"property-grouping:other\" as const,\n properties: [],\n },\n parentKeys: [],\n groupedInstanceKeys: [],\n label: localizedStrings.other,\n children: [],\n },\n new: true,\n };\n return otherValuesGrouping.node;\n };\n\n const releaseMainThread = createMainThreadReleaseOnTimePassedHandler();\n const groupings: PropertyGroupingInformation = { ungrouped: [], grouped: new Map() };\n for (const node of nodesToGroup) {\n await releaseMainThread();\n\n const byProperties = node.processingParams?.grouping?.byProperties;\n if (!byProperties) {\n groupings.ungrouped.push(node);\n continue;\n }\n if (!(await shouldCreatePropertyGroup(handlerGroupingParams, byProperties, node.key.instanceKeys[0].className, classHierarchyInspector))) {\n groupings.ungrouped.push(node);\n continue;\n }\n const currentProperty = byProperties.propertyGroups[handlerGroupingParams.previousPropertiesGroupingInfo.length];\n const propertyIdentifier = {\n propertyName: currentProperty.propertyName,\n propertyClassName: byProperties.propertiesClassName,\n };\n\n const propertyClass = handlerGroupingParams.ecClass;\n const property = await propertyClass.getProperty(currentProperty.propertyName);\n if (!property?.isPrimitive() || property.primitiveType === \"Binary\" || property.primitiveType === \"IGeometry\") {\n groupings.ungrouped.push(node);\n continue;\n }\n const koqName = (await property.kindOfQuantity)?.fullName;\n if (!currentProperty.propertyValue) {\n if (byProperties.createGroupForUnspecifiedValues) {\n addGroupingToMap(\n groupings.grouped,\n `${currentProperty.propertyName}:Unspecified`,\n {\n label: localizedStrings.unspecified,\n propertyGroupingNodeKey: {\n type: \"property-grouping:value\",\n ...propertyIdentifier,\n formattedPropertyValue: \"\",\n },\n },\n node,\n );\n continue;\n }\n groupings.ungrouped.push(node);\n continue;\n }\n\n if (currentProperty.ranges) {\n if (typeof currentProperty.propertyValue === \"number\") {\n const propValue = currentProperty.propertyValue;\n const matchingRange = currentProperty.ranges.find((range) => propValue >= range.fromValue && propValue <= range.toValue);\n\n if (matchingRange) {\n const fromValueTypedPrimitive: TypedPrimitiveValue = {\n type: Number.isInteger(matchingRange.fromValue) ? \"Integer\" : \"Double\",\n extendedType: property.extendedTypeName,\n koqName,\n value: matchingRange.fromValue,\n };\n const toValueTypedPrimitive: TypedPrimitiveValue = {\n type: Number.isInteger(matchingRange.toValue) ? \"Integer\" : \"Double\",\n extendedType: property.extendedTypeName,\n koqName,\n value: matchingRange.toValue,\n };\n\n const rangeLabel = matchingRange.rangeLabel ?? `${await valueFormatter(fromValueTypedPrimitive)} - ${await valueFormatter(toValueTypedPrimitive)}`;\n addGroupingToMap(\n groupings.grouped,\n `${currentProperty.propertyName}:[${matchingRange.fromValue}-${matchingRange.toValue}]${matchingRange.rangeLabel ? `(${matchingRange.rangeLabel})` : \"\"}`,\n {\n label: rangeLabel,\n propertyGroupingNodeKey: {\n ...propertyIdentifier,\n type: \"property-grouping:range\",\n fromValue: matchingRange.fromValue,\n toValue: matchingRange.toValue,\n },\n },\n node,\n );\n continue;\n }\n }\n if (byProperties.createGroupForOutOfRangeValues) {\n const groupingNode = getOtherValuesGroupingNode();\n assert(HierarchyNodeKey.isPropertyOtherValuesGrouping(groupingNode.key));\n const thisPropertyIdentifier = {\n className: propertyIdentifier.propertyClassName,\n propertyName: propertyIdentifier.propertyName,\n };\n const hasPropertyIdentifier = groupingNode.key.properties.find(\n (x) => x.className === thisPropertyIdentifier.className && x.propertyName === thisPropertyIdentifier.propertyName,\n );\n if (!hasPropertyIdentifier) {\n groupingNode.key.properties.push(thisPropertyIdentifier);\n }\n node.key.instanceKeys.forEach((k) => groupingNode.groupedInstanceKeys.push(k));\n groupingNode.parentKeys = node.parentKeys;\n groupingNode.children.push(Object.assign(node, { parentKeys: [...node.parentKeys, groupingNode.key] }));\n continue;\n }\n groupings.ungrouped.push(node);\n continue;\n }\n\n const formattedValue = await valueFormatter(\n TypedPrimitiveValue.create(currentProperty.propertyValue, property.primitiveType, koqName, property.extendedTypeName),\n );\n\n addGroupingToMap(\n groupings.grouped,\n `${currentProperty.propertyName}:${formattedValue}`,\n {\n label: formattedValue,\n propertyGroupingNodeKey: {\n ...propertyIdentifier,\n type: \"property-grouping:value\",\n formattedPropertyValue: formattedValue,\n },\n },\n node,\n );\n }\n return createGroupingNodes(groupings, otherValuesGrouping?.new ? otherValuesGrouping.node : undefined);\n}\n\nfunction addGroupingToMap(\n groupingMap: Map<string, { displayablePropertyGroupingInfo: DisplayablePropertyGroupingInfo; groupedNodes: ProcessedInstanceHierarchyNode[] }>,\n mapKey: string,\n propertyToAdd: DisplayablePropertyGroupingInfo,\n node: ProcessedInstanceHierarchyNode,\n): void {\n let groupingInfo = groupingMap.get(mapKey);\n if (!groupingInfo) {\n groupingInfo = {\n displayablePropertyGroupingInfo: propertyToAdd,\n groupedNodes: [node],\n };\n groupingMap.set(mapKey, groupingInfo);\n return;\n }\n groupingInfo.groupedNodes.push(node);\n}\n\nfunction createGroupingNodes(\n groupings: PropertyGroupingInformation,\n otherValuesGroupingNode: ProcessedInstancesGroupingHierarchyNode | undefined,\n): GroupingHandlerResult {\n const groupedNodes = new Array<ProcessedInstancesGroupingHierarchyNode>();\n groupings.grouped.forEach((entry) => {\n const groupedNodeParentKeys = entry.groupedNodes[0].parentKeys;\n groupedNodes.push({\n label: entry.displayablePropertyGroupingInfo.label,\n key: entry.displayablePropertyGroupingInfo.propertyGroupingNodeKey,\n parentKeys: groupedNodeParentKeys,\n groupedInstanceKeys: entry.groupedNodes.flatMap((groupedInstanceNode) => groupedInstanceNode.key.instanceKeys),\n children: entry.groupedNodes.map((gn) => ({\n ...gn,\n parentKeys: [...groupedNodeParentKeys, entry.displayablePropertyGroupingInfo.propertyGroupingNodeKey],\n })),\n });\n });\n if (otherValuesGroupingNode) {\n groupedNodes.push(otherValuesGroupingNode);\n }\n return { grouped: groupedNodes, ungrouped: groupings.ungrouped, groupingType: \"property\" };\n}\n\nfunction createNodePropertyGroupPathMatchers(node: ParentHierarchyNode): Array<(x: ArrayElement<PreviousPropertiesGroupingInfo>) => boolean> {\n if (!HierarchyNode.isPropertyGroupingNode(node)) {\n return [];\n }\n\n const keys = [...node.parentKeys, node.key];\n const propertyGroupingNodeKeys: PropertyGroupingNodeKey[] = [];\n for (let i = keys.length - 1; i >= 0; --i) {\n const key = keys[i];\n if (HierarchyNodeKey.isPropertyGrouping(key)) {\n propertyGroupingNodeKeys.push(key);\n } else {\n break;\n }\n }\n propertyGroupingNodeKeys.reverse();\n\n return propertyGroupingNodeKeys.map((key): ((x: ArrayElement<PreviousPropertiesGroupingInfo>) => boolean) => {\n if (HierarchyNodeKey.isPropertyOtherValuesGrouping(key)) {\n return (x) => key.properties.some((p) => p.className === x.propertiesClassName && p.propertyName === x.propertyName && !!x.isRange);\n }\n if (HierarchyNodeKey.isPropertyValueRangeGrouping(key)) {\n return (x) => key.propertyClassName === x.propertiesClassName && key.propertyName === x.propertyName && !!x.isRange;\n }\n // istanbul ignore else\n if (HierarchyNodeKey.isPropertyValueGrouping(key)) {\n return (x) => key.propertyClassName === x.propertiesClassName && key.propertyName === x.propertyName && !x.isRange;\n }\n // https://github.com/microsoft/TypeScript/issues/21985\n // istanbul ignore next\n return ((x: never) => x)(key);\n });\n}\n\n/** @internal */\nexport async function getUniquePropertiesGroupInfo(\n schemaProvider: ECSchemaProvider,\n parentNode: ParentHierarchyNode | undefined,\n nodes: ProcessedInstanceHierarchyNode[],\n): Promise<Array<PropertyGroupInfo>> {\n const releaseMainThread = createMainThreadReleaseOnTimePassedHandler();\n const parentPropertyGroupPath = parentNode ? createNodePropertyGroupPathMatchers(parentNode) : [];\n const uniqueProperties = new Map<string, PropertyGroupInfo>();\n for (const node of nodes) {\n await releaseMainThread();\n\n const byProperties = node.processingParams?.grouping?.byProperties;\n if (!byProperties) {\n continue;\n }\n\n let propertyGroupIndex = 0;\n const previousPropertiesInfo = new Array<{ propertyGroup: HierarchyNodePropertyGroup; propertyGroupKey: string }>();\n for (const propertyGroup of byProperties.propertyGroups) {\n const mapKeyRanges = getRangesAsString(propertyGroup.ranges);\n const lastKey = previousPropertiesInfo.length > 0 ? previousPropertiesInfo[previousPropertiesInfo.length - 1].propertyGroupKey : \"\";\n const propertyGroupKey = `${lastKey}:${propertyGroup.propertyName}(${mapKeyRanges})`;\n const mapKey = `${byProperties.propertiesClassName}:${propertyGroupKey}`;\n\n let isAlreadyGrouped = false;\n if (!isAlreadyGrouped && parentPropertyGroupPath.length > 0 && propertyGroupIndex < parentPropertyGroupPath.length) {\n const groupMatcher = parentPropertyGroupPath[propertyGroupIndex];\n isAlreadyGrouped = groupMatcher({\n propertiesClassName: byProperties.propertiesClassName,\n propertyName: propertyGroup.propertyName,\n isRange: !!propertyGroup.ranges,\n });\n }\n if (!isAlreadyGrouped && !uniqueProperties.get(mapKey)) {\n uniqueProperties.set(mapKey, {\n ecClass: await getClass(schemaProvider, byProperties.propertiesClassName),\n propertyGroup: {\n propertyName: propertyGroup.propertyName,\n ranges: propertyGroup.ranges,\n },\n previousPropertiesGroupingInfo: previousPropertiesInfo.map((groupingInfo) => ({\n propertiesClassName: byProperties.propertiesClassName,\n propertyName: groupingInfo.propertyGroup.propertyName,\n isRange: !!groupingInfo.propertyGroup.ranges,\n })),\n });\n }\n\n previousPropertiesInfo.push({\n propertyGroup,\n propertyGroupKey,\n });\n ++propertyGroupIndex;\n }\n }\n // Order might change in uniqueProperties, resorting to make sure that properties with fewer previous properties are returned first.\n return [...uniqueProperties.values()].sort((lhs, rhs) => lhs.previousPropertiesGroupingInfo.length - rhs.previousPropertiesGroupingInfo.length);\n}\n\nfunction getRangesAsString(ranges?: HierarchyNodePropertyValueRange[]): string {\n return ranges\n ? ranges\n .map((range) => `${range.fromValue}-${range.toValue}(${range.rangeLabel ?? \"\"})`)\n .sort()\n .join(\";\")\n : \"\";\n}\n\nasync function shouldCreatePropertyGroup(\n handlerGroupingParams: PropertyGroupInfo,\n nodePropertyGroupingParams: HierarchyNodePropertiesGroupingParams,\n nodeFullClassName: string,\n classHierarchyInspector: ECClassHierarchyInspector,\n): Promise<boolean> {\n if (\n nodePropertyGroupingParams.propertiesClassName !== handlerGroupingParams.ecClass.fullName ||\n nodePropertyGroupingParams.propertyGroups.length < handlerGroupingParams.previousPropertiesGroupingInfo.length + 1\n ) {\n return false;\n }\n const currentProperty = nodePropertyGroupingParams.propertyGroups[handlerGroupingParams.previousPropertiesGroupingInfo.length];\n if (\n currentProperty.propertyName !== handlerGroupingParams.propertyGroup.propertyName ||\n !doRangesMatch(currentProperty.ranges, handlerGroupingParams.propertyGroup.ranges)\n ) {\n return false;\n }\n if (!doPreviousPropertiesMatch(handlerGroupingParams.previousPropertiesGroupingInfo, nodePropertyGroupingParams)) {\n return false;\n }\n return classHierarchyInspector.classDerivesFrom(nodeFullClassName, handlerGroupingParams.ecClass.fullName);\n}\n\n/** @internal */\nexport function doPreviousPropertiesMatch(\n previousPropertiesGroupingInfo: PreviousPropertiesGroupingInfo,\n nodesProperties: HierarchyNodePropertiesGroupingParams,\n): boolean {\n return (\n previousPropertiesGroupingInfo.length <= nodesProperties.propertyGroups.length &&\n previousPropertiesGroupingInfo.every(\n (groupingInfo, index) =>\n groupingInfo.propertiesClassName === nodesProperties.propertiesClassName &&\n groupingInfo.propertyName === nodesProperties.propertyGroups[index].propertyName &&\n !!groupingInfo.isRange === !!nodesProperties.propertyGroups[index].ranges,\n )\n );\n}\n\n/** @internal */\nexport function doRangesMatch(ranges1: HierarchyNodePropertyValueRange[] | undefined, ranges2: HierarchyNodePropertyValueRange[] | undefined): boolean {\n if (typeof ranges1 !== typeof ranges2) {\n return false;\n }\n if (!ranges1) {\n return true;\n }\n assert(Array.isArray(ranges2));\n if (ranges1.length !== ranges2.length) {\n return false;\n }\n return (\n // Check twice, to validate if both ranges have the same elements (elements can be in a different order)\n ranges1.every((lhsRange) =>\n ranges2.some(\n (rhsRange) => lhsRange.fromValue === rhsRange.fromValue && lhsRange.toValue === rhsRange.toValue && lhsRange.rangeLabel === rhsRange.rangeLabel,\n ),\n ) &&\n ranges2.every((lhsRange) =>\n ranges1.some(\n (rhsRange) => lhsRange.fromValue === rhsRange.fromValue && lhsRange.toValue === rhsRange.toValue && lhsRange.rangeLabel === rhsRange.rangeLabel,\n ),\n )\n );\n}\n\n/** @internal */\nexport async function createPropertiesGroupingHandlers(\n imodelAccess: ECSchemaProvider & ECClassHierarchyInspector,\n parentNode: ParentHierarchyNode | undefined,\n nodes: ProcessedInstanceHierarchyNode[],\n valueFormatter: IPrimitiveValueFormatter,\n localizedStrings: PropertiesGroupingLocalizedStrings,\n): Promise<GroupingHandler[]> {\n const propertiesGroupInfo = await getUniquePropertiesGroupInfo(imodelAccess, parentNode, nodes);\n return propertiesGroupInfo.map(\n (propertyInfo) => async (nodesToGroup, nodesAlreadyGrouped) =>\n createPropertyGroups(nodesToGroup, nodesAlreadyGrouped, propertyInfo, valueFormatter, localizedStrings, imodelAccess),\n );\n}\n"]}
@@ -0,0 +1,5 @@
1
+ import { HierarchyNodeGroupingParamsBase } from "../../../HierarchyNode";
2
+ import { GroupingType, ProcessedInstancesGroupingHierarchyNode } from "../Grouping";
3
+ /** @internal */
4
+ export declare function iterateChildNodeGroupingParams(parentNode: ProcessedInstancesGroupingHierarchyNode, groupingType: GroupingType, cb: (groupingParams: HierarchyNodeGroupingParamsBase | undefined) => boolean | undefined): void;
5
+ //# sourceMappingURL=Shared.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Shared.d.ts","sourceRoot":"","sources":["../../../../../../src/hierarchies/internal/operators/grouping/Shared.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,+BAA+B,EAAyC,MAAM,wBAAwB,CAAC;AAChH,OAAO,EAAE,YAAY,EAAE,uCAAuC,EAAE,MAAM,aAAa,CAAC;AAEpF,gBAAgB;AAChB,wBAAgB,8BAA8B,CAC5C,UAAU,EAAE,uCAAuC,EACnD,YAAY,EAAE,YAAY,EAC1B,EAAE,EAAE,CAAC,cAAc,EAAE,+BAA+B,GAAG,SAAS,KAAK,OAAO,GAAG,SAAS,GACvF,IAAI,CAmBN"}
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ /*---------------------------------------------------------------------------------------------
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.iterateChildNodeGroupingParams = void 0;
8
+ /** @internal */
9
+ function iterateChildNodeGroupingParams(parentNode, groupingType, cb) {
10
+ function getGroupingParams(params) {
11
+ switch (groupingType) {
12
+ case "base-class":
13
+ return params?.grouping?.byBaseClasses;
14
+ case "class":
15
+ return typeof params?.grouping?.byClass === "object" ? params.grouping.byClass : undefined;
16
+ case "label":
17
+ return typeof params?.grouping?.byLabel === "object" && params.grouping.byLabel.action !== "merge" ? params.grouping.byLabel : undefined;
18
+ case "property":
19
+ return params?.grouping?.byProperties;
20
+ }
21
+ }
22
+ for (const childNode of parentNode.children) {
23
+ const groupingParams = getGroupingParams(childNode.processingParams);
24
+ if (cb(groupingParams)) {
25
+ return;
26
+ }
27
+ }
28
+ }
29
+ exports.iterateChildNodeGroupingParams = iterateChildNodeGroupingParams;
30
+ //# sourceMappingURL=Shared.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Shared.js","sourceRoot":"","sources":["../../../../../../src/hierarchies/internal/operators/grouping/Shared.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;AAKhG,gBAAgB;AAChB,SAAgB,8BAA8B,CAC5C,UAAmD,EACnD,YAA0B,EAC1B,EAAwF;IAExF,SAAS,iBAAiB,CAAC,MAAyD;QAClF,QAAQ,YAAY,EAAE,CAAC;YACrB,KAAK,YAAY;gBACf,OAAO,MAAM,EAAE,QAAQ,EAAE,aAAa,CAAC;YACzC,KAAK,OAAO;gBACV,OAAO,OAAO,MAAM,EAAE,QAAQ,EAAE,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;YAC7F,KAAK,OAAO;gBACV,OAAO,OAAO,MAAM,EAAE,QAAQ,EAAE,OAAO,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;YAC3I,KAAK,UAAU;gBACb,OAAO,MAAM,EAAE,QAAQ,EAAE,YAAY,CAAC;QAC1C,CAAC;IACH,CAAC;IACD,KAAK,MAAM,SAAS,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;QAC5C,MAAM,cAAc,GAAG,iBAAiB,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;QACrE,IAAI,EAAE,CAAC,cAAc,CAAC,EAAE,CAAC;YACvB,OAAO;QACT,CAAC;IACH,CAAC;AACH,CAAC;AAvBD,wEAuBC","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 { HierarchyNodeGroupingParamsBase, InstanceHierarchyNodeProcessingParams } from \"../../../HierarchyNode\";\nimport { GroupingType, ProcessedInstancesGroupingHierarchyNode } from \"../Grouping\";\n\n/** @internal */\nexport function iterateChildNodeGroupingParams(\n parentNode: ProcessedInstancesGroupingHierarchyNode,\n groupingType: GroupingType,\n cb: (groupingParams: HierarchyNodeGroupingParamsBase | undefined) => boolean | undefined,\n): void {\n function getGroupingParams(params: InstanceHierarchyNodeProcessingParams | undefined) {\n switch (groupingType) {\n case \"base-class\":\n return params?.grouping?.byBaseClasses;\n case \"class\":\n return typeof params?.grouping?.byClass === \"object\" ? params.grouping.byClass : undefined;\n case \"label\":\n return typeof params?.grouping?.byLabel === \"object\" && params.grouping.byLabel.action !== \"merge\" ? params.grouping.byLabel : undefined;\n case \"property\":\n return params?.grouping?.byProperties;\n }\n }\n for (const childNode of parentNode.children) {\n const groupingParams = getGroupingParams(childNode.processingParams);\n if (cb(groupingParams)) {\n return;\n }\n }\n}\n"]}
@@ -0,0 +1,11 @@
1
+ export { GenericInstanceFilter } from "@itwin/core-common";
2
+ export { DefineCustomNodeChildHierarchyLevelProps, DefineHierarchyLevelProps, DefineInstanceNodeChildHierarchyLevelProps, DefineRootHierarchyLevelProps, HierarchyLevelDefinition, HierarchyDefinition, HierarchyNodesDefinition, NodeParser, NodePostProcessor, NodePreProcessor, createClassBasedHierarchyDefinition, } from "./hierarchies/HierarchyDefinition";
3
+ export { RowsLimitExceededError } from "./hierarchies/HierarchyErrors";
4
+ export { GroupingHierarchyNode, HierarchyNode, NonGroupingHierarchyNode, ParsedHierarchyNode, ProcessedHierarchyNode } from "./hierarchies/HierarchyNode";
5
+ export { HierarchyNodeIdentifier, HierarchyNodeIdentifiersPath } from "./hierarchies/HierarchyNodeIdentifier";
6
+ export { GroupingNodeKey, HierarchyNodeKey, InstancesNodeKey } from "./hierarchies/HierarchyNodeKey";
7
+ export { GetHierarchyNodesProps, HierarchyProvider, createHierarchyProvider } from "./hierarchies/HierarchyProvider";
8
+ export { LimitingECSqlQueryExecutor, createLimitingECSqlQueryExecutor } from "./hierarchies/LimitingECSqlQueryExecutor";
9
+ export { getLogger, setLogger } from "./hierarchies/Logging";
10
+ export { NodeSelectClauseColumnNames, NodesQueryClauseFactory, createNodesQueryClauseFactory } from "./hierarchies/NodeSelectQueryFactory";
11
+ //# sourceMappingURL=presentation-hierarchies.d.ts.map
@@ -0,0 +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,wCAAwC,EACxC,yBAAyB,EACzB,0CAA0C,EAC1C,6BAA6B,EAC7B,wBAAwB,EACxB,mBAAmB,EACnB,wBAAwB,EACxB,UAAU,EACV,iBAAiB,EACjB,gBAAgB,EAChB,mCAAmC,GACpC,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,qBAAqB,EAAE,aAAa,EAAE,wBAAwB,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAC1J,OAAO,EAAE,uBAAuB,EAAE,4BAA4B,EAAE,MAAM,uCAAuC,CAAC;AAC9G,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AACrG,OAAO,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AACrH,OAAO,EAAE,0BAA0B,EAAE,gCAAgC,EAAE,MAAM,0CAA0C,CAAC;AACxH,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,2BAA2B,EAAE,uBAAuB,EAAE,6BAA6B,EAAE,MAAM,sCAAsC,CAAC"}
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ /*---------------------------------------------------------------------------------------------
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.createNodesQueryClauseFactory = exports.NodeSelectClauseColumnNames = exports.setLogger = exports.getLogger = exports.createLimitingECSqlQueryExecutor = exports.createHierarchyProvider = exports.HierarchyNodeKey = exports.HierarchyNodeIdentifier = exports.HierarchyNode = exports.RowsLimitExceededError = exports.createClassBasedHierarchyDefinition = exports.HierarchyNodesDefinition = exports.GenericInstanceFilter = void 0;
8
+ var core_common_1 = require("@itwin/core-common");
9
+ Object.defineProperty(exports, "GenericInstanceFilter", { enumerable: true, get: function () { return core_common_1.GenericInstanceFilter; } });
10
+ var HierarchyDefinition_1 = require("./hierarchies/HierarchyDefinition");
11
+ Object.defineProperty(exports, "HierarchyNodesDefinition", { enumerable: true, get: function () { return HierarchyDefinition_1.HierarchyNodesDefinition; } });
12
+ Object.defineProperty(exports, "createClassBasedHierarchyDefinition", { enumerable: true, get: function () { return HierarchyDefinition_1.createClassBasedHierarchyDefinition; } });
13
+ var HierarchyErrors_1 = require("./hierarchies/HierarchyErrors");
14
+ Object.defineProperty(exports, "RowsLimitExceededError", { enumerable: true, get: function () { return HierarchyErrors_1.RowsLimitExceededError; } });
15
+ var HierarchyNode_1 = require("./hierarchies/HierarchyNode");
16
+ Object.defineProperty(exports, "HierarchyNode", { enumerable: true, get: function () { return HierarchyNode_1.HierarchyNode; } });
17
+ var HierarchyNodeIdentifier_1 = require("./hierarchies/HierarchyNodeIdentifier");
18
+ Object.defineProperty(exports, "HierarchyNodeIdentifier", { enumerable: true, get: function () { return HierarchyNodeIdentifier_1.HierarchyNodeIdentifier; } });
19
+ var HierarchyNodeKey_1 = require("./hierarchies/HierarchyNodeKey");
20
+ Object.defineProperty(exports, "HierarchyNodeKey", { enumerable: true, get: function () { return HierarchyNodeKey_1.HierarchyNodeKey; } });
21
+ var HierarchyProvider_1 = require("./hierarchies/HierarchyProvider");
22
+ Object.defineProperty(exports, "createHierarchyProvider", { enumerable: true, get: function () { return HierarchyProvider_1.createHierarchyProvider; } });
23
+ var LimitingECSqlQueryExecutor_1 = require("./hierarchies/LimitingECSqlQueryExecutor");
24
+ Object.defineProperty(exports, "createLimitingECSqlQueryExecutor", { enumerable: true, get: function () { return LimitingECSqlQueryExecutor_1.createLimitingECSqlQueryExecutor; } });
25
+ var Logging_1 = require("./hierarchies/Logging");
26
+ Object.defineProperty(exports, "getLogger", { enumerable: true, get: function () { return Logging_1.getLogger; } });
27
+ Object.defineProperty(exports, "setLogger", { enumerable: true, get: function () { return Logging_1.setLogger; } });
28
+ var NodeSelectQueryFactory_1 = require("./hierarchies/NodeSelectQueryFactory");
29
+ Object.defineProperty(exports, "NodeSelectClauseColumnNames", { enumerable: true, get: function () { return NodeSelectQueryFactory_1.NodeSelectClauseColumnNames; } });
30
+ Object.defineProperty(exports, "createNodesQueryClauseFactory", { enumerable: true, get: function () { return NodeSelectQueryFactory_1.createNodesQueryClauseFactory; } });
31
+ //# sourceMappingURL=presentation-hierarchies.js.map
@@ -0,0 +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,yEAY2C;AALzC,+HAAA,wBAAwB,OAAA;AAIxB,0IAAA,mCAAmC,OAAA;AAErC,iEAAuE;AAA9D,yHAAA,sBAAsB,OAAA;AAC/B,6DAA0J;AAA1H,8GAAA,aAAa,OAAA;AAC7C,iFAA8G;AAArG,kIAAA,uBAAuB,OAAA;AAChC,mEAAqG;AAA3E,oHAAA,gBAAgB,OAAA;AAC1C,qEAAqH;AAAjE,4HAAA,uBAAuB,OAAA;AAC3E,uFAAwH;AAAnF,8IAAA,gCAAgC,OAAA;AACrE,iDAA6D;AAApD,oGAAA,SAAS,OAAA;AAAE,oGAAA,SAAS,OAAA;AAC7B,+EAA2I;AAAlI,qIAAA,2BAA2B,OAAA;AAA2B,uIAAA,6BAA6B,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 DefineCustomNodeChildHierarchyLevelProps,\n DefineHierarchyLevelProps,\n DefineInstanceNodeChildHierarchyLevelProps,\n DefineRootHierarchyLevelProps,\n HierarchyLevelDefinition,\n HierarchyDefinition,\n HierarchyNodesDefinition,\n NodeParser,\n NodePostProcessor,\n NodePreProcessor,\n createClassBasedHierarchyDefinition,\n} from \"./hierarchies/HierarchyDefinition\";\nexport { RowsLimitExceededError } from \"./hierarchies/HierarchyErrors\";\nexport { GroupingHierarchyNode, HierarchyNode, NonGroupingHierarchyNode, ParsedHierarchyNode, ProcessedHierarchyNode } from \"./hierarchies/HierarchyNode\";\nexport { HierarchyNodeIdentifier, HierarchyNodeIdentifiersPath } from \"./hierarchies/HierarchyNodeIdentifier\";\nexport { GroupingNodeKey, HierarchyNodeKey, InstancesNodeKey } from \"./hierarchies/HierarchyNodeKey\";\nexport { GetHierarchyNodesProps, HierarchyProvider, createHierarchyProvider } from \"./hierarchies/HierarchyProvider\";\nexport { LimitingECSqlQueryExecutor, createLimitingECSqlQueryExecutor } from \"./hierarchies/LimitingECSqlQueryExecutor\";\nexport { getLogger, setLogger } from \"./hierarchies/Logging\";\nexport { NodeSelectClauseColumnNames, NodesQueryClauseFactory, createNodesQueryClauseFactory } from \"./hierarchies/NodeSelectQueryFactory\";\n"]}